Monorepo Orchestration
A comprehensive reference for developers to manage the Elo Orgânico monorepo, infrastructure, and automation.
Running the Platform
We use Turborepo and Docker Compose to orchestrate applications and their respective local infrastructure (databases and cache) in unified scripts.
- Community Instance
- Global Portal
- Documentation
- Start Dev Stack:
pnpm instance:dev(Starts local databases in Docker, then runs Web and API on the host) - Stop & Kill Ports:
pnpm instance:down(Stops database containers and releases ports 3000 and 5173) - Reset Infrastructure:
pnpm instance:reset(Stops, wipes MongoDB/Redis data volumes, and rebuilds containers)
- Start Dev Stack:
pnpm portal:dev(Starts local databases in Docker, then runs Web and API on the host) - Stop & Kill Ports:
pnpm portal:down(Stops database containers and releases ports 3001 and 5174) - Reset Infrastructure:
pnpm portal:reset(Stops, wipes MongoDB/Redis data volumes, and rebuilds containers)
- Start Dev Server:
pnpm docs:dev(Starts local Docusaurus server at port 3002) - Build Documentation:
pnpm docs:build(Compiles static Docusaurus site files)
Infrastructure (Docker)
The project uses two Compose files per bounded context with strictly separated responsibilities.
Development Infrastructure (compose.dev.yaml)
Starts only the local infrastructure services. Applications run on the host via pnpm *:dev.
| Scope | Command | Description |
|---|---|---|
| Instance | pnpm instance:up | Starts MongoDB (Replica Set) and Redis for Instance. |
| Instance | pnpm instance:down | Stops Instance containers and kills ports 3000, 5173. |
| Instance | pnpm instance:reset | Wipes volumes and restarts Instance infrastructure. |
| Portal | pnpm portal:up | Starts MongoDB (Replica Set) and Redis for Portal. |
| Portal | pnpm portal:down | Stops Portal containers and kills ports 3001, 5174. |
| Portal | pnpm portal:reset | Wipes volumes and restarts Portal infrastructure. |
Production & Staging Stack (compose.prod.yaml)
Builds and deploys the full application stack (API + Web/Nginx + Redis). No MongoDB — production connects to MongoDB Atlas. Production and staging reuse the same Compose file; only the --env-file differs.
| Scope | Command | Description |
|---|---|---|
| Instance | pnpm instance:prod | Builds and starts Instance stack with .env.prod. |
| Instance | pnpm instance:staging | Same stack with .env.staging (staging Atlas cluster). |
| Instance | pnpm instance:prod:down | Stops the Instance production/staging stack. |
| Portal | pnpm portal:prod | Builds and starts Portal stack with .env.prod. |
| Portal | pnpm portal:staging | Same stack with .env.staging. |
| Portal | pnpm portal:prod:down | Stops the Portal production/staging stack. |
Workspace Management
Handling internal dependencies, catalogs, compilation checks, and linting.
Global Orchestration (Turborepo)
These commands execute in parallel across all active monorepo workspaces using the settings defined in turbo.json:
- Typecheck All Workspaces:
pnpm typecheck(Runsturbo run typecheckin parallel) - Lint All Workspaces:
pnpm lint(Runsturbo run lintin parallel) - Clean node_modules:
pnpm clean(Runsnpkillto reclaim storage) - Add Dependency to Catalog:
pnpm add <package> --catalog - Add Dependency to Specific App:
pnpm add <package>@catalog: --filter <package-name>
Workspace-Specific Checks
Run typechecks or linting only for a specific context boundary:
| Context | Typecheck Command | Lint Command |
|---|---|---|
| Instance | pnpm instance:typecheck | pnpm instance:lint |
| Portal | pnpm portal:typecheck | pnpm portal:lint |
| Studio | pnpm studio:typecheck | pnpm studio:lint |
| Tools | pnpm tools:typecheck | pnpm tools:lint |
We use eslint-plugin-prettier to integrate Prettier rules directly into ESLint for .ts, .tsx, .js, and .jsx files. Running any of the lint commands above will validate code quality and format code in a single step. Direct prettier CLI formatting is reserved for .json, .yaml, .md, and .mdx files.
AI & Studio (MCP)
Orchestrating the Model Context Protocol and design bridge.
- Penpot Studio:
pnpm penpot:up/pnpm penpot:down - Aide AI Bridge:
pnpm penpot:aide:up/pnpm penpot:aide:down - Context7 Search: (Via AI Agent) Deep research into documentation.
Build Pipelines
- Full Build:
pnpm build - Build Core (Instance):
pnpm --filter @elo-instance/core build - Build Core (Portal):
pnpm --filter @elo-portal/core build
Last Updated: June 2026