Internal Engineering Docs
Zelly Platform
Zelly is a multi-tenant e-commerce platform. Merchants get a custom storefront with on-demand HTTPS, a seller dashboard, and a full catalog/order management API. Each component is an independent service deployed on AWS ECS Fargate (backend) or Cloudflare (frontend/edge).
Repositories
All repos live as siblings in a workspace directory. There is no monorepo.
backend-api-fastify-nova
Core API. Handles orders, catalog, Shopify webhooks, Firebase auth, BullMQ queue publishing, and analytics event fan-out.
ECS Fargate · port 3000
customer-panel-neptune
Customer auth and session service. Handles SSO, login, signup, and session cookies for storefronts.
ECS Fargate · port 5174
internal-admin-panel-orion
Two parts: backend (NestJS API, port 3022) and frontend (React SPA). Internal staff dashboard for tenant management and analytics.
Backend: ECS Fargate · Frontend: Cloudflare Pages
store-events-consumer
BullMQ worker. Consumes
store-events queue from Redis and batch-inserts rows into ClickHouse for analytics.ECS Fargate · no ALB
storefront-astro-titan
Astro SSR storefront. Each merchant's custom domain gets on-demand TLS via Caddy. Caddy runs as a sidecar container in the same ECS task.
ECS Fargate + NLB · on-demand TLS
seller-panel-react-atlas
React + Vite SPA for merchant sellers. Talks to fastify-nova API. Deployed to Cloudflare Pages (not ECS).
Cloudflare Pages
zelly-checkout
Cloudflare Worker handling the checkout flow. Already deployed and managed separately — not in Terraform scope.
Cloudflare Workers
terraform
All AWS infrastructure as code. Modules for VPC, ECS, Aurora, Redis, ClickHouse, Caddy/EFS, Bastion/WireGuard. Also owns
local-dev/ and this documentation.Terraform · ap-south-1 (prod) · ap-southeast-1 (staging)
Architecture at a Glance
| Service | Tech | Deployment | Exposes |
|---|---|---|---|
| fastify-nova | Node.js / Fastify | ECS Fargate + ALB | HTTPS public API |
| customer-panel | Node.js | ECS Fargate + ALB | HTTPS auth API |
| orion-backend | Node.js / NestJS | ECS Fargate + ALB | HTTPS internal API |
| events-consumer | Node.js / BullMQ | ECS Fargate (no ALB) | Queue worker only |
| storefront | Astro SSR + Caddy | ECS Fargate + NLB | HTTP/HTTPS · on-demand TLS |
| seller-panel | React / Vite | Cloudflare Pages | Static SPA |
| orion-frontend | React / Vite | Cloudflare Pages | Static SPA |
| zelly-checkout | CF Workers | Cloudflare Edge | Edge checkout handler |
Data Stores
| Store | Engine | Where | Used By |
|---|---|---|---|
| Aurora MySQL | MySQL 8 Serverless v2 | RDS private subnet | fastify-nova, customer-panel, orion-backend |
| Redis | Redis 7 | ElastiCache | BullMQ queues, session caching |
| ClickHouse | ClickHouse 24.3 | EC2 t3.medium (private) | events-consumer writes, orion-backend reads |
Database Schemas
| Schema | Used By | Contents |
|---|---|---|
astro_primary | fastify-nova, orion-backend | Orders, catalog, tenants, Shopify config |
ecom_store_front | customer-panel, fastify-nova | Customers, sessions, addresses |
backoffice | orion-backend (analytics read) | Analytics aggregates, internal reporting |
BullMQ Queues
| Queue Name | Producer | Consumer | Purpose |
|---|---|---|---|
store-events | fastify-nova | events-consumer | Analytics events → ClickHouse |
SHOPIFY_WEBHOOK | fastify-nova | fastify-nova worker | Incoming Shopify webhook processing |
SHOPIFY_SETTINGS_PUSH | fastify-nova | fastify-nova worker | Push settings to Shopify |
SHOPIFY_SETTINGS_FETCH | fastify-nova | fastify-nova worker | Fetch settings from Shopify |
SHOPIFY_CATALOG_SYNC | fastify-nova | fastify-nova worker | Sync product catalog |
Quick Links
→ Local Development
Clone repos, set up the dev alias, start the full stack with docker-compose.
→ AWS Infrastructure
VPC layout, ECS services, Aurora, Redis, ClickHouse, staging vs production.
→ Service Catalog
Per-service details: purpose, env vars, ports, and inter-service calls.
→ Deployment & CI/CD
How images get built, pushed to ECR, and deployed to ECS via GitHub Actions.
→ Operations & Runbooks
Troubleshooting, common runbooks, CloudWatch logs, WireGuard VPN access.