The /compare/socialbee page shipped last round already claims Postiz
supports recycle-after-days evergreen content rotation, but the feature
didn't exist beyond an unused EvergreenRecycle Prisma model and a
RECYCLE enum value an earlier session had added and never wired up.
Built it for real so that claim is true.
- EvergreenRepository/EvergreenService (mirrors the existing
PostEngagementRepository/Service pattern) - create/list/pause/
resume/remove a recycle schedule for an already-published post, plus
a bounded (25/run) runDueBatch() that clones a due post's
content/media/settings into a brand-new Post (own id/group/Comments
thread, CreationMethod.RECYCLE) through the same validatePosts ->
mapTypeToPost -> createPost pipeline every other post-creation path
uses. A failed entry is pushed one interval out instead of retried
immediately; a schedule whose original post was deleted deactivates
itself.
- New daily Temporal workflow evergreenRecycleWorkflow, modeled on the
existing bestTimeToPostWorkflow infinite-loop pattern.
- POST|GET /posts/:id/evergreen and PUT|DELETE /posts/evergreen/:id;
only an already-PUBLISHED post can get a recycle schedule.
- Frontend: a recycle-icon calendar action (published posts only)
opening a modal to view/add/pause/remove recycle schedules.
Verified apps/backend, apps/orchestrator (nest build) and apps/frontend
(full production next build) all build clean with the already-generated
Prisma client.