Appearance
Architecture Overview
Jubiloop is a monorepo with three deployable applications, a local-only UI prototype, shared packages, and infrastructure code. The backend is a modular AdonisJS application rather than a set of independently deployed microservices.
text
Cloudflare
+----------------+----------------+
| | |
React webapp Next.js marketing DNS and edge
(Pages) (OpenNext Worker) proxy
| | |
+---------- API requests ----------+
|
Caddy on API droplet
|
AdonisJS server
/ \
PostgreSQL RedisApplication Boundaries
| Component | Responsibility | Runtime |
|---|---|---|
apps/webapp | Authenticated React SPA | Cloudflare Pages |
apps/marketing | Public Next.js site and Sanity-backed content | Cloudflare via OpenNext |
apps/server | REST API, business logic, validation, and persistence | Docker on DigitalOcean |
apps/ui-prototype | Mock-data design and interaction prototypes | Local only |
packages/* | Shared UI, auth client, API primitives, logging, and tooling | Consumed by applications |
Data And Request Flow
Cloudflare serves both frontends and proxies API traffic to Caddy. Caddy terminates API TLS and routes traffic to the AdonisJS container. PostgreSQL stores application data. Redis stores Better Auth secondary data, AdonisJS sessions when the Redis session driver is selected, and rate-limiter counters when the Redis limiter store is selected.
Development and QA share one droplet but use separate API, PostgreSQL, and Redis containers. Production uses a dedicated API droplet, its own Redis container, and DigitalOcean Managed PostgreSQL. See Deployment Overview for the current topology and Environments for addresses and isolation.
Architecture Principles
- Keep deployable units few and operationally understandable.
- Isolate environment data and credentials even where compute is shared.
- Use managed infrastructure for production data and simple containers for replaceable services.
- Keep application and infrastructure configuration in
infra/deploy/env.deploy.yml; keep CI-only controls in GitHub repository settings. - Scale from observed load and operational needs, not speculative user-count tiers.