Architecture Overview
Right Events is a multi-surface system built around a Next.js frontend and a Convex core backend, with a smaller FastAPI service used for selected backend integrations.
Core layers
1. Presentation layer
- Next.js 16 App Router
- Public marketing and discovery pages
- Organizer and admin dashboards
- Next.js API routes for webhooks, AI utilities, health, and gateway logic
2. Application and data layer
- Convex schema and functions in
convex/ - Realtime reads and mutations from the frontend
- Auth, access control, release metadata, and most business logic
3. Integration layer
- Payment providers: Paystack, Flutterwave, Stripe
- Resend for email auth and transactional mail
- Gemini and OpenRouter-backed AI paths
- Optional FastAPI backend for wallet, add-ons, moderation, and gateway-proxied endpoints
Request flow examples
Standard web flow
- Browser loads a Next.js route.
- Client components call Convex via
useQuery,useMutation, oruseAction. - Convex enforces auth and permissions and persists data.
- Next.js API routes are used only where HTTP-style integrations are needed.
Mobile gateway flow
- Mobile app calls
/api/mobile/backend/.... - Next.js gateway validates API key and allowed prefixes.
- Request is proxied to
BACKEND_URL. - Response is relayed back with diagnostic headers.
Release operations flow
- Railway deploy finishes.
- Post-deploy hook or runtime ingest sends metadata to
/railway/deployments/ingest. - Convex stores release history and makes it visible in admin release tooling.
Why the architecture is split this way
- Convex handles the product's state-heavy workflows well.
- Next.js owns rendering, route composition, and HTTP-facing integration points.
- FastAPI covers a narrower set of backend integrations that are easier to expose as traditional REST endpoints.