# season101/teammatch architecture

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

- Interactive diagram: https://gitdiagram.com/season101/teammatch
- Repository: https://github.com/season101/teammatch

## Overview

TeamMatch is a role-based team-formation product: project owners post roles, candidates apply to ranked role cards, owners review applicants, and mutual likes fill roles until the team locks; locked members retire from other opportunities and team chat opens. The graph preserves these documented product stages even where their implementation files are absent from the supplied tree. The sampled backend source supports the health-check path, while the README documents the broader web/API and chat behavior. Dashed edges mark documented integrations or runtime links whose implementation was not sampled.

Main entry points: [`backend/apps/chat`](https://github.com/season101/teammatch/tree/main/backend/apps/chat) (Team chat), [`backend/config/settings/base.py`](https://github.com/season101/teammatch/blob/main/backend/config/settings/base.py) (Runtime settings), [`frontend/src`](https://github.com/season101/teammatch/tree/main/frontend/src) (Web app), [`frontend/src/lib/api.ts`](https://github.com/season101/teammatch/blob/main/frontend/src/lib/api.ts) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_webapp["Web app"]
  node_query["Health query<br/>[queries.ts]"]
  node_apiwrapper["API client<br/>[api.ts]"]
  node_clienttypes["API schema types<br/>[schema.ts]"]
end

subgraph group_identity["Accounts and profiles"]
  node_accounts["Accounts"]
  node_profiles["Profiles and skills"]
end

subgraph group_formation["Project and team formation"]
  node_projectroles["Projects and roles"]
  node_feed["Ranked role feed"]
  node_applications["Applications"]
  node_review["Owner review"]
  node_teamlock["Team lock"]
  node_retirement["Retirement and withdrawal"]
end

subgraph group_realtime["Team chat"]
  node_chat["Team chat"]
  node_asgi["ASGI entry<br/>[asgi.py]"]
  node_routing["WebSocket routing<br/>[routing.py]"]
end

subgraph group_platform["API and health"]
  node_api["HTTP API<br/>[urls.py]"]
  node_healthview["Health endpoints<br/>[views.py]"]
  node_healthservice["Readiness checks<br/>[services.py]"]
  node_healthserializer["Health response<br/>[serializers.py]"]
  node_settings["Runtime settings<br/>[base.py]"]
end

node_student(("Student"))
node_postgres[("PostgreSQL")]
node_redis["Redis"]

node_student -->|"uses"| node_webapp
node_webapp -->|"calls API"| node_api
node_webapp -.->|"opens chat"| node_chat
node_query -->|"uses"| node_apiwrapper
node_apiwrapper -->|"types requests"| node_clienttypes
node_apiwrapper -.->|"sends requests"| node_api
node_api -->|"routes to"| node_healthview
node_healthview -->|"checks readiness"| node_healthservice
node_healthview -->|"serializes response"| node_healthserializer
node_healthservice -->|"checks database"| node_postgres
node_healthservice -->|"pings Redis"| node_redis
node_settings -->|"configures connection"| node_postgres
node_settings -->|"configures channel layer"| node_redis
node_student -.->|"signs up or in"| node_accounts
node_accounts -.->|"maintains profile"| node_profiles
node_student -.->|"posts roles"| node_projectroles
node_student -.->|"browses ranked roles"| node_feed
node_feed -.->|"supports apply or pass"| node_applications
node_student -.->|"reviews applicants"| node_review
node_review -.->|"mutual likes fill roles"| node_teamlock
node_teamlock -.->|"withdraws other applications"| node_retirement
node_teamlock -.->|"opens chat"| node_chat
node_asgi -->|"dispatches WebSockets"| node_routing
node_routing -.->|"routes team sockets"| node_chat
node_settings -.->|"enables Channels"| node_chat

click node_webapp "https://github.com/season101/teammatch/tree/main/frontend/src"
click node_query "https://github.com/season101/teammatch/blob/main/frontend/src/features/health/queries.ts"
click node_apiwrapper "https://github.com/season101/teammatch/blob/main/frontend/src/lib/api.ts"
click node_clienttypes "https://github.com/season101/teammatch/blob/main/packages/api-client/schema.ts"
click node_accounts "https://github.com/season101/teammatch/tree/main/backend/apps/accounts"
click node_profiles "https://github.com/season101/teammatch/tree/main/backend/apps/profiles"
click node_projectroles "https://github.com/season101/teammatch/tree/main/backend/apps/projects"
click node_feed "https://github.com/season101/teammatch/tree/main/backend/apps/matching"
click node_applications "https://github.com/season101/teammatch/tree/main/backend/apps/matching"
click node_review "https://github.com/season101/teammatch/tree/main/backend/apps/matching"
click node_teamlock "https://github.com/season101/teammatch/tree/main/backend/apps/matching"
click node_retirement "https://github.com/season101/teammatch/tree/main/backend/apps/matching"
click node_chat "https://github.com/season101/teammatch/tree/main/backend/apps/chat"
click node_asgi "https://github.com/season101/teammatch/blob/main/backend/config/asgi.py"
click node_routing "https://github.com/season101/teammatch/blob/main/backend/config/routing.py"
click node_api "https://github.com/season101/teammatch/blob/main/backend/config/urls.py"
click node_healthview "https://github.com/season101/teammatch/blob/main/backend/apps/core/views.py"
click node_healthservice "https://github.com/season101/teammatch/blob/main/backend/apps/core/services.py"
click node_healthserializer "https://github.com/season101/teammatch/blob/main/backend/apps/core/serializers.py"
click node_settings "https://github.com/season101/teammatch/blob/main/backend/config/settings/base.py"

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_query,node_apiwrapper,node_clienttypes toneBlue
class node_accounts,node_profiles,node_postgres,node_redis toneAmber
class node_projectroles,node_feed,node_applications,node_review,node_teamlock,node_retirement toneMint
class node_chat,node_asgi,node_routing toneRose
class node_api,node_healthview,node_healthservice,node_healthserializer,node_settings,node_student toneIndigo
```

## Components

### Web experience

- [Web app](https://github.com/season101/teammatch/tree/main/frontend/src): `frontend/src`
- [Health query](https://github.com/season101/teammatch/blob/main/frontend/src/features/health/queries.ts): `frontend/src/features/health/queries.ts`
- [API client](https://github.com/season101/teammatch/blob/main/frontend/src/lib/api.ts): `frontend/src/lib/api.ts`
- [API schema types](https://github.com/season101/teammatch/blob/main/packages/api-client/schema.ts): `packages/api-client/schema.ts`

### Accounts and profiles

- [Accounts](https://github.com/season101/teammatch/tree/main/backend/apps/accounts): `backend/apps/accounts`
- [Profiles and skills](https://github.com/season101/teammatch/tree/main/backend/apps/profiles): `backend/apps/profiles`

### Project and team formation

- [Projects and roles](https://github.com/season101/teammatch/tree/main/backend/apps/projects): `backend/apps/projects`
- [Ranked role feed](https://github.com/season101/teammatch/tree/main/backend/apps/matching): `backend/apps/matching`
- [Applications](https://github.com/season101/teammatch/tree/main/backend/apps/matching): `backend/apps/matching`
- [Owner review](https://github.com/season101/teammatch/tree/main/backend/apps/matching): `backend/apps/matching`
- [Team lock](https://github.com/season101/teammatch/tree/main/backend/apps/matching): `backend/apps/matching`
- [Retirement and withdrawal](https://github.com/season101/teammatch/tree/main/backend/apps/matching): `backend/apps/matching`

### Team chat

- [Team chat](https://github.com/season101/teammatch/tree/main/backend/apps/chat): `backend/apps/chat`
- [ASGI entry](https://github.com/season101/teammatch/blob/main/backend/config/asgi.py): `backend/config/asgi.py`
- [WebSocket routing](https://github.com/season101/teammatch/blob/main/backend/config/routing.py): `backend/config/routing.py`

### API and health

- [HTTP API](https://github.com/season101/teammatch/blob/main/backend/config/urls.py): `backend/config/urls.py`
- [Health endpoints](https://github.com/season101/teammatch/blob/main/backend/apps/core/views.py): `backend/apps/core/views.py`
- [Readiness checks](https://github.com/season101/teammatch/blob/main/backend/apps/core/services.py): `backend/apps/core/services.py`
- [Health response](https://github.com/season101/teammatch/blob/main/backend/apps/core/serializers.py): `backend/apps/core/serializers.py`
- [Runtime settings](https://github.com/season101/teammatch/blob/main/backend/config/settings/base.py): `backend/config/settings/base.py`

### Other components

- **Student**
- **PostgreSQL**
- **Redis**

## Connections

- Student → Web app: uses (evidence: `README.md`)
- Web app → HTTP API: calls API (evidence: `README.md`)
- Web app → Team chat: opens chat (evidence: `README.md`)
- Health query → API client: uses (evidence: `frontend/src/features/health/queries.ts`)
- API client → API schema types: types requests (evidence: `frontend/src/lib/api.ts`)
- API client → HTTP API: sends requests (evidence: `README.md`)
- HTTP API → Health endpoints: routes to (evidence: `backend/config/urls.py`)
- Health endpoints → Readiness checks: checks readiness (evidence: `backend/apps/core/views.py`)
- Health endpoints → Health response: serializes response (evidence: `backend/apps/core/views.py`)
- Readiness checks → PostgreSQL: checks database (evidence: `backend/apps/core/services.py`)
- Readiness checks → Redis: pings Redis (evidence: `backend/apps/core/services.py`)
- Runtime settings → PostgreSQL: configures connection (evidence: `backend/config/settings/base.py`)
- Runtime settings → Redis: configures channel layer (evidence: `backend/config/settings/base.py`)
- Student → Accounts: signs up or in (evidence: `README.md`)
- Accounts → Profiles and skills: maintains profile (evidence: `README.md`)
- Student → Projects and roles: posts roles (evidence: `README.md`)
- Student → Ranked role feed: browses ranked roles (evidence: `README.md`)
- Ranked role feed → Applications: supports apply or pass (evidence: `README.md`)
- Student → Owner review: reviews applicants (evidence: `README.md`)
- Owner review → Team lock: mutual likes fill roles (evidence: `README.md`)
- Team lock → Retirement and withdrawal: withdraws other applications (evidence: `README.md`)
- Team lock → Team chat: opens chat (evidence: `README.md`)
- ASGI entry → WebSocket routing: dispatches WebSockets (evidence: `backend/config/asgi.py`)
- WebSocket routing → Team chat: routes team sockets (evidence: `README.md`)
- Runtime settings → Team chat: enables Channels (evidence: `README.md`)
