feat: native poster creation#225
Conversation
and fixed route inconsistency in local poster controller
We wanted to put enabled as part of the carousel system right? there is no global notion of enabled or not.
Basic CRUD done!
This change does break the client as it still expects the Poster model
Now deletes old and fetches new trello posters every 15 minutes. TODO: add button maybe
Needs good test instance to verify
…trello-replacement
Gijsdeman
left a comment
There was a problem hiding this comment.
Good initiative 😎
There are some concerns in the services that should be addressed, but I also left some general suggestions for optimizations and refactors with the goal of brevity or legibility. Those are in principle optional, but should make the code easier to maintain in the long term.
These are all small immediate improvements, mostly just better typescript. The larger suggestions will be handled separately. Co-authored-by: Gijs de Man <43375368+Gijsdeman@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a native, database-backed poster system (including carousel ordering) intended to replace/augment the existing Trello-based poster flow, with migrations + seeding and new management endpoints.
Changes:
- Introduces
PosterandCarouselDB entities with a migration that converts existinglocal_posterrows intoposterrows. - Adds poster CRUD/media-upload endpoints and updates static/carousel handlers/controllers to use the new poster service + ordering.
- Refactors Trello sync to reconcile Trello cards into DB posters behind a
Poster.Trellofeature flag, and adds seeding for default GEWIS posters.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/seed/seedGewis.ts | Adds seedPosters() to seed default GEWIS poster definitions. |
| src/seed/index.ts | Adds a --gewis-posters seeding mode and runs poster seeding in --gewis. |
| src/modules/timed-events/cron-manager.ts | Switches timed-event static poster selection to the new PosterService. |
| src/modules/handlers/screen/poster/trello/trello-poster-storage.ts | Removes old Trello attachment-to-disk storage implementation. |
| src/modules/handlers/screen/poster/trello/trello-poster-manager.ts | Refactors Trello sync to create/update/delete DB-backed posters. |
| src/modules/handlers/screen/poster/static/static-poster-controller.ts | New controller for static poster handler state, clock, and show/hide actions. |
| src/modules/handlers/screen/poster/static-poster-handler.ts | Updates handler state typing to use PosterResponse. |
| src/modules/handlers/screen/poster/poster.ts | Removes legacy in-memory poster type definitions. |
| src/modules/handlers/screen/poster/poster-screen-handler-settings.ts | Adds Poster.Trello setting with default. |
| src/modules/handlers/screen/poster/poster-manager.ts | Removes legacy poster manager abstraction. |
| src/modules/handlers/screen/poster/local/poster.ts | Adds new Poster TypeORM entity + enums. |
| src/modules/handlers/screen/poster/local/poster-service.ts | Adds DB + media storage service for posters (create/update/delete/attach). |
| src/modules/handlers/screen/poster/local/poster-controller.ts | Adds CRUD + media upload + update endpoints for posters. |
| src/modules/handlers/screen/poster/local/local-poster.ts | Removes legacy LocalPoster entity. |
| src/modules/handlers/screen/poster/local/local-poster-service.ts | Removes legacy LocalPosterService. |
| src/modules/handlers/screen/poster/local/local-poster-controller.ts | Removes legacy local poster endpoints. |
| src/modules/handlers/screen/poster/local/local-carousel.ts | Adds Carousel entity to persist poster ordering. |
| src/modules/handlers/screen/poster/local/carousel-poster-service.ts | Adds service to get/set carousel poster order. |
| src/modules/handlers/screen/poster/carousel-poster-handler.ts | Updates handler to use PosterService instead of a poster manager. |
| src/modules/handlers/screen/poster/carousel-poster-controller.ts | Adds endpoints for carousel order + poster enable toggling, and switches to DB posters. |
| src/migrations/1781087463209-PosterMigration.ts | Creates new tables and migrates local_poster rows into poster rows. |
| src/index.ts | Initializes Trello sync at startup when configured + feature enabled. |
| src/database.ts | Registers new entities and migration. |
| package.json | Updates migration/seed scripts and adds seed:gewis-posters. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Description
Adds an alternative to all functionality currently provided by the trello system.
Related issues/external references
#193
GEWIS/aurora-client#157
GEWIS/aurora-backoffice#154
Types of changes
Breaking changes
Due to major changes to the API endpoints involving the poster systems, this breaks compatibility with clients and backoffice on previous versions.
Migration
GEWIS:
pnpm migrateto setup the database.pnpm seed:gewis-postersto seed the special posters.Hubble:
No
pnpm seed:hubble-postersis included in this pr, to maintain access to e.g. the NS poster a way to create an entry for it has to be enabled. Other than that its the same procedure.