Skip to content

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        Redis

Application Boundaries

ComponentResponsibilityRuntime
apps/webappAuthenticated React SPACloudflare Pages
apps/marketingPublic Next.js site and Sanity-backed contentCloudflare via OpenNext
apps/serverREST API, business logic, validation, and persistenceDocker on DigitalOcean
apps/ui-prototypeMock-data design and interaction prototypesLocal only
packages/*Shared UI, auth client, API primitives, logging, and toolingConsumed 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.

Built with ❤️ by the Jubiloop team