# ricamhay123/groupspace architecture

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

- Interactive diagram: https://gitdiagram.com/ricamhay123/groupspace
- Repository: https://github.com/ricamhay123/groupspace

## Overview

GroupSpace is a collaborative workspace and personal productivity app. Users sign in, create or join workspaces, then use shared task, notebook, expense, discussion, and calendar features; personal items remain user-scoped. The graph shows the Express entry point, frontend API path, and domain layers. README documents several capabilities whose implementation was not sampled; those are included without guessing their internal call wiring.

Main entry points: [`src/app.js`](https://github.com/ricamhay123/groupspace/blob/main/src/app.js) (Express app), [`src/modules/expenses`](https://github.com/ricamhay123/groupspace/tree/main/src/modules/expenses) (Expense ledger), [`public/js/dashboard.js`](https://github.com/ricamhay123/groupspace/blob/main/public/js/dashboard.js) (Dashboard), [`public/js/api.js`](https://github.com/ricamhay123/groupspace/blob/main/public/js/api.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App Entry"]
  node_dashboard["Dashboard<br/>[dashboard.js]"]
  node_api_client["API client<br/>[api.js]"]
  node_server["HTTP server<br/>[server.js]"]
  node_app["Express app<br/>[app.js]"]
end

subgraph group_identity["Identity &amp; Membership"]
  node_auth_routes["Auth routes<br/>[auth.routes.js]"]
  node_auth_controller["Auth controller<br/>[auth.controller.js]"]
  node_auth_service["Auth service<br/>[auth.service.js]"]
  node_auth_middleware["Auth middleware<br/>[auth.middleware.js]"]
  node_group_routes["Workspace routes<br/>[group.routes.js]"]
  node_group_controller["Workspace controller"]
  node_group_service["Workspace service<br/>[group.service.js]"]
end

subgraph group_workspace["Workspace Features"]
  node_tasks["Kanban tasks"]
  node_notebook["Shared notebook"]
  node_expenses["Expense ledger"]
  node_discussions["Discussions &amp; activity"]
  node_calendar["Group calendar"]
  node_calculation["Debt calculation"]
end

subgraph group_personal["Personal Productivity"]
  node_personal_space["Personal space"]
end

node_user(("User"))
node_browser(("Browser UI"))
node_database[("Neon PostgreSQL")]

node_user -->|"uses"| node_browser
node_browser -->|"loads"| node_dashboard
node_dashboard -->|"requests"| node_api_client
node_api_client -->|"calls API"| node_app
node_server -->|"starts"| node_app
node_app -->|"mounts"| node_auth_routes
node_app -->|"mounts"| node_group_routes
node_app -->|"mounts routes"| node_tasks
node_app -->|"mounts routes"| node_notebook
node_app -->|"mounts routes"| node_expenses
node_app -->|"mounts routes"| node_discussions
node_app -->|"mounts routes"| node_calendar
node_app -->|"mounts routes"| node_personal_space
node_auth_routes -->|"dispatches"| node_auth_controller
node_auth_controller -->|"calls"| node_auth_service
node_auth_service -->|"reads/writes"| node_database
node_group_routes -->|"dispatches"| node_group_controller
node_group_controller -->|"calls"| node_group_service
node_auth_middleware -->|"validates identity"| node_database
node_tasks -->|"workspace data"| node_database
node_notebook -->|"workspace data"| node_database
node_expenses -->|"ledger data"| node_database
node_expenses -->|"summarizes balances"| node_calculation
node_discussions -->|"discussion data"| node_database
node_calendar -->|"event data"| node_database
node_personal_space -->|"private items"| node_database

click node_dashboard "https://github.com/ricamhay123/groupspace/blob/main/public/js/dashboard.js"
click node_api_client "https://github.com/ricamhay123/groupspace/blob/main/public/js/api.js"
click node_server "https://github.com/ricamhay123/groupspace/blob/main/src/server.js"
click node_app "https://github.com/ricamhay123/groupspace/blob/main/src/app.js"
click node_auth_routes "https://github.com/ricamhay123/groupspace/blob/main/src/modules/auth/auth.routes.js"
click node_auth_controller "https://github.com/ricamhay123/groupspace/blob/main/src/modules/auth/auth.controller.js"
click node_auth_service "https://github.com/ricamhay123/groupspace/blob/main/src/modules/auth/auth.service.js"
click node_auth_middleware "https://github.com/ricamhay123/groupspace/blob/main/src/middleware/auth.middleware.js"
click node_group_routes "https://github.com/ricamhay123/groupspace/blob/main/src/modules/groups/group.routes.js"
click node_group_controller "https://github.com/ricamhay123/groupspace/blob/main/src/modules/groups/group.controller.js"
click node_group_service "https://github.com/ricamhay123/groupspace/blob/main/src/modules/groups/group.service.js"
click node_tasks "https://github.com/ricamhay123/groupspace/tree/main/src/modules/tasks"
click node_notebook "https://github.com/ricamhay123/groupspace/tree/main/src/modules/notebook"
click node_expenses "https://github.com/ricamhay123/groupspace/tree/main/src/modules/expenses"
click node_discussions "https://github.com/ricamhay123/groupspace/tree/main/src/modules/discussions"
click node_calendar "https://github.com/ricamhay123/groupspace/tree/main/src/modules/calendar"
click node_personal_space "https://github.com/ricamhay123/groupspace/tree/main/src/modules/personal-space"
click node_calculation "https://github.com/ricamhay123/groupspace/blob/main/src/utils/calculation.util.js"

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_dashboard,node_api_client,node_server,node_app,node_user,node_browser toneBlue
class node_auth_routes,node_auth_controller,node_auth_service,node_auth_middleware,node_group_routes,node_group_controller,node_group_service,node_database toneAmber
class node_tasks,node_notebook,node_expenses,node_discussions,node_calendar,node_calculation toneMint
class node_personal_space toneRose
```

## Components

### App Entry

- [Dashboard](https://github.com/ricamhay123/groupspace/blob/main/public/js/dashboard.js): `public/js/dashboard.js`
- [API client](https://github.com/ricamhay123/groupspace/blob/main/public/js/api.js): `public/js/api.js`
- [HTTP server](https://github.com/ricamhay123/groupspace/blob/main/src/server.js): `src/server.js`
- [Express app](https://github.com/ricamhay123/groupspace/blob/main/src/app.js): `src/app.js`

### Identity & Membership

- [Auth routes](https://github.com/ricamhay123/groupspace/blob/main/src/modules/auth/auth.routes.js): `src/modules/auth/auth.routes.js`
- [Auth controller](https://github.com/ricamhay123/groupspace/blob/main/src/modules/auth/auth.controller.js): `src/modules/auth/auth.controller.js`
- [Auth service](https://github.com/ricamhay123/groupspace/blob/main/src/modules/auth/auth.service.js): `src/modules/auth/auth.service.js`
- [Auth middleware](https://github.com/ricamhay123/groupspace/blob/main/src/middleware/auth.middleware.js): `src/middleware/auth.middleware.js`
- [Workspace routes](https://github.com/ricamhay123/groupspace/blob/main/src/modules/groups/group.routes.js): `src/modules/groups/group.routes.js`
- [Workspace controller](https://github.com/ricamhay123/groupspace/blob/main/src/modules/groups/group.controller.js): `src/modules/groups/group.controller.js`
- [Workspace service](https://github.com/ricamhay123/groupspace/blob/main/src/modules/groups/group.service.js): `src/modules/groups/group.service.js`

### Workspace Features

- [Kanban tasks](https://github.com/ricamhay123/groupspace/tree/main/src/modules/tasks): `src/modules/tasks`
- [Shared notebook](https://github.com/ricamhay123/groupspace/tree/main/src/modules/notebook): `src/modules/notebook`
- [Expense ledger](https://github.com/ricamhay123/groupspace/tree/main/src/modules/expenses): `src/modules/expenses`
- [Discussions & activity](https://github.com/ricamhay123/groupspace/tree/main/src/modules/discussions): `src/modules/discussions`
- [Group calendar](https://github.com/ricamhay123/groupspace/tree/main/src/modules/calendar): `src/modules/calendar`
- [Debt calculation](https://github.com/ricamhay123/groupspace/blob/main/src/utils/calculation.util.js): `src/utils/calculation.util.js`

### Personal Productivity

- [Personal space](https://github.com/ricamhay123/groupspace/tree/main/src/modules/personal-space): `src/modules/personal-space`

### Other components

- **User**
- **Browser UI**
- **Neon PostgreSQL**

## Connections

- User → Browser UI: uses
- Browser UI → Dashboard: loads
- Dashboard → API client: requests
- API client → Express app: calls API
- HTTP server → Express app: starts
- Express app → Auth routes: mounts
- Express app → Workspace routes: mounts
- Express app → Kanban tasks: mounts routes
- Express app → Shared notebook: mounts routes
- Express app → Expense ledger: mounts routes
- Express app → Discussions & activity: mounts routes
- Express app → Group calendar: mounts routes
- Express app → Personal space: mounts routes
- Auth routes → Auth controller: dispatches
- Auth controller → Auth service: calls
- Auth service → Neon PostgreSQL: reads/writes
- Workspace routes → Workspace controller: dispatches
- Workspace controller → Workspace service: calls
- Auth middleware → Neon PostgreSQL: validates identity
- Kanban tasks → Neon PostgreSQL: workspace data
- Shared notebook → Neon PostgreSQL: workspace data
- Expense ledger → Neon PostgreSQL: ledger data
- Expense ledger → Debt calculation: summarizes balances
- Discussions & activity → Neon PostgreSQL: discussion data
- Group calendar → Neon PostgreSQL: event data
- Personal space → Neon PostgreSQL: private items
