← Back
Belour
A digital invitation platform for events like weddings and birthday celebrations. Share one link and manage RSVPs, seating and costs in one place.
Live ↗
What it does
- Invitation editor: start from a starter design, then move, resize and rotate text, images and illustrations, and pick fonts, colours and gradients. The preview is exactly what guests will see.
- RSVPs and seating: guests reply on the invitation page. Hosts review and edit replies, drag guests onto tables, and export the seating plan to PDF or Excel.
- Costs: track the expenses for the event in one place.
- Six languages: the app and each invitation can be translated, so guests read it in their own language, with dates formatted per language.
- Calendar: guests add the event to their calendar with one click.
- Payments and accounts: designing is free, and hosts pay once through Paddle when they publish. Account deletion is self-service and also removes uploaded images.
Architecture
Every feature follows the same path: React UI → API route → domain layer → PostgreSQL. Keeping it boring means a new feature always touches the same layers in the same order.
- The client only renders UI. Reads and writes go through React Query hooks that call thin fetch wrappers.
- API routes check the session, validate input with Zod and call the domain layer. They hold no business logic.
- The domain layer is server-only and owns the business rules and Drizzle queries. The database is the single source of truth, and types flow from the schema to the UI.
- Errors are typed. Every failure is an AppError whose code maps to an HTTP status on the server and to a translated message on the client. Unexpected errors are reported to Sentry.
Key decisions
- The editor renders real DOM, not a canvas. A design is JSON (a theme plus a list of elements) on a fixed 600×1000 artboard. Positions and sizes are artboard units scaled with CSS container query units, so the card scales evenly from phone to desktop without measuring anything in JavaScript. The editor wraps the same renderer guests see with react-moveable, so what you design is what gets published.
- User styles are validated, not trusted. Theme values end up in a style block, so raw strings would be a CSS injection risk. The theme is a Zod-validated structure (hex colours, fonts from a registry, gradients as from/to/angle), and the CSS is built on the server.
- Seating changes are saved as a diff. The board used to collect separate add, update and remove lists, so moving the same guest twice could end differently depending on the order the server applied them. The client now keeps one guest-to-table map next to the state it loaded, and the save payload is the difference between the two.
- Images are deleted before database rows. Data lives in PostgreSQL and Cloudinary, with no transaction across the two. Deleting from Cloudinary first means a failure leaves nothing changed and the user can simply retry. Each invitation has its own upload folder, so deleting an invitation removes exactly its images.
Stack
Next.js
TypeScript
PostgreSQL
Drizzle ORM
NextAuth
React Query
Zod
Tailwind CSS
shadcn/ui
next-intl
Cloudinary
Paddle
Sentry