FOREX Dev Workflow
Dev Environment Components
The local development stack consists of:
- PostgreSQL — Shared database server (each service uses its own schema/database)
- Temporal Server — Workflow engine + Temporal UI (visible at
http://localhost:8233) - Customer Profile Service — Go service on port
8081 - Trading Book Service — Go service on port
8082 - Trade Capture Worker — Temporal worker process (no HTTP port, connects to Temporal server)
- Portal — Angular dev server on port
4200
DevOps/Local Scripts
All scripts are in DevOps/Local/:
| Script | Purpose |
|---|---|
docker-all-run.sh |
Build Docker images and start all containers via Docker Compose. Accepts --no-build to skip image builds. |
docker-all-shutdown.sh |
Gracefully stop and remove all containers and networks. Accepts --volumes to also delete persistent data. |
stop.sh |
Quick-stop containers without removing them (can resume with docker compose start). |
status.sh |
Display running container status, ports, and health. Prints URLs for Temporal UI and Portal. |
Root package.json Scripts
The root package.json provides a single entry point for all operations:
| npm Script | Delegates To | Purpose |
|---|---|---|
start:all |
DevOps/Local/docker-all-run.sh |
Build and start the full stack |
stop:all |
DevOps/Local/docker-all-shutdown.sh |
Stop and remove all containers |
stop |
DevOps/Local/stop.sh |
Quick-stop without removal |
status |
DevOps/Local/status.sh |
Show container status |
Adding a New Microservice to the Stack
When adding a new microservice:
- Create the service directory under
Backend/Services/<service-name>/. - Add a
Dockerfileto the service directory. - Add the service to
docker-compose.ymlwith its port, environment variables, and database dependency. - Add corresponding start/health-check entries in the DevOps scripts if needed.
- Add npm script aliases in root
package.jsonif the service needs individual start/stop control. - Update
DevOps/Local/status.shto include the new service's URL.
Detailed Reference
For full environment setup instructions and Docker Compose configuration details, read references/dev-environment.md.
Source: javakishore-veleti/FOREX-Position-Risk-Manager-Workflows — distributed by TomeVault.