FlowGuard is an operational intelligence dashboard that connects Slack, Jira, and GitHub signals to detect process leaks, recommend actions, and keep a decision audit trail in a Git-style ledger.
- Detects leak patterns such as cycle-time drift, PR review bottlenecks, reopen spikes, and unlogged action items.
- Surfaces AI-assisted diagnosis and suggested actions.
- Supports approval workflows before executing remediation.
- Provides a Git Ledger (tree + graph) to trace decisions, leaks, ownership, and evidence links.
- Tracks team and project-level health and activity over time.
| Service | Path | Default Port | Responsibility |
|---|---|---|---|
| Frontend | src/ |
8080 (dev) |
Dashboard UI (React + Vite) |
| API | apps/api |
3001 |
REST APIs, auth, webhook ingestion, ledger routes |
| Worker | apps/worker |
n/a | Scheduled jobs for metrics, leak detection, digests, nudges, decision capture, and AI automation |
| Shared Types | packages/shared |
n/a | Shared schemas and types |
| Infra | infra/docker-compose.yml |
n/a | Postgres + Redis local dependencies |
- React 18 + TypeScript + Vite
- TanStack Query
- Tailwind CSS + shadcn/ui
- Express + PostgreSQL + Redis + BullMQ
- Vitest + Playwright
- Onboarding:
docs/onboarding/onboarding.md - Feature and endpoint reference:
docs/api/feature-and-endpoint-reference.md - Swagger UI:
http://localhost:3001/docs/swagger - OpenAPI JSON:
http://localhost:3001/docs/openapi.json
The current schema goes beyond the original MVP. The diagram below reflects the live migration set in apps/api/src/db/migrations.
erDiagram
companies ||--o{ integrations : has
companies ||--o{ teams : owns
companies ||--o{ projects : owns
companies ||--o{ events : ingests
companies ||--o{ metric_snapshots : computes
companies ||--o{ leak_instances : detects
companies ||--o{ ledger_commits : records
companies ||--o{ proposed_actions : proposes
companies ||--o{ executed_actions : audits
companies ||--o{ entity_links : links
companies ||--o{ inferred_links : infers
companies ||--o{ ledger_routes : stores
companies ||--o{ ledger_route_dispatches : audits
teams ||--o{ projects : groups
teams ||--o{ events : scopes
teams ||--o{ leak_instances : scopes
teams ||--o{ ledger_commits : scopes
teams ||--o{ proposed_actions : scopes
teams ||--o{ inferred_links : scopes
teams ||--o{ user_identity_map : maps
projects ||--o{ events : scopes
projects ||--o{ leak_instances : scopes
projects ||--o{ ledger_commits : scopes
projects ||--o{ ledger_routes : scopes
leak_instances ||--o{ ledger_commits : triggers
leak_instances ||--o{ proposed_actions : drives
proposed_actions ||--o{ executed_actions : executes
ledger_commits ||--o{ ledger_edges : emits
ledger_routes ||--o{ ledger_route_dispatches : dispatches
Schema groups:
- Operational state:
companies,integrations,teams,projects - Signal ingestion:
events - Analysis:
metric_snapshots,leak_instances - Decisions and audit:
ledger_commits,ledger_edges,proposed_actions,executed_actions - Graph intelligence:
entity_links,inferred_links,user_identity_map - Saved review packets:
ledger_routes,ledger_route_dispatches
- Node.js 18+
- npm 9+
- Docker + Docker Compose
git clone <your-repo-url>
cd FlowGuard
npm installnpm run infra:upCopy the sample env file:
cp .env.example .envMinimum vars for local development:
DATABASE_URL=postgresql://flowguard:flowguard@localhost:5432/flowguard
REDIS_URL=redis://localhost:6379
API_PORT=3001
NODE_ENV=development
ADMIN_API_KEY=Optional frontend env vars (if you want explicit API URL/key wiring):
VITE_API_URL=http://localhost:3001
VITE_API_KEY=Notes:
- In development, if
ADMIN_API_KEYis empty, dashboard auth is skipped. - If you set
ADMIN_API_KEY, setVITE_API_KEYto the same value so the frontend can authenticate.
npm run db:migratenpm run seed:devRun in separate terminals:
# API
npm run dev:api# Frontend
npm run dev -- --host 0.0.0.0 --port 8080# Optional: worker for scheduled/background jobs
npm run dev:workerOpen:
- App:
http://localhost:8080/app - API health:
http://localhost:3001/health - Swagger UI:
http://localhost:3001/docs/swagger
What it does:
- Shows current health score, active leaks, estimated hours lost, events, and pending approvals.
- Gives team-level health comparisons and integration status.
How to use:
- Open
/app. - Check active leak count and cost estimate.
- Use scope selection (sidebar) to narrow by team.
What it does:
- Lists detected leaks with severity, confidence, evidence, and AI explanation.
- Supports filtering by type/status and dismissing false positives.
How to use:
- Filter by leak type and status.
- Expand a leak card to inspect metric context and evidence links.
- Dismiss false positives with a rationale when needed.
What it does:
- Shows proposed remediation actions.
- Lets reviewers approve or reject actions with rationale.
How to use:
- Filter to
pending. - Inspect payload preview and risk metadata.
- Approve or reject with optional reviewer rationale.
Two views:
- Tree view: chronological and structured decision history.
- Graph view: relationship map of commits, leaks, teams, and linked entities.
Graph interactions:
- Zoom: mouse wheel or trackpad pinch on graph canvas.
- Zoom controls:
-/+toolbar buttons. - Reset: resets zoom and layout.
- Drag: drag nodes to inspect dense clusters.
- Focus lock: click nodes to lock focus context.
- Multi-focus: enable to lock multiple nodes in sequence.
- Focus order tracker: right panel shows click order and supports
Set Lastto reorder anchor. - Route tools: save, restore, rename, delete, copy review packet, and dispatch review packet.
What it does:
- Displays Golden Rules metrics over configurable date ranges.
- Supports team-compare mode and anomaly markers.
How to use:
- Select timeframe (7/14/30/90 days).
- Toggle compare mode for cross-team baseline comparison.
- Enable/disable metric series to isolate trends.
What it does:
- CRUD management for teams.
- Shows per-team project count, events, and active leaks.
How to use:
- Create a team with name/slug/color.
- Edit details or delete obsolete teams.
What it does:
- CRUD management for projects and tool mappings.
- Maps Jira project keys, GitHub repos, and Slack channels to project scope.
- Activity page shows connected tools, health snapshot, and recent project activity graph.
How to use:
- Create a project and attach Jira/GitHub/Slack identifiers.
- Open a project card to view activity and metrics context.
What it does:
- Shows system health and database counts.
- Displays configured integration statuses and company settings.
How to use:
- Click
Refreshin System Health. - Check integration status and installation metadata.
Use the helper script to patch company settings and upsert integration metadata/tokens:
npm run admin:bootstrapScript path: scripts/bootstrap-admin.sh
Common env vars used by the script include:
ADMIN_API_KEYDIGEST_USER_IDS,DIGEST_CHANNEL_IDSSLACK_BOT_TOKENJIRA_ACCESS_TOKENGITHUB_ACCESS_TOKEN
| Command | Purpose |
|---|---|
npm run dev |
Start frontend dev server |
npm run dev:api |
Start API server |
npm run dev:worker |
Start worker |
npm run build |
Build frontend |
npm run build:api |
Build API |
npm run lint |
Lint workspace |
npm run test |
Run unit tests |
npm run test:e2e |
Run Playwright E2E tests |
npm run seed:dev |
Seed development dataset |
npm run db:migrate |
Run DB migrations |
npm run infra:up |
Start Postgres + Redis |
npm run infra:down |
Stop Postgres + Redis |
- Confirm API is running:
npm run dev:api - Confirm port 3001 is open.
- Run migrations:
npm run db:migrate - Seed data:
npm run seed:dev
- If
ADMIN_API_KEYis set, ensureVITE_API_KEYmatches it.
- Ensure Redis is up (
npm run infra:up) and worker is started (npm run dev:worker).
apps/
api/ Express API + routes + services + migrations
worker/ BullMQ workers and scheduled jobs
packages/
shared/ Shared schemas/types
src/ Frontend app (pages/components/hooks)
scripts/ Seed/bootstrap/tunnel helper scripts
infra/ Docker compose + DB init
tests/ Playwright E2E tests
- Detailed onboarding:
docs/onboarding/onboarding.md - V2 design and tracking docs:
docs/v2/