# erdilatifi/project-management-app architecture

> Architecture diagram of the GitHub repository erdilatifi/project-management-app, 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/erdilatifi/project-management-app
- Repository: https://github.com/erdilatifi/project-management-app

## Overview

Flowfoundry is a Next.js project-management app backed by Supabase. A user signs in, selects or creates a workspace, organizes work into projects, and manages tasks on project boards; workspace members can also chat and receive notifications. Profiles, invitations, and people management support that collaboration flow. The graph includes the documented capability branches, plus the shared Supabase client and validation layer. Some feature implementations were not sampled, so those connections rely on README statements rather than inspected call sites.

Main entry points: [`utils/supabase/client.ts`](https://github.com/erdilatifi/project-management-app/blob/main/utils/supabase/client.ts) (Browser client), [`utils/supabase/server.ts`](https://github.com/erdilatifi/project-management-app/blob/main/utils/supabase/server.ts) (Server client), [`app/(pages)/profile/page.tsx`](https://github.com/erdilatifi/project-management-app/blob/main/app/(pages)/profile/page.tsx) (Profile settings), [`app/projects/[id]/tasks/page.tsx`](https://github.com/erdilatifi/project-management-app/blob/main/app/projects/%5Bid%5D/tasks/page.tsx) (Task board)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and profiles"]
  node_auth_pages["Sign-in pages<br/>[page.tsx]"]
  node_auth_actions["Auth actions<br/>[AuthActions.ts]"]
  node_auth_callback["OAuth callback<br/>[route.ts]"]
  node_profile["Profile settings<br/>[page.tsx]"]
  node_profile_api["Profile API<br/>[route.ts]"]
  node_avatar_api["Avatar API<br/>[route.ts]"]
end

subgraph group_work["Workspace and work"]
  node_workspace_pages["Workspace pages<br/>[page.tsx]"]
  node_workspace_hooks["Workspace state<br/>[useWorkspaces.ts]"]
  node_workspace_members["People management<br/>[page.tsx]"]
  node_invitations["Invitation management<br/>[route.ts]"]
  node_project_pages["Project listing<br/>[page.tsx]"]
  node_project_state["Project state<br/>[useProjects.ts]"]
  node_task_board["Task board<br/>[page.tsx]"]
  node_my_tasks["My tasks<br/>[page.tsx]"]
end

subgraph group_collaboration["Collaboration"]
  node_chat["Workspace chat<br/>[MessagePanel.tsx]"]
  node_notifications["Notifications"]
  node_notification_api["Notification API<br/>[route.ts]"]
end

subgraph group_platform["Shared platform"]
  node_supabase_client["Browser client<br/>[client.ts]"]
  node_supabase_server["Server client<br/>[server.ts]"]
  node_validation["Request validation<br/>[middleware.ts]"]
  node_database[("Supabase data")]
end

node_user(("User"))

node_user -->|"signs in"| node_auth_pages
node_auth_pages -.->|"submits credentials"| node_auth_actions
node_auth_actions -.->|"authenticates"| node_supabase_server
node_user -->|"opens workspaces"| node_workspace_pages
node_workspace_pages -->|"loads state"| node_workspace_hooks
node_workspace_hooks -->|"queries data"| node_supabase_client
node_workspace_pages -.->|"selects projects"| node_project_pages
node_project_pages -->|"loads projects"| node_project_state
node_project_state -->|"queries and subscribes"| node_supabase_client
node_project_pages -->|"opens board"| node_task_board
node_user -->|"manages tasks"| node_task_board
node_user -->|"tracks assigned tasks"| node_my_tasks
node_task_board -->|"reads and updates"| node_supabase_client
node_user -->|"manages members"| node_workspace_members
node_workspace_members -->|"loads member data"| node_supabase_client
node_user -->|"invites members"| node_invitations
node_invitations -->|"creates invitations"| node_supabase_server
node_invitations -->|"validates requests"| node_validation
node_user -->|"edits profile"| node_profile
node_profile -->|"loads and syncs profile"| node_supabase_client
node_profile -.->|"updates profile"| node_profile_api
node_profile -.->|"uploads avatar"| node_avatar_api
node_user -->|"chats with members"| node_chat
node_chat -.->|"delivers messages"| node_supabase_client
node_user -->|"views alerts"| node_notifications
node_notifications -.->|"loads notifications"| node_notification_api
node_notification_api -->|"queries data"| node_supabase_server
node_notification_api -->|"validates requests"| node_validation
node_auth_callback -->|"exchanges session"| node_supabase_server
node_auth_callback -->|"updates profile"| node_database
node_workspace_hooks -.->|"reads workspace state"| node_database
node_project_state -->|"reads project state"| node_database
node_task_board -.->|"updates tasks"| node_database
node_profile_api -->|"uses server client"| node_supabase_server
node_avatar_api -->|"uses server client"| node_supabase_server

click node_auth_pages "https://github.com/erdilatifi/project-management-app/blob/main/app/(pages)/(auth)/login/page.tsx"
click node_auth_actions "https://github.com/erdilatifi/project-management-app/blob/main/app/actions/AuthActions.ts"
click node_auth_callback "https://github.com/erdilatifi/project-management-app/blob/main/app/auth/callback/route.ts"
click node_profile "https://github.com/erdilatifi/project-management-app/blob/main/app/(pages)/profile/page.tsx"
click node_profile_api "https://github.com/erdilatifi/project-management-app/blob/main/app/api/profile/route.ts"
click node_avatar_api "https://github.com/erdilatifi/project-management-app/blob/main/app/api/profile/avatar/route.ts"
click node_workspace_pages "https://github.com/erdilatifi/project-management-app/blob/main/app/workspaces/page.tsx"
click node_workspace_hooks "https://github.com/erdilatifi/project-management-app/blob/main/hooks/useWorkspaces.ts"
click node_workspace_members "https://github.com/erdilatifi/project-management-app/blob/main/app/workspaces/%5Bid%5D/people/page.tsx"
click node_invitations "https://github.com/erdilatifi/project-management-app/blob/main/app/api/workspaces/invitations/route.ts"
click node_project_pages "https://github.com/erdilatifi/project-management-app/blob/main/app/projects/page.tsx"
click node_project_state "https://github.com/erdilatifi/project-management-app/blob/main/hooks/useProjects.ts"
click node_task_board "https://github.com/erdilatifi/project-management-app/blob/main/app/projects/%5Bid%5D/tasks/page.tsx"
click node_my_tasks "https://github.com/erdilatifi/project-management-app/blob/main/app/tasks/page.tsx"
click node_chat "https://github.com/erdilatifi/project-management-app/blob/main/components/chat/MessagePanel.tsx"
click node_notifications "https://github.com/erdilatifi/project-management-app/blob/main/components/notifications/NotificationBell.tsx"
click node_notification_api "https://github.com/erdilatifi/project-management-app/blob/main/app/api/notifications/route.ts"
click node_supabase_client "https://github.com/erdilatifi/project-management-app/blob/main/utils/supabase/client.ts"
click node_supabase_server "https://github.com/erdilatifi/project-management-app/blob/main/utils/supabase/server.ts"
click node_validation "https://github.com/erdilatifi/project-management-app/blob/main/lib/validation/middleware.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_auth_pages,node_auth_actions,node_auth_callback,node_profile,node_profile_api,node_avatar_api,node_user toneBlue
class node_workspace_pages,node_workspace_hooks,node_workspace_members,node_invitations,node_project_pages,node_project_state,node_task_board,node_my_tasks toneAmber
class node_chat,node_notifications,node_notification_api toneMint
class node_supabase_client,node_supabase_server,node_validation,node_database toneRose
```

## Components

### Identity and profiles

- [Sign-in pages](https://github.com/erdilatifi/project-management-app/blob/main/app/(pages)/(auth)/login/page.tsx): `app/(pages)/(auth)/login/page.tsx`
- [Auth actions](https://github.com/erdilatifi/project-management-app/blob/main/app/actions/AuthActions.ts): `app/actions/AuthActions.ts`
- [OAuth callback](https://github.com/erdilatifi/project-management-app/blob/main/app/auth/callback/route.ts): `app/auth/callback/route.ts`
- [Profile settings](https://github.com/erdilatifi/project-management-app/blob/main/app/(pages)/profile/page.tsx): `app/(pages)/profile/page.tsx`
- [Profile API](https://github.com/erdilatifi/project-management-app/blob/main/app/api/profile/route.ts): `app/api/profile/route.ts`
- [Avatar API](https://github.com/erdilatifi/project-management-app/blob/main/app/api/profile/avatar/route.ts): `app/api/profile/avatar/route.ts`

### Workspace and work

- [Workspace pages](https://github.com/erdilatifi/project-management-app/blob/main/app/workspaces/page.tsx): `app/workspaces/page.tsx`
- [Workspace state](https://github.com/erdilatifi/project-management-app/blob/main/hooks/useWorkspaces.ts): `hooks/useWorkspaces.ts`
- [People management](https://github.com/erdilatifi/project-management-app/blob/main/app/workspaces/%5Bid%5D/people/page.tsx): `app/workspaces/[id]/people/page.tsx`
- [Invitation management](https://github.com/erdilatifi/project-management-app/blob/main/app/api/workspaces/invitations/route.ts): `app/api/workspaces/invitations/route.ts`
- [Project listing](https://github.com/erdilatifi/project-management-app/blob/main/app/projects/page.tsx): `app/projects/page.tsx`
- [Project state](https://github.com/erdilatifi/project-management-app/blob/main/hooks/useProjects.ts): `hooks/useProjects.ts`
- [Task board](https://github.com/erdilatifi/project-management-app/blob/main/app/projects/%5Bid%5D/tasks/page.tsx): `app/projects/[id]/tasks/page.tsx`
- [My tasks](https://github.com/erdilatifi/project-management-app/blob/main/app/tasks/page.tsx): `app/tasks/page.tsx`

### Collaboration

- [Workspace chat](https://github.com/erdilatifi/project-management-app/blob/main/components/chat/MessagePanel.tsx): `components/chat/MessagePanel.tsx`
- [Notifications](https://github.com/erdilatifi/project-management-app/blob/main/components/notifications/NotificationBell.tsx): `components/notifications/NotificationBell.tsx`
- [Notification API](https://github.com/erdilatifi/project-management-app/blob/main/app/api/notifications/route.ts): `app/api/notifications/route.ts`

### Shared platform

- [Browser client](https://github.com/erdilatifi/project-management-app/blob/main/utils/supabase/client.ts): `utils/supabase/client.ts`
- [Server client](https://github.com/erdilatifi/project-management-app/blob/main/utils/supabase/server.ts): `utils/supabase/server.ts`
- [Request validation](https://github.com/erdilatifi/project-management-app/blob/main/lib/validation/middleware.ts): `lib/validation/middleware.ts`
- **Supabase data**

### Other components

- **User**

## Connections

- User → Sign-in pages: signs in (evidence: `README.md`)
- Sign-in pages → Auth actions: submits credentials
- Auth actions → Server client: authenticates
- User → Workspace pages: opens workspaces (evidence: `README.md`)
- Workspace pages → Workspace state: loads state (evidence: `app/workspaces/page.tsx`)
- Workspace state → Browser client: queries data (evidence: `hooks/useWorkspaces.ts`)
- Workspace pages → Project listing: selects projects
- Project listing → Project state: loads projects (evidence: `app/projects/page.tsx`)
- Project state → Browser client: queries and subscribes (evidence: `hooks/useProjects.ts`)
- Project listing → Task board: opens board (evidence: `app/projects/page.tsx`)
- User → Task board: manages tasks (evidence: `README.md`)
- User → My tasks: tracks assigned tasks (evidence: `README.md`)
- Task board → Browser client: reads and updates (evidence: `app/projects/[id]/tasks/page.tsx`)
- User → People management: manages members (evidence: `README.md`)
- People management → Browser client: loads member data (evidence: `app/workspaces/[id]/people/page.tsx`)
- User → Invitation management: invites members (evidence: `README.md`)
- Invitation management → Server client: creates invitations (evidence: `app/api/workspaces/invitations/route.ts`)
- Invitation management → Request validation: validates requests (evidence: `app/api/workspaces/invitations/route.ts`)
- User → Profile settings: edits profile (evidence: `README.md`)
- Profile settings → Browser client: loads and syncs profile (evidence: `app/(pages)/profile/page.tsx`)
- Profile settings → Profile API: updates profile
- Profile settings → Avatar API: uploads avatar
- User → Workspace chat: chats with members (evidence: `README.md`)
- Workspace chat → Browser client: delivers messages
- User → Notifications: views alerts (evidence: `README.md`)
- Notifications → Notification API: loads notifications
- Notification API → Server client: queries data (evidence: `app/api/notifications/route.ts`)
- Notification API → Request validation: validates requests (evidence: `app/api/notifications/route.ts`)
- OAuth callback → Server client: exchanges session (evidence: `app/auth/callback/route.ts`)
- OAuth callback → Supabase data: updates profile (evidence: `app/auth/callback/route.ts`)
- Workspace state → Supabase data: reads workspace state
- Project state → Supabase data: reads project state (evidence: `hooks/useProjects.ts`)
- Task board → Supabase data: updates tasks
- Profile API → Server client: uses server client (evidence: `app/api/profile/route.ts`)
- Avatar API → Server client: uses server client (evidence: `app/api/profile/avatar/route.ts`)
