Development & Repositories
Firebreak is structured as an npm workspaces monorepo managed by Turborepo, allowing atomic changes across frontend, MCP tools, and shared domain logic.
3 min read
•Production Verified
Repository Layout
The repository divides responsibilities cleanly between user applications and shared packages:
Directory Structure
firebreak/
├── apps/
│ ├── web/ # Next.js 16 Web Dashboard & Inngest Runner (Port 3000)
│ └── mcp/ # NitroStack Model Context Protocol Server (Port 3001)
├── packages/
│ ├── core/ # Shared Drizzle ORM, Bisection Engine, Adapters, Crypto
│ └── fixtures/ # Demo break/fix automation scripts and webhook tests
├── scripts/ # Root deployment hooks (prepare-nitrocloud.mjs)
├── package.json # Root manifest & orchestrator scripts
└── turbo.json # Turborepo task pipeline rulesVerified Developer Scripts
| Command | Action | Description |
|---|---|---|
| npm run dev | turbo run dev | Starts Next.js (3000), MCP (3001), and core tsup watcher in parallel. |
| npm run build:all | turbo run build | Full topological build of all packages and static widgets. |
| npm run build | NitroCloud build | Builds core, compiles MCP, and stages root files via prepare-nitrocloud.mjs. |
| npm run typecheck | turbo run typecheck | Strict TypeScript check (tsc --noEmit) across all packages. |
| npm run test | turbo run test | Executes Vitest unit and integration test suites in packages/core. |
| npm run lint | turbo run lint | Runs ESLint code quality checks. |
| npm run fixture:break | Demo Buster | Pushes 3 commits with a bug to GitHub and waits for 500. |
| npm run fixture:fire | Alert Dispatcher | Sends HMAC-signed alert webhook to trigger incident room. |
| npm run fixture:reset | Demo Reset | Restores healthy status and clears demo incidents. |