# basxeon/globalwork-project-foundation architecture

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

- Interactive diagram: https://gitdiagram.com/basxeon/globalwork-project-foundation
- Repository: https://github.com/basxeon/globalwork-project-foundation

## Overview

GlobalWork OS is a personal project-tracking app: users sign in, then manage Projects and their Contacts, Tasks, Documents, and reusable Form Data; dashboard attention summaries surface urgent work. The Next.js screens call the NestJS API through a shared authenticated client. The API also provides user and workspace administration, document storage, and passport extraction review. Relationships below are limited to README statements and source-index references; unsampled routes and service internals are not inferred.

Main entry points: [`apps/web/src/lib/api.ts`](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/web/src/lib/api.ts) (API client), [`apps/api/src/dashboard/dashboard.service.ts`](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/dashboard/dashboard.service.ts) (Attention summaries), [`apps/api/src/projects/projects.controller.ts`](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/projects/projects.controller.ts) (Project operations), [`apps/api/src/documents/documents.service.ts`](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/documents/documents.service.ts) (Document operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_shell["App shell<br/>[app-shell.tsx]"]
  node_webclient["API client<br/>[api.ts]"]
  node_projectui["Project screens<br/>[page.tsx]"]
  node_taskui["Task screen<br/>[page.tsx]"]
  node_documentui["Document library<br/>[page.tsx]"]
  node_dashboardui["Dashboard<br/>[page.tsx]"]
  node_settingsui["Settings screen<br/>[page.tsx]"]
  node_authui["Login screen<br/>[page.tsx]"]
end

subgraph group_work["Project operations"]
  node_projects["Project operations"]
  node_contacts["Contact management"]
  node_companies["Company management"]
  node_tasks["Task operations"]
  node_dashboard["Attention summaries"]
  node_formdata["Project Form Data"]
end

subgraph group_identity["Identity and settings"]
  node_auth["Authentication<br/>[auth.service.ts]"]
  node_users["User management"]
  node_settings["Workspace settings"]
end

subgraph group_documents["Documents and review"]
  node_documents["Document operations"]
  node_passport["Passport review"]
end

subgraph group_platform["API and storage"]
  node_storage["Storage service<br/>[storage.service.ts]"]
  node_localdrive["Local Drive"]
  node_database[("PostgreSQL")]
end

node_user(("Workspace user"))

node_user -->|"signs in"| node_authui
node_user -->|"uses workspace"| node_shell
node_authui -.->|"submits requests"| node_webclient
node_shell -->|"loads settings"| node_webclient
node_projectui -->|"calls API"| node_webclient
node_taskui -->|"calls API"| node_webclient
node_documentui -->|"calls API"| node_webclient
node_settingsui -->|"calls API"| node_webclient
node_dashboardui -.->|"calls API"| node_webclient
node_webclient -->|"sends API requests"| node_auth
node_webclient -->|"sends API requests"| node_projects
node_webclient -->|"sends API requests"| node_tasks
node_webclient -->|"sends API requests"| node_documents
node_webclient -->|"sends API requests"| node_dashboard
node_webclient -->|"sends API requests"| node_settings
node_webclient -->|"sends API requests"| node_users
node_projects -->|"serves form data"| node_formdata
node_documents -->|"reads and writes"| node_storage
node_storage -->|"delegates storage"| node_localdrive
node_passport -->|"uses document data"| node_documents
node_dashboard -->|"reads settings"| node_settings
node_dashboard -->|"summarizes tasks"| node_tasks
node_dashboard -->|"summarizes projects"| node_projects
node_auth -.->|"reads users"| node_database
node_projects -.->|"persists projects"| node_database
node_tasks -.->|"persists tasks"| node_database
node_documents -.->|"persists metadata"| node_database

click node_shell "https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/web/src/app/components/app-shell.tsx"
click node_webclient "https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/web/src/lib/api.ts"
click node_projectui "https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/web/src/app/projects/page.tsx"
click node_taskui "https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/web/src/app/tasks/page.tsx"
click node_documentui "https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/web/src/app/documents/page.tsx"
click node_dashboardui "https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/web/src/app/dashboard/page.tsx"
click node_settingsui "https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/web/src/app/settings/page.tsx"
click node_authui "https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/web/src/app/login/page.tsx"
click node_auth "https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/auth/auth.service.ts"
click node_users "https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/users/users.controller.ts"
click node_settings "https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/settings/settings.service.ts"
click node_projects "https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/projects/projects.controller.ts"
click node_contacts "https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/contacts/contacts.controller.ts"
click node_companies "https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/companies/companies.controller.ts"
click node_tasks "https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/tasks/tasks.controller.ts"
click node_dashboard "https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/dashboard/dashboard.service.ts"
click node_formdata "https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/projects/project-form-data.service.ts"
click node_documents "https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/documents/documents.service.ts"
click node_passport "https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/passport-extractions/passport-extractions.service.ts"
click node_storage "https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/storage/storage.service.ts"
click node_localdrive "https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/storage/providers/local-drive.provider.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_shell,node_webclient,node_projectui,node_taskui,node_documentui,node_dashboardui,node_settingsui,node_authui,node_user toneBlue
class node_projects,node_contacts,node_companies,node_tasks,node_dashboard,node_formdata toneAmber
class node_auth,node_users,node_settings toneMint
class node_documents,node_passport toneRose
class node_storage,node_localdrive,node_database toneIndigo
```

## Components

### Web application

- [App shell](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/web/src/app/components/app-shell.tsx): `apps/web/src/app/components/app-shell.tsx`
- [API client](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/web/src/lib/api.ts): `apps/web/src/lib/api.ts`
- [Project screens](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/web/src/app/projects/page.tsx): `apps/web/src/app/projects/page.tsx`
- [Task screen](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/web/src/app/tasks/page.tsx): `apps/web/src/app/tasks/page.tsx`
- [Document library](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/web/src/app/documents/page.tsx): `apps/web/src/app/documents/page.tsx`
- [Dashboard](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/web/src/app/dashboard/page.tsx): `apps/web/src/app/dashboard/page.tsx`
- [Settings screen](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/web/src/app/settings/page.tsx): `apps/web/src/app/settings/page.tsx`
- [Login screen](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/web/src/app/login/page.tsx): `apps/web/src/app/login/page.tsx`

### Project operations

- [Project operations](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/projects/projects.controller.ts): `apps/api/src/projects/projects.controller.ts`
- [Contact management](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/contacts/contacts.controller.ts): `apps/api/src/contacts/contacts.controller.ts`
- [Company management](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/companies/companies.controller.ts): `apps/api/src/companies/companies.controller.ts`
- [Task operations](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/tasks/tasks.controller.ts): `apps/api/src/tasks/tasks.controller.ts`
- [Attention summaries](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/dashboard/dashboard.service.ts): `apps/api/src/dashboard/dashboard.service.ts`
- [Project Form Data](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/projects/project-form-data.service.ts): `apps/api/src/projects/project-form-data.service.ts`

### Identity and settings

- [Authentication](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/auth/auth.service.ts): `apps/api/src/auth/auth.service.ts`
- [User management](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/users/users.controller.ts): `apps/api/src/users/users.controller.ts`
- [Workspace settings](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/settings/settings.service.ts): `apps/api/src/settings/settings.service.ts`

### Documents and review

- [Document operations](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/documents/documents.service.ts): `apps/api/src/documents/documents.service.ts`
- [Passport review](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/passport-extractions/passport-extractions.service.ts): `apps/api/src/passport-extractions/passport-extractions.service.ts`

### API and storage

- [Storage service](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/storage/storage.service.ts): `apps/api/src/storage/storage.service.ts`
- [Local Drive](https://github.com/basxeon/globalwork-project-foundation/blob/main/apps/api/src/storage/providers/local-drive.provider.ts): `apps/api/src/storage/providers/local-drive.provider.ts`
- **PostgreSQL**

### Other components

- **Workspace user**

## Connections

- Workspace user → Login screen: signs in (evidence: `README.md`)
- Workspace user → App shell: uses workspace (evidence: `README.md`)
- Login screen → API client: submits requests
- App shell → API client: loads settings (evidence: `apps/web/src/app/components/app-shell.tsx`)
- Project screens → API client: calls API (evidence: `apps/web/src/app/projects/page.tsx`)
- Task screen → API client: calls API (evidence: `apps/web/src/app/tasks/page.tsx`)
- Document library → API client: calls API (evidence: `apps/web/src/app/documents/page.tsx`)
- Settings screen → API client: calls API (evidence: `apps/web/src/app/settings/page.tsx`)
- Dashboard → API client: calls API
- API client → Authentication: sends API requests (evidence: `README.md`)
- API client → Project operations: sends API requests (evidence: `README.md`)
- API client → Task operations: sends API requests (evidence: `README.md`)
- API client → Document operations: sends API requests (evidence: `README.md`)
- API client → Attention summaries: sends API requests (evidence: `README.md`)
- API client → Workspace settings: sends API requests (evidence: `README.md`)
- API client → User management: sends API requests (evidence: `README.md`)
- Project operations → Project Form Data: serves form data (evidence: `apps/api/src/projects/projects.controller.ts`)
- Document operations → Storage service: reads and writes (evidence: `apps/api/src/documents/documents.service.ts`)
- Storage service → Local Drive: delegates storage (evidence: `apps/api/src/storage/storage.service.ts`)
- Passport review → Document operations: uses document data (evidence: `apps/api/src/passport-extractions/passport-extractions.service.ts`)
- Attention summaries → Workspace settings: reads settings (evidence: `apps/api/src/dashboard/dashboard.service.ts`)
- Attention summaries → Task operations: summarizes tasks (evidence: `apps/api/src/dashboard/dashboard.service.ts`)
- Attention summaries → Project operations: summarizes projects (evidence: `apps/api/src/dashboard/dashboard.service.ts`)
- Authentication → PostgreSQL: reads users
- Project operations → PostgreSQL: persists projects
- Task operations → PostgreSQL: persists tasks
- Document operations → PostgreSQL: persists metadata
