Skip to content

feat(cms): CMS-driven Effects panel (E33)#26

Closed
thierrzz wants to merge 2 commits into
mainfrom
deploy/e33-effects
Closed

feat(cms): CMS-driven Effects panel (E33)#26
thierrzz wants to merge 2 commits into
mainfrom
deploy/e33-effects

Conversation

@thierrzz

Copy link
Copy Markdown
Collaborator

What

Adds a Payload CMS collection for Effects so you can add/edit effects (key, thumbnail, prompt) from admin.aaavatar.nl without a backend or app release.

Changes

  • admin/src/collections/Effects.ts — new Payload collection (key, label, thumbnail, prompt, order, active). push:true auto-creates the table on first boot.
  • admin/src/payload.config.ts — registers Effects in the collections array.
  • backend/api/v1/effects.ts — anonymous GET /v1/effects returning key/label/thumbnail_url/order. Prompt deliberately omitted (server-side only).
  • backend/lib/payload.ts — fetchActiveEffects() with 60s cache.
  • backend/api/v1/stylize.ts — CMS-first prompt lookup with STYLE_PROMPTS fallback during seed window.

After merge: seed the 4 launch effects

Go to admin.aaavatar.nl/effects and create rows for clay, wood, 3d, scribble. Copy the prompts from STYLE_PROMPTS in backend/api/v1/stylize.ts.

Verify

curl https://api.aaavatar.nl/v1/effects

🤖 Generated with Claude Code

- admin/src/collections/Effects.ts — new Payload collection (key, label,
  thumbnail, prompt, order, active); push:true auto-creates the table
- admin/src/payload.config.ts — register Effects in the collections array
- backend/api/v1/effects.ts — anonymous GET /v1/effects (key/label/thumb/order,
  prompt stays server-side)
- backend/lib/payload.ts — fetchActiveEffects() with 60s cache + normalizeEffect()
- backend/api/v1/stylize.ts — CMS-first lookup; STYLE_PROMPTS kept as seed-window
  fallback until the 4 launch effects are confirmed in Payload admin

Seed on first deploy: add clay / wood / 3d / scribble with prompts from
STYLE_PROMPTS in stylize.ts before disabling the hardcoded fallback.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
avatar-admin Ready Ready Preview, Comment Jun 23, 2026 3:14pm
avatars-api Ready Ready Preview, Comment Jun 23, 2026 3:14pm

Request Review

…ActiveEffects

payloadBase() is a v2-main helper that doesn't exist in origin/main's
payload.ts; fetchActiveEffects used it but origin/main's other fetch
functions use the inline PAYLOAD_API_URL.replace() pattern — align to fix
the TS2304 build error on the deploy branch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant