# suresh-saz/dev-work architecture

> Architecture diagram of the GitHub repository suresh-saz/dev-work, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/suresh-saz/dev-work
- Repository: https://github.com/suresh-saz/dev-work

## Overview

This is a developer workspace SaaS combining authentication, workspace/project planning, GitHub repository activity, AI code review, and monitoring. Users register or log in, then work in a workspace to manage projects and tasks, connect repository activity, request AI reviews, and inspect review/build/event metrics. The API gateway fronts the backend services. The graph preserves documented product branches, but several route, UI, and service integrations are unsampled; those links are omitted or marked unverified rather than inferred from names alone.

Main entry points: [`services/api-gateway/src/config/proxy.config.ts`](https://github.com/suresh-saz/dev-work/blob/main/services/api-gateway/src/config/proxy.config.ts) (Service routing), [`frontend/app/register/page.tsx`](https://github.com/suresh-saz/dev-work/blob/main/frontend/app/register/page.tsx) (Auth screens), [`services/ai-service/services/review_service.py`](https://github.com/suresh-saz/dev-work/blob/main/services/ai-service/services/review_service.py) (Review orchestration), [`services/project-service/src/controllers/project.controller.ts`](https://github.com/suresh-saz/dev-work/blob/main/services/project-service/src/controllers/project.controller.ts) (Project endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_web["Workspace UI"]
  node_auth_ui["Auth screens<br/>[page.tsx]"]
  node_auth_state["Auth state<br/>[auth.store.ts]"]
  node_auth_hook["Auth hook<br/>[useAuth.ts]"]
  node_api_client["API client<br/>[api-client.ts]"]
end

subgraph group_gateway["API entry"]
  node_gateway_app["Gateway proxy<br/>[app.ts]"]
  node_gateway_routes["Service routing<br/>[proxy.config.ts]"]
end

subgraph group_identity["Identity"]
  node_auth_controller["Auth endpoints<br/>[auth.controller.ts]"]
  node_auth_logic["Auth operations<br/>[auth.service.ts]"]
  node_user_store[("User records<br/>[user.model.ts]")]
end

subgraph group_workspace["Workspace planning"]
  node_project_api["Project endpoints"]
  node_planning["Workspace and planning"]
end

subgraph group_integrations["Code integrations"]
  node_github_api["Repository and webhook API"]
  node_webhook_logic["Webhook processing<br/>[webhook.service.ts]"]
  node_ai_api["AI review API<br/>[review.py]"]
  node_ai_review["Review orchestration<br/>[review_service.py]"]
  node_gemini["Gemini operations<br/>[gemini.py]"]
  node_review_store[("Review records<br/>[review_service.py]")]
end

subgraph group_observability["Monitoring"]
  node_monitor_api["Monitoring endpoints"]
  node_monitor_data[("Build and event metrics<br/>[log.model.ts]")]
end

node_developer(("Developer"))
node_gemini_service{{"Google Gemini"}}

node_developer -->|"registers"| node_auth_ui
node_developer -.->|"uses"| node_web
node_auth_ui -.->|"uses"| node_api_client
node_auth_ui -.->|"updates"| node_auth_state
node_auth_hook -->|"reads"| node_auth_state
node_api_client -.->|"sends requests"| node_gateway_app
node_gateway_app -->|"routes via"| node_gateway_routes
node_gateway_routes -.->|"proxies to"| node_auth_controller
node_gateway_routes -.->|"proxies to"| node_project_api
node_gateway_routes -.->|"proxies to"| node_github_api
node_gateway_routes -.->|"proxies to"| node_ai_api
node_gateway_routes -.->|"proxies to"| node_monitor_api
node_auth_controller -->|"calls"| node_auth_logic
node_auth_logic -->|"reads and writes"| node_user_store
node_developer -->|"creates projects"| node_project_api
node_project_api -.->|"delegates planning"| node_planning
node_developer -.->|"connects repositories"| node_github_api
node_github_api -->|"dispatches events"| node_webhook_logic
node_developer -->|"requests review"| node_ai_api
node_ai_api -.->|"delegates review"| node_ai_review
node_ai_review -->|"requests analysis"| node_gemini
node_gemini -.->|"calls model"| node_gemini_service
node_ai_review -->|"stores results"| node_review_store
node_developer -->|"checks metrics"| node_monitor_api
node_monitor_api -->|"queries"| node_monitor_data

click node_web "https://github.com/suresh-saz/dev-work/tree/main/frontend/app"
click node_auth_ui "https://github.com/suresh-saz/dev-work/blob/main/frontend/app/register/page.tsx"
click node_auth_state "https://github.com/suresh-saz/dev-work/blob/main/frontend/store/auth.store.ts"
click node_auth_hook "https://github.com/suresh-saz/dev-work/blob/main/frontend/hooks/useAuth.ts"
click node_api_client "https://github.com/suresh-saz/dev-work/blob/main/frontend/lib/api-client.ts"
click node_gateway_app "https://github.com/suresh-saz/dev-work/blob/main/services/api-gateway/src/app.ts"
click node_gateway_routes "https://github.com/suresh-saz/dev-work/blob/main/services/api-gateway/src/config/proxy.config.ts"
click node_auth_controller "https://github.com/suresh-saz/dev-work/blob/main/services/auth-service/src/controllers/auth.controller.ts"
click node_auth_logic "https://github.com/suresh-saz/dev-work/blob/main/services/auth-service/src/services/auth.service.ts"
click node_user_store "https://github.com/suresh-saz/dev-work/blob/main/services/auth-service/src/models/user.model.ts"
click node_project_api "https://github.com/suresh-saz/dev-work/blob/main/services/project-service/src/controllers/project.controller.ts"
click node_planning "https://github.com/suresh-saz/dev-work/tree/main/services/project-service/src/controllers"
click node_github_api "https://github.com/suresh-saz/dev-work/tree/main/services/github-service/src/controllers"
click node_webhook_logic "https://github.com/suresh-saz/dev-work/blob/main/services/github-service/src/services/webhook.service.ts"
click node_ai_api "https://github.com/suresh-saz/dev-work/blob/main/services/ai-service/routers/review.py"
click node_ai_review "https://github.com/suresh-saz/dev-work/blob/main/services/ai-service/services/review_service.py"
click node_gemini "https://github.com/suresh-saz/dev-work/blob/main/services/ai-service/services/gemini.py"
click node_review_store "https://github.com/suresh-saz/dev-work/blob/main/services/ai-service/services/review_service.py"
click node_monitor_api "https://github.com/suresh-saz/dev-work/blob/main/services/monitor-service/src/controllers/monitor.controller.ts"
click node_monitor_data "https://github.com/suresh-saz/dev-work/blob/main/services/monitor-service/src/models/log.model.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_web,node_auth_ui,node_auth_state,node_auth_hook,node_api_client toneBlue
class node_gateway_app,node_gateway_routes toneAmber
class node_auth_controller,node_auth_logic,node_user_store toneMint
class node_project_api,node_planning toneRose
class node_github_api,node_webhook_logic,node_ai_api,node_ai_review,node_gemini,node_review_store,node_developer,node_gemini_service toneIndigo
class node_monitor_api,node_monitor_data toneTeal
```

## Components

### Web application

- [Workspace UI](https://github.com/suresh-saz/dev-work/tree/main/frontend/app): `frontend/app`
- [Auth screens](https://github.com/suresh-saz/dev-work/blob/main/frontend/app/register/page.tsx): `frontend/app/register/page.tsx`
- [Auth state](https://github.com/suresh-saz/dev-work/blob/main/frontend/store/auth.store.ts): `frontend/store/auth.store.ts`
- [Auth hook](https://github.com/suresh-saz/dev-work/blob/main/frontend/hooks/useAuth.ts): `frontend/hooks/useAuth.ts`
- [API client](https://github.com/suresh-saz/dev-work/blob/main/frontend/lib/api-client.ts): `frontend/lib/api-client.ts`

### API entry

- [Gateway proxy](https://github.com/suresh-saz/dev-work/blob/main/services/api-gateway/src/app.ts): `services/api-gateway/src/app.ts`
- [Service routing](https://github.com/suresh-saz/dev-work/blob/main/services/api-gateway/src/config/proxy.config.ts): `services/api-gateway/src/config/proxy.config.ts`

### Identity

- [Auth endpoints](https://github.com/suresh-saz/dev-work/blob/main/services/auth-service/src/controllers/auth.controller.ts): `services/auth-service/src/controllers/auth.controller.ts`
- [Auth operations](https://github.com/suresh-saz/dev-work/blob/main/services/auth-service/src/services/auth.service.ts): `services/auth-service/src/services/auth.service.ts`
- [User records](https://github.com/suresh-saz/dev-work/blob/main/services/auth-service/src/models/user.model.ts): `services/auth-service/src/models/user.model.ts`

### Workspace planning

- [Project endpoints](https://github.com/suresh-saz/dev-work/blob/main/services/project-service/src/controllers/project.controller.ts): `services/project-service/src/controllers/project.controller.ts`
- [Workspace and planning](https://github.com/suresh-saz/dev-work/tree/main/services/project-service/src/controllers): `services/project-service/src/controllers`

### Code integrations

- [Repository and webhook API](https://github.com/suresh-saz/dev-work/tree/main/services/github-service/src/controllers): `services/github-service/src/controllers`
- [Webhook processing](https://github.com/suresh-saz/dev-work/blob/main/services/github-service/src/services/webhook.service.ts): `services/github-service/src/services/webhook.service.ts`
- [AI review API](https://github.com/suresh-saz/dev-work/blob/main/services/ai-service/routers/review.py): `services/ai-service/routers/review.py`
- [Review orchestration](https://github.com/suresh-saz/dev-work/blob/main/services/ai-service/services/review_service.py): `services/ai-service/services/review_service.py`
- [Gemini operations](https://github.com/suresh-saz/dev-work/blob/main/services/ai-service/services/gemini.py): `services/ai-service/services/gemini.py`
- [Review records](https://github.com/suresh-saz/dev-work/blob/main/services/ai-service/services/review_service.py): `services/ai-service/services/review_service.py`

### Monitoring

- [Monitoring endpoints](https://github.com/suresh-saz/dev-work/blob/main/services/monitor-service/src/controllers/monitor.controller.ts): `services/monitor-service/src/controllers/monitor.controller.ts`
- [Build and event metrics](https://github.com/suresh-saz/dev-work/blob/main/services/monitor-service/src/models/log.model.ts): `services/monitor-service/src/models/log.model.ts`

### Other components

- **Developer**
- **Google Gemini**

## Connections

- Developer → Auth screens: registers (evidence: `README.md`)
- Developer → Workspace UI: uses
- Auth screens → API client: uses
- Auth screens → Auth state: updates
- Auth hook → Auth state: reads (evidence: `frontend/hooks/useAuth.ts`)
- API client → Gateway proxy: sends requests
- Gateway proxy → Service routing: routes via (evidence: `services/api-gateway/src/app.ts`)
- Service routing → Auth endpoints: proxies to
- Service routing → Project endpoints: proxies to
- Service routing → Repository and webhook API: proxies to
- Service routing → AI review API: proxies to
- Service routing → Monitoring endpoints: proxies to
- Auth endpoints → Auth operations: calls (evidence: `services/auth-service/src/controllers/auth.controller.ts`)
- Auth operations → User records: reads and writes (evidence: `services/auth-service/src/services/auth.service.ts`)
- Developer → Project endpoints: creates projects (evidence: `README.md`)
- Project endpoints → Workspace and planning: delegates planning
- Developer → Repository and webhook API: connects repositories
- Repository and webhook API → Webhook processing: dispatches events (evidence: `services/github-service/src/controllers/webhook.controller.ts`)
- Developer → AI review API: requests review (evidence: `README.md`)
- AI review API → Review orchestration: delegates review
- Review orchestration → Gemini operations: requests analysis (evidence: `services/ai-service/services/review_service.py`)
- Gemini operations → Google Gemini: calls model
- Review orchestration → Review records: stores results (evidence: `services/ai-service/services/review_service.py`)
- Developer → Monitoring endpoints: checks metrics (evidence: `README.md`)
- Monitoring endpoints → Build and event metrics: queries (evidence: `services/monitor-service/src/controllers/monitor.controller.ts`)
