Local Development
The full Zelly stack runs on your machine via docker-compose. Aurora (MySQL) is NOT run locally — services connect to the publicly-accessible staging Aurora endpoint. Redis and ClickHouse run in local Docker containers.
npm install inside the two Vite frontend containers. Subsequent starts take seconds.Prerequisites
| Tool | Version | Notes |
|---|---|---|
| Docker Desktop | ≥ 4.30 | Must be running before any zdev command |
| Node.js | ≥ 22 | Use fnm or nvm |
| Git | any | SSH key must be set up for GitHub |
One-time machine setup
-
Clone all repos as siblings
All repos must live in the same parent directory. docker-compose uses relative paths between them.
bash — create workspacemkdir zelly && cd zelly git clone git@github.com:zelly-in/terraform.git git clone git@github.com:zelly-in/backend-api-fastify-nova.git git clone git@github.com:zelly-in/customer-panel-neptune.git git clone git@github.com:zelly-in/internal-admin-panel-orion.git git clone git@github.com:zelly-in/store-events-consumer.git git clone git@github.com:zelly-in/storefront-astro-titan.git git clone git@github.com:zelly-in/seller-panel-react-atlas.git git clone git@github.com:zelly-in/zelly-checkout.git # CF Worker — optionalExpected layout:
-
Add the shell alias
Add to your
~/.zshrc,~/.bashrc, or PowerShell profile. Run allzdevcommands from the workspace root.macOS / Linux (~/.zshrc)alias zdev='docker compose -f terraform/local-dev/docker-compose.yml --project-directory . --env-file terraform/local-dev/.env'
Windows PowerShell profile ($PROFILE)function zdev { docker compose -f terraform/local-dev/docker-compose.yml --project-directory . --env-file terraform/local-dev/.env @args }Reload your shell or open a new terminal after adding.
-
Add hosts entries
The local Caddy proxy routes
*.testdomains to the right container. Your OS needs to know they resolve to localhost.macOS / Linux (/etc/hosts)sudo sh -c 'echo "127.0.0.1 zelly-nova.test zelly-customer.test zelly-orion.test zelly.test zelly-bull.test zelly-redis.test zelly-seller.test zelly-admin.test" >> /etc/hosts'
Windows — open Notepad as Administrator, edit
C:\Windows\System32\drivers\etc\hosts, add: -
Free port 80 (Windows only)
IIS holds port 80 by default. Run once as Administrator:
cmd as Administratornet stop "World Wide Web Publishing Service" net stop "IIS Admin Service"
If neither service exists, skip this step.
-
Create
terraform/local-dev/.envThis is the single source of truth for all local credentials. docker-compose reads it via
--env-fileand injects values into every service.bash — from workspace rootcp terraform/local-dev/.env.example terraform/local-dev/.env # Open terraform/local-dev/.env and fill in: # DB_HOST — staging Aurora endpoint (from AWS console or terraform output) # DB_USER — root # DB_PASSWORD — get from team 1Password # Leave REDIS_PASSWORD and CLICKHOUSE_PASSWORD as-is (localredis / localclickhouse)Do NOT addDB_HOST,DB_USER, orDB_PASSWORDto individual service.envfiles. docker-compose injects them fromterraform/local-dev/.envvia theenvironment:block. Service.envfiles only contain service-specific config (JWT secrets, API keys).Service
.envfiles are optional — the stack boots without them (required: false). Copy only if you need to override a service-specific default. -
Place the Firebase service account for fastify-nova
fastify-nova uses Firebase Admin SDK for auth token verification. The JSON credentials file must exist at:
Get it from the team 1Password vault. The Dockerfile copies it into the image at build time. Without it, nova exits immediately with
ERR_MODULE_NOT_FOUND.
Starting the stack
From the workspace root:
zdev up # start everything, show logs zdev up -d # start detached (background)
Created, ClickHouse is still initialising — they will start automatically once it passes its healthcheck.Partial stacks
Service URLs
| URL | Service | Direct port (fallback) |
|---|---|---|
http://zelly-nova.test | fastify-nova API | localhost:3000 |
http://zelly-customer.test | Customer panel | localhost:5174 |
http://zelly-orion.test | Orion backend API | localhost:3022 |
http://zelly.test | Storefront (Astro) | localhost:4321 |
http://zelly-seller.test | Seller panel (React) | localhost:5173 |
http://zelly-admin.test | Orion frontend (React) | localhost:5175 |
http://zelly-bull.test | BullMQ dashboard | localhost:3001 |
http://zelly-redis.test | RedisInsight | localhost:5540 |
Common operations
View logs
Rebuild after code changes
Vite services (seller-panel, orion-frontend) reload automatically via HMR — no rebuild needed. For backend services with a Dockerfile:
Open a shell inside a container
Stopping and resetting
Remove only frontend node_modules volumes
Forces a fresh npm install on next start without touching Redis or ClickHouse data:
Changing local domain names
Domain names default to *.test but can be overridden in terraform/local-dev/.env:
After changing: update your hosts file and run zdev down && zdev up.