Skip to main content

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

  1. Browser loads a Next.js route.
  2. Client components call Convex via useQuery, useMutation, or useAction.
  3. Convex enforces auth and permissions and persists data.
  4. Next.js API routes are used only where HTTP-style integrations are needed.

Mobile gateway flow

  1. Mobile app calls /api/mobile/backend/....
  2. Next.js gateway validates API key and allowed prefixes.
  3. Request is proxied to BACKEND_URL.
  4. Response is relayed back with diagnostic headers.

Release operations flow

  1. Railway deploy finishes.
  2. Post-deploy hook or runtime ingest sends metadata to /railway/deployments/ingest.
  3. 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.

Where to go next