# ist-team3/team3-lms architecture

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

- Interactive diagram: https://gitdiagram.com/ist-team3/team3-lms
- Repository: https://github.com/ist-team3/team3-lms

## Overview

LinkHub is a bookmark and team-work management application: users authenticate, organize and search personal links, collaborate through team links, and manage assigned task progress; administrators can inspect audit logs. The React frontend calls a Flask REST API, whose route handlers enforce access rules and persist domain records. The README describes the frontend API layer as replaceable, while the sampled client currently sends authenticated HTTP requests. Backend route coverage beyond the sampled task and link handlers is based on the source index and README capability descriptions.

Main entry points: [`backend/app/models`](https://github.com/ist-team3/team3-lms/tree/main/backend/app/models) (Domain records), [`frontend/src/views`](https://github.com/ist-team3/team3-lms/tree/main/frontend/src/views) (Product screens), [`backend/app/utils/audit.py`](https://github.com/ist-team3/team3-lms/blob/main/backend/app/utils/audit.py) (Audit logging), [`frontend/src/App.jsx`](https://github.com/ist-team3/team3-lms/blob/main/frontend/src/App.jsx) (Application shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_app["Application shell<br/>[App.jsx]"]
  node_routes["Route guards<br/>[routes.jsx]"]
  node_auth_ui["Authentication state<br/>[AuthContext.jsx]"]
  node_themes["Theme selection<br/>[ThemeContext.jsx]"]
  node_views["Product screens"]
  node_link_ui["Link workflows<br/>[MyLinksView.jsx]"]
  node_team_ui["Team workflows<br/>[TeamDetailView.jsx]"]
  node_task_ui["Task board<br/>[KanbanView.jsx]"]
  node_admin_ui["Audit console<br/>[AdminLogsView.jsx]"]
  node_hooks["Data hooks"]
end

subgraph group_api["API and access"]
  node_api_services["API services"]
  node_http_client["HTTP client<br/>[client.js]"]
  node_flask["Flask API<br/>[__init__.py]"]
end

subgraph group_domain["Domain services"]
  node_auth_routes["Authentication routes<br/>[auth.py]"]
  node_link_routes["Personal link routes<br/>[links.py]"]
  node_category_routes["Category routes<br/>[categories.py]"]
  node_team_routes["Team routes<br/>[teams.py]"]
  node_membership_routes["Membership routes<br/>[team_members.py]"]
  node_team_link_routes["Team link routes<br/>[team_links.py]"]
  node_task_routes["Task routes<br/>[tasks.py]"]
  node_admin_routes["Admin routes<br/>[admin.py]"]
  node_authorization["Role and membership checks<br/>[decorators.py]"]
  node_audit["Audit logging<br/>[audit.py]"]
end

subgraph group_storage["Persistence"]
  node_models["Domain records"]
  node_database[("SQLAlchemy database<br/>[extensions.py]")]
  node_audit_model["Audit records<br/>[audit_log.py]"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_routes
node_app -->|"provides"| node_auth_ui
node_app -->|"provides"| node_themes
node_routes -->|"checks session"| node_auth_ui
node_routes -->|"routes to"| node_views
node_views -.->|"includes"| node_link_ui
node_views -.->|"includes"| node_team_ui
node_views -.->|"includes"| node_task_ui
node_views -->|"includes"| node_admin_ui
node_auth_ui -->|"authenticates through"| node_api_services
node_hooks -->|"calls"| node_api_services
node_api_services -->|"requests through"| node_http_client
node_http_client -->|"sends HTTP"| node_flask
node_flask -->|"registers"| node_auth_routes
node_link_routes -->|"reads and writes"| node_models
node_category_routes -.->|"reads and writes"| node_models
node_team_routes -.->|"reads and writes"| node_models
node_membership_routes -.->|"reads and writes"| node_models
node_team_link_routes -.->|"reads and writes"| node_models
node_task_routes -->|"reads and writes"| node_models
node_auth_routes -->|"reads and writes"| node_models
node_admin_routes -.->|"reads"| node_audit_model
node_link_routes -->|"checks access"| node_authorization
node_task_routes -->|"checks identity"| node_authorization
node_task_routes -->|"records actions"| node_audit
node_link_routes -->|"records actions"| node_audit
node_auth_routes -->|"records actions"| node_audit
node_audit -->|"creates records"| node_audit_model
node_audit -->|"commits"| node_database
node_models -->|"maps records"| node_database

click node_app "https://github.com/ist-team3/team3-lms/blob/main/frontend/src/App.jsx"
click node_routes "https://github.com/ist-team3/team3-lms/blob/main/frontend/src/routes.jsx"
click node_auth_ui "https://github.com/ist-team3/team3-lms/blob/main/frontend/src/context/AuthContext.jsx"
click node_themes "https://github.com/ist-team3/team3-lms/blob/main/frontend/src/context/ThemeContext.jsx"
click node_views "https://github.com/ist-team3/team3-lms/tree/main/frontend/src/views"
click node_link_ui "https://github.com/ist-team3/team3-lms/blob/main/frontend/src/views/MyLinksView.jsx"
click node_team_ui "https://github.com/ist-team3/team3-lms/blob/main/frontend/src/views/TeamDetailView.jsx"
click node_task_ui "https://github.com/ist-team3/team3-lms/blob/main/frontend/src/views/KanbanView.jsx"
click node_admin_ui "https://github.com/ist-team3/team3-lms/blob/main/frontend/src/views/AdminLogsView.jsx"
click node_hooks "https://github.com/ist-team3/team3-lms/tree/main/frontend/src/hooks"
click node_api_services "https://github.com/ist-team3/team3-lms/tree/main/frontend/src/api"
click node_http_client "https://github.com/ist-team3/team3-lms/blob/main/frontend/src/api/client.js"
click node_flask "https://github.com/ist-team3/team3-lms/blob/main/backend/app/__init__.py"
click node_auth_routes "https://github.com/ist-team3/team3-lms/blob/main/backend/app/routes/auth.py"
click node_link_routes "https://github.com/ist-team3/team3-lms/blob/main/backend/app/routes/links.py"
click node_category_routes "https://github.com/ist-team3/team3-lms/blob/main/backend/app/routes/categories.py"
click node_team_routes "https://github.com/ist-team3/team3-lms/blob/main/backend/app/routes/teams.py"
click node_membership_routes "https://github.com/ist-team3/team3-lms/blob/main/backend/app/routes/team_members.py"
click node_team_link_routes "https://github.com/ist-team3/team3-lms/blob/main/backend/app/routes/team_links.py"
click node_task_routes "https://github.com/ist-team3/team3-lms/blob/main/backend/app/routes/tasks.py"
click node_admin_routes "https://github.com/ist-team3/team3-lms/blob/main/backend/app/routes/admin.py"
click node_authorization "https://github.com/ist-team3/team3-lms/blob/main/backend/app/utils/decorators.py"
click node_audit "https://github.com/ist-team3/team3-lms/blob/main/backend/app/utils/audit.py"
click node_models "https://github.com/ist-team3/team3-lms/tree/main/backend/app/models"
click node_database "https://github.com/ist-team3/team3-lms/blob/main/backend/app/extensions.py"
click node_audit_model "https://github.com/ist-team3/team3-lms/blob/main/backend/app/models/audit_log.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_app,node_routes,node_auth_ui,node_themes,node_views,node_link_ui,node_team_ui,node_task_ui,node_admin_ui,node_hooks,node_user toneBlue
class node_api_services,node_http_client,node_flask toneAmber
class node_auth_routes,node_link_routes,node_category_routes,node_team_routes,node_membership_routes,node_team_link_routes,node_task_routes,node_admin_routes,node_authorization,node_audit toneMint
class node_models,node_database,node_audit_model toneRose
```

## Components

### Web application

- [Application shell](https://github.com/ist-team3/team3-lms/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Route guards](https://github.com/ist-team3/team3-lms/blob/main/frontend/src/routes.jsx): `frontend/src/routes.jsx`
- [Authentication state](https://github.com/ist-team3/team3-lms/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Theme selection](https://github.com/ist-team3/team3-lms/blob/main/frontend/src/context/ThemeContext.jsx): `frontend/src/context/ThemeContext.jsx`
- [Product screens](https://github.com/ist-team3/team3-lms/tree/main/frontend/src/views): `frontend/src/views`
- [Link workflows](https://github.com/ist-team3/team3-lms/blob/main/frontend/src/views/MyLinksView.jsx): `frontend/src/views/MyLinksView.jsx`
- [Team workflows](https://github.com/ist-team3/team3-lms/blob/main/frontend/src/views/TeamDetailView.jsx): `frontend/src/views/TeamDetailView.jsx`
- [Task board](https://github.com/ist-team3/team3-lms/blob/main/frontend/src/views/KanbanView.jsx): `frontend/src/views/KanbanView.jsx`
- [Audit console](https://github.com/ist-team3/team3-lms/blob/main/frontend/src/views/AdminLogsView.jsx): `frontend/src/views/AdminLogsView.jsx`
- [Data hooks](https://github.com/ist-team3/team3-lms/tree/main/frontend/src/hooks): `frontend/src/hooks`

### API and access

- [API services](https://github.com/ist-team3/team3-lms/tree/main/frontend/src/api): `frontend/src/api`
- [HTTP client](https://github.com/ist-team3/team3-lms/blob/main/frontend/src/api/client.js): `frontend/src/api/client.js`
- [Flask API](https://github.com/ist-team3/team3-lms/blob/main/backend/app/__init__.py): `backend/app/__init__.py`

### Domain services

- [Authentication routes](https://github.com/ist-team3/team3-lms/blob/main/backend/app/routes/auth.py): `backend/app/routes/auth.py`
- [Personal link routes](https://github.com/ist-team3/team3-lms/blob/main/backend/app/routes/links.py): `backend/app/routes/links.py`
- [Category routes](https://github.com/ist-team3/team3-lms/blob/main/backend/app/routes/categories.py): `backend/app/routes/categories.py`
- [Team routes](https://github.com/ist-team3/team3-lms/blob/main/backend/app/routes/teams.py): `backend/app/routes/teams.py`
- [Membership routes](https://github.com/ist-team3/team3-lms/blob/main/backend/app/routes/team_members.py): `backend/app/routes/team_members.py`
- [Team link routes](https://github.com/ist-team3/team3-lms/blob/main/backend/app/routes/team_links.py): `backend/app/routes/team_links.py`
- [Task routes](https://github.com/ist-team3/team3-lms/blob/main/backend/app/routes/tasks.py): `backend/app/routes/tasks.py`
- [Admin routes](https://github.com/ist-team3/team3-lms/blob/main/backend/app/routes/admin.py): `backend/app/routes/admin.py`
- [Role and membership checks](https://github.com/ist-team3/team3-lms/blob/main/backend/app/utils/decorators.py): `backend/app/utils/decorators.py`
- [Audit logging](https://github.com/ist-team3/team3-lms/blob/main/backend/app/utils/audit.py): `backend/app/utils/audit.py`

### Persistence

- [Domain records](https://github.com/ist-team3/team3-lms/tree/main/backend/app/models): `backend/app/models`
- [SQLAlchemy database](https://github.com/ist-team3/team3-lms/blob/main/backend/app/extensions.py): `backend/app/extensions.py`
- [Audit records](https://github.com/ist-team3/team3-lms/blob/main/backend/app/models/audit_log.py): `backend/app/models/audit_log.py`

### Other components

- **User**

## Connections

- User → Application shell: uses (evidence: `README.md`)
- Application shell → Route guards: renders (evidence: `frontend/src/App.jsx`)
- Application shell → Authentication state: provides (evidence: `frontend/src/App.jsx`)
- Application shell → Theme selection: provides (evidence: `frontend/src/App.jsx`)
- Route guards → Authentication state: checks session (evidence: `frontend/src/routes.jsx`)
- Route guards → Product screens: routes to (evidence: `frontend/src/routes.jsx`)
- Product screens → Link workflows: includes
- Product screens → Team workflows: includes
- Product screens → Task board: includes
- Product screens → Audit console: includes (evidence: `frontend/src/routes.jsx`)
- Authentication state → API services: authenticates through (evidence: `frontend/src/context/AuthContext.jsx`)
- Data hooks → API services: calls (evidence: `frontend/src/hooks/useLinks.js`)
- API services → HTTP client: requests through (evidence: `frontend/src/api/linksApi.js`)
- HTTP client → Flask API: sends HTTP (evidence: `README.md`)
- Flask API → Authentication routes: registers (evidence: `backend/app/__init__.py`)
- Personal link routes → Domain records: reads and writes (evidence: `backend/app/routes/links.py`)
- Category routes → Domain records: reads and writes
- Team routes → Domain records: reads and writes
- Membership routes → Domain records: reads and writes
- Team link routes → Domain records: reads and writes
- Task routes → Domain records: reads and writes (evidence: `backend/app/routes/tasks.py`)
- Authentication routes → Domain records: reads and writes (evidence: `backend/app/routes/auth.py`)
- Admin routes → Audit records: reads
- Personal link routes → Role and membership checks: checks access (evidence: `backend/app/routes/links.py`)
- Task routes → Role and membership checks: checks identity (evidence: `backend/app/routes/tasks.py`)
- Task routes → Audit logging: records actions (evidence: `backend/app/routes/tasks.py`)
- Personal link routes → Audit logging: records actions (evidence: `backend/app/routes/links.py`)
- Authentication routes → Audit logging: records actions (evidence: `backend/app/routes/auth.py`)
- Audit logging → Audit records: creates records (evidence: `backend/app/utils/audit.py`)
- Audit logging → SQLAlchemy database: commits (evidence: `backend/app/utils/audit.py`)
- Domain records → SQLAlchemy database: maps records (evidence: `backend/app/models/category.py`)
