Skip to content

Architecture Overview

Purpose

Orient a contributor to how this monorepo's code, Cloudflare Workers, and data layer fit together, before diving into an individual how-to page.

The path from commit to running application

Developer
   |
   v
GitHub
   |
   +--(PR)-->  ci.yml "validate"       (npm install, style-drift check, build all 7 apps,
   |                                     typecheck workers/api, vitest)
   |
  (merge to main)
   |
   v
ci.yml "deploy-production"    (automatic, gated on validate passing)
   |
   +--> Apply D1 migrations
   +--> Deploy API Worker
   +--> Deploy Corporate, Software, Logistics, Commerce, Embroidery, Admin
   |     (6 of 7 apps - Investors is NOT part of this automatic job, see below)
   +--> Production smoke test (7 public endpoints, read-only GET)
   |
   v
Cloudflare
   |
   +--> 7 Worker Static-Assets deployments (one per app, one domain each)
   +--> 1 API Worker  --bindings-->  D1 (akshaya-group-global)
   |                   \-bindings-->  R2 (akshaya-group-global-files)
   |                   \-binding--->  Email (send_email, notification address)
   +--> 2 of the 7 apps (Corporate, Software) also run their OWN Worker-side routes
        (/customer-portal*, /api/customer/*, /freelancer-portal*, /api/freelancer/*)
        via run_worker_first - not pure static assets
   +--> Admin runs run_worker_first: true - the entire app routes through its Worker

This is the actual, current pipeline - verified by reading .github/workflows/ci.yml, .github/workflows/deploy-cloudflare.yml, and every wrangler.jsonc directly, not assumed from the README.

Pages in this section

  • Platform - Cloudflare Workers, Static Assets, D1, R2, how they compose.
  • Monorepo - apps/, packages/, workers/, npm workspaces, shared packages.
  • Applications - the 7 apps, their domains, and what's undocumented elsewhere in this repository.
  • Data Platform - D1 schema/migrations and R2, at the architecture level (operational commands live under Operations).

What this portal does not claim exists

  • No staging environment. docs/DEPLOYMENT.md states this explicitly: "There is no staging environment - main is production." Confirmed by ci.yml: the only trigger for deploy-production is push to main.
  • No PR preview deployments. ci.yml's validate job runs on PRs but never deploys anything - enforced by deploy-production's own if: github.event_name == 'push' condition.
  • No Kubernetes, no Terraform, no VM-based infrastructure of any kind - this is a pure Cloudflare Workers platform. Documentation patterns from other Akshaya projects that assume a Kubernetes/Terraform stack do not apply here.
  • No automated rollback - by design, documented in docs/DEPLOYMENT.md and summarized in Operations → Rollback.