# b4f-cohort8-salamiyah/b4f-board-final architecture

> Architecture diagram of the GitHub repository b4f-cohort8-salamiyah/b4f-board-final, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/b4f-cohort8-salamiyah/b4f-board-final
- Repository: https://github.com/b4f-cohort8-salamiyah/b4f-board-final

## Overview

B4F Board is a project-management application: users authenticate, organize work in workspaces and projects, manage issues through boards and sprints, and collaborate with comments, activity history, and notifications. The Next.js interface reaches NestJS through Server Actions and a typed server-only API client; the backend persists domain data with Prisma and PostgreSQL. The graph preserves README-described capabilities even where their source was not sampled. Arrows are limited to explicit README statements or shown calls/import references in the source index and excerpts.

Main entry points: [`api/src`](https://github.com/b4f-cohort8-salamiyah/b4f-board-final/tree/main/api/src) (Nest API), [`api/src/prisma/prisma.service.ts`](https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/prisma/prisma.service.ts) (Prisma service), [`api/src/issues/issues.service.ts`](https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/issues/issues.service.ts) (Issues and board), [`api/src/comments/comments.service.ts`](https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/comments/comments.service.ts) (Comments and mentions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web experience"]
  node_webapp["App routes"]
  node_webui["Domain UI"]
end

subgraph group_bridge["Server API bridge"]
  node_actions["Server Actions"]
  node_api_client["Typed API client"]
  node_nest["Nest API"]
end

subgraph group_identity["Identity and spaces"]
  node_auth["Authentication<br/>[auth.service.ts]"]
  node_workspaces["Workspaces"]
  node_workspace_access["Workspace access"]
  node_users["Users and profile<br/>[users.service.ts]"]
end

subgraph group_planning["Work planning"]
  node_projects["Projects"]
  node_issues["Issues and board<br/>[issues.service.ts]"]
  node_sprints["Sprints and backlog<br/>[sprints.service.ts]"]
end

subgraph group_collaboration["Collaboration and platform"]
  node_comments["Comments and mentions"]
  node_activity["Activity history"]
  node_notifications["Notifications"]
  node_prisma["Prisma service<br/>[prisma.service.ts]"]
end

node_user(("User"))
node_postgres[("PostgreSQL")]

node_user -->|"uses"| node_webapp
node_webapp -.->|"renders"| node_webui
node_webapp -.->|"invokes"| node_actions
node_actions -->|"calls"| node_api_client
node_api_client -->|"requests"| node_nest
node_nest -.->|"routes to"| node_auth
node_nest -->|"routes to"| node_workspaces
node_nest -->|"routes to"| node_projects
node_nest -->|"routes to"| node_issues
node_nest -->|"routes to"| node_sprints
node_nest -->|"routes to"| node_users
node_nest -->|"routes to"| node_notifications
node_nest -->|"routes to"| node_comments
node_workspaces -->|"records"| node_activity
node_comments -->|"records"| node_activity
node_comments -->|"notifies"| node_notifications
node_issues -->|"records"| node_activity
node_issues -->|"notifies"| node_notifications
node_sprints -->|"notifies"| node_notifications
node_comments -->|"checks access"| node_workspace_access
node_issues -->|"checks access"| node_workspace_access
node_sprints -->|"checks access"| node_workspace_access
node_workspaces -->|"uses"| node_workspace_access
node_auth -->|"reads and writes"| node_prisma
node_workspaces -->|"reads and writes"| node_prisma
node_projects -.->|"reads and writes"| node_prisma
node_issues -->|"reads and writes"| node_prisma
node_sprints -->|"reads and writes"| node_prisma
node_comments -->|"reads and writes"| node_prisma
node_notifications -->|"reads and writes"| node_prisma
node_activity -.->|"reads and writes"| node_prisma
node_prisma -->|"persists data"| node_postgres

click node_webapp "https://github.com/b4f-cohort8-salamiyah/b4f-board-final/tree/main/web/src/app"
click node_webui "https://github.com/b4f-cohort8-salamiyah/b4f-board-final/tree/main/web/src/components"
click node_actions "https://github.com/b4f-cohort8-salamiyah/b4f-board-final/tree/main/web/src/lib/actions"
click node_api_client "https://github.com/b4f-cohort8-salamiyah/b4f-board-final/tree/main/web/src/lib/api"
click node_nest "https://github.com/b4f-cohort8-salamiyah/b4f-board-final/tree/main/api/src"
click node_auth "https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/auth/auth.service.ts"
click node_workspaces "https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/workspaces/workspaces.service.ts"
click node_workspace_access "https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/workspaces/workspace-access.service.ts"
click node_users "https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/users/users.service.ts"
click node_projects "https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/projects/projects.service.ts"
click node_issues "https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/issues/issues.service.ts"
click node_sprints "https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/sprints/sprints.service.ts"
click node_comments "https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/comments/comments.service.ts"
click node_activity "https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/activity/activity.service.ts"
click node_notifications "https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/notifications/notifications.service.ts"
click node_prisma "https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/prisma/prisma.service.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_webapp,node_webui,node_user toneBlue
class node_actions,node_api_client,node_nest,node_postgres toneAmber
class node_auth,node_workspaces,node_workspace_access,node_users toneMint
class node_projects,node_issues,node_sprints toneRose
class node_comments,node_activity,node_notifications,node_prisma toneIndigo
```

## Components

### Web experience

- [App routes](https://github.com/b4f-cohort8-salamiyah/b4f-board-final/tree/main/web/src/app): `web/src/app`
- [Domain UI](https://github.com/b4f-cohort8-salamiyah/b4f-board-final/tree/main/web/src/components): `web/src/components`

### Server API bridge

- [Server Actions](https://github.com/b4f-cohort8-salamiyah/b4f-board-final/tree/main/web/src/lib/actions): `web/src/lib/actions`
- [Typed API client](https://github.com/b4f-cohort8-salamiyah/b4f-board-final/tree/main/web/src/lib/api): `web/src/lib/api`
- [Nest API](https://github.com/b4f-cohort8-salamiyah/b4f-board-final/tree/main/api/src): `api/src`

### Identity and spaces

- [Authentication](https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/auth/auth.service.ts): `api/src/auth/auth.service.ts`
- [Workspaces](https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/workspaces/workspaces.service.ts): `api/src/workspaces/workspaces.service.ts`
- [Workspace access](https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/workspaces/workspace-access.service.ts): `api/src/workspaces/workspace-access.service.ts`
- [Users and profile](https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/users/users.service.ts): `api/src/users/users.service.ts`

### Work planning

- [Projects](https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/projects/projects.service.ts): `api/src/projects/projects.service.ts`
- [Issues and board](https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/issues/issues.service.ts): `api/src/issues/issues.service.ts`
- [Sprints and backlog](https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/sprints/sprints.service.ts): `api/src/sprints/sprints.service.ts`

### Collaboration and platform

- [Comments and mentions](https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/comments/comments.service.ts): `api/src/comments/comments.service.ts`
- [Activity history](https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/activity/activity.service.ts): `api/src/activity/activity.service.ts`
- [Notifications](https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/notifications/notifications.service.ts): `api/src/notifications/notifications.service.ts`
- [Prisma service](https://github.com/b4f-cohort8-salamiyah/b4f-board-final/blob/main/api/src/prisma/prisma.service.ts): `api/src/prisma/prisma.service.ts`

### Other components

- **User**
- **PostgreSQL**

## Connections

- User → App routes: uses (evidence: `README.md`)
- App routes → Domain UI: renders
- App routes → Server Actions: invokes
- Server Actions → Typed API client: calls (evidence: `README.md`)
- Typed API client → Nest API: requests (evidence: `README.md`)
- Nest API → Authentication: routes to (evidence: `api/src/auth/auth.controller.ts`)
- Nest API → Workspaces: routes to (evidence: `api/src/workspaces/workspaces.controller.ts`)
- Nest API → Projects: routes to (evidence: `api/src/projects/projects.controller.ts`)
- Nest API → Issues and board: routes to (evidence: `api/src/issues/issues.controller.ts`)
- Nest API → Sprints and backlog: routes to (evidence: `api/src/sprints/sprints.controller.ts`)
- Nest API → Users and profile: routes to (evidence: `api/src/users/users.controller.ts`)
- Nest API → Notifications: routes to (evidence: `api/src/notifications/notifications.controller.ts`)
- Nest API → Comments and mentions: routes to (evidence: `api/src/comments/comments.controller.ts`)
- Workspaces → Activity history: records (evidence: `api/src/workspaces/workspaces.service.ts`)
- Comments and mentions → Activity history: records (evidence: `api/src/comments/comments.service.ts`)
- Comments and mentions → Notifications: notifies (evidence: `api/src/comments/comments.service.ts`)
- Issues and board → Activity history: records (evidence: `api/src/issues/issues.service.ts`)
- Issues and board → Notifications: notifies (evidence: `api/src/issues/issues.service.ts`)
- Sprints and backlog → Notifications: notifies (evidence: `api/src/sprints/sprints.service.ts`)
- Comments and mentions → Workspace access: checks access (evidence: `api/src/comments/comments.service.ts`)
- Issues and board → Workspace access: checks access (evidence: `api/src/issues/issues.service.ts`)
- Sprints and backlog → Workspace access: checks access (evidence: `api/src/sprints/sprints.service.ts`)
- Workspaces → Workspace access: uses (evidence: `api/src/workspaces/workspaces.service.ts`)
- Authentication → Prisma service: reads and writes (evidence: `api/src/auth/auth.service.ts`)
- Workspaces → Prisma service: reads and writes (evidence: `api/src/workspaces/workspaces.service.ts`)
- Projects → Prisma service: reads and writes
- Issues and board → Prisma service: reads and writes (evidence: `api/src/issues/issues.service.ts`)
- Sprints and backlog → Prisma service: reads and writes (evidence: `api/src/sprints/sprints.service.ts`)
- Comments and mentions → Prisma service: reads and writes (evidence: `api/src/comments/comments.service.ts`)
- Notifications → Prisma service: reads and writes (evidence: `api/src/notifications/notifications.service.ts`)
- Activity history → Prisma service: reads and writes
- Prisma service → PostgreSQL: persists data (evidence: `README.md`)
