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

ServiceTechDeploymentExposes
fastify-novaNode.js / FastifyECS Fargate + ALBHTTPS public API
customer-panelNode.jsECS Fargate + ALBHTTPS auth API
orion-backendNode.js / NestJSECS Fargate + ALBHTTPS internal API
events-consumerNode.js / BullMQECS Fargate (no ALB)Queue worker only
storefrontAstro SSR + CaddyECS Fargate + NLBHTTP/HTTPS · on-demand TLS
seller-panelReact / ViteCloudflare PagesStatic SPA
orion-frontendReact / ViteCloudflare PagesStatic SPA
zelly-checkoutCF WorkersCloudflare EdgeEdge checkout handler

Data Stores

StoreEngineWhereUsed By
Aurora MySQLMySQL 8 Serverless v2RDS private subnetfastify-nova, customer-panel, orion-backend
RedisRedis 7ElastiCacheBullMQ queues, session caching
ClickHouseClickHouse 24.3EC2 t3.medium (private)events-consumer writes, orion-backend reads

Database Schemas

SchemaUsed ByContents
astro_primaryfastify-nova, orion-backendOrders, catalog, tenants, Shopify config
ecom_store_frontcustomer-panel, fastify-novaCustomers, sessions, addresses
backofficeorion-backend (analytics read)Analytics aggregates, internal reporting

BullMQ Queues

Queue NameProducerConsumerPurpose
store-eventsfastify-novaevents-consumerAnalytics events → ClickHouse
SHOPIFY_WEBHOOKfastify-novafastify-nova workerIncoming Shopify webhook processing
SHOPIFY_SETTINGS_PUSHfastify-novafastify-nova workerPush settings to Shopify
SHOPIFY_SETTINGS_FETCHfastify-novafastify-nova workerFetch settings from Shopify
SHOPIFY_CATALOG_SYNCfastify-novafastify-nova workerSync 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.