Ezzy

Announcements

Pop-up and carousel announcements linked to blog posts.

Announcements surface a blog post as a pop-up and/or in a carousel. Each announcement links to one blog and can have separate media (images) for pop-up and carousel. Templates (e.g. React Native) consume the public API to show them.

Data model

  • announcements — One row per announcement: blogId, projectId, status (active/inactive), popUpMediaId, carouselMediaId (Convex file storage IDs).
  • carouselAnnouncements — Order of items in the carousel: projectId, announcementId, position.
  • popUpAnnouncements — At most one pop-up per project: projectId, announcementId, mediaId.

Convex API (convex/announcements.ts)

  • listAnnouncements — Active and inactive announcements for a project (with blog data).
  • createAnnouncement — Create with optional addToCarousel.
  • updateAnnouncement — Update status and media.
  • reorderCarousel — Set carousel order by position array.
  • getPopUpAnnouncementByProjectId — Used by API route: returns pop-up media URL and linked blog/announcement for a project (via project-scoped API key).
  • getCarouselAnnouncementsByProjectId — Ordered carousel items with media URLs for API.

Public API

  • GET /api/v1/announcements/popup — Returns the project's pop-up announcement (media + optional link). Headers: X-API-Key or Authorization: Bearer <key>.
  • GET /api/v1/announcements/carousel — Returns carousel items in order. Same auth.

App usage

In Announcement (project → Announcement) you create announcements from existing blogs, upload pop-up/carousel images, toggle active/inactive, and reorder the carousel.