# lc-lly/ai-lab architecture

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

- Interactive diagram: https://gitdiagram.com/lc-lly/ai-lab
- Repository: https://github.com/lc-lly/ai-lab

## Overview

This repository is a prototype lab-reservation system with a Vue interface and a small FastAPI backend. The visible user journey is navigating to the manager area, viewing home or lab screens, and using login or registration forms; the login currently simulates success locally rather than authenticating with the backend. The manager shell also exposes equipment and user-management menu entries, but their screens and reservation/agent workflows are not present in the sampled tree. Backend evidence shows startup table creation and a user model, not API endpoints for these frontend actions.

Main entry points: [`frontend/src/router/index.js`](https://github.com/lc-lly/ai-lab/blob/main/frontend/src/router/index.js) (Route map), [`backend/app/database.py`](https://github.com/lc-lly/ai-lab/blob/main/backend/app/database.py) (DB session and base), [`frontend/src/layouts/Layout.vue`](https://github.com/lc-lly/ai-lab/blob/main/frontend/src/layouts/Layout.vue) (Manager shell), [`frontend/src/main.js`](https://github.com/lc-lly/ai-lab/blob/main/frontend/src/main.js) (Vue bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_vue_entry["Vue bootstrap<br/>[main.js]"]
  node_app_shell["App view<br/>[App.vue]"]
  node_router["Route map<br/>[index.js]"]
  node_manager_shell["Manager shell<br/>[Layout.vue]"]
  node_login["Login form<br/>[Login.vue]"]
  node_registration["Registration form<br/>[Register.vue]"]
end

subgraph group_backend["Backend and persistence"]
  node_api["FastAPI app<br/>[main.py]"]
  node_settings["DB settings<br/>[config.py]"]
  node_db_layer["DB session and base<br/>[database.py]"]
  node_user_model["User model<br/>[user.py]"]
  node_database[("Configured database")]
end

subgraph group_domain["Reservation interface"]
  node_home["Home screen<br/>[Home.vue]"]
  node_lab_screen["Lab screen<br/>[Lab.vue]"]
  node_admin_screens["Admin screens"]
end

node_visitor(("Visitor"))

node_vue_entry -->|"mounts"| node_app_shell
node_vue_entry -->|"installs"| node_router
node_visitor -.->|"navigates"| node_router
node_router -->|"routes to"| node_manager_shell
node_router -->|"routes to"| node_login
node_router -->|"routes to"| node_registration
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_lab_screen
node_app_shell -->|"renders outlet"| node_router
node_manager_shell -->|"renders child outlet"| node_router
node_manager_shell -->|"offers menu entries"| node_admin_screens
node_login -->|"redirects after success"| node_router
node_api -->|"imports model"| node_user_model
node_api -->|"creates tables"| node_db_layer
node_db_layer -->|"loads URL"| node_settings
node_db_layer -->|"connects"| node_database
node_user_model -->|"extends base"| node_db_layer

click node_vue_entry "https://github.com/lc-lly/ai-lab/blob/main/frontend/src/main.js"
click node_app_shell "https://github.com/lc-lly/ai-lab/blob/main/frontend/src/App.vue"
click node_router "https://github.com/lc-lly/ai-lab/blob/main/frontend/src/router/index.js"
click node_manager_shell "https://github.com/lc-lly/ai-lab/blob/main/frontend/src/layouts/Layout.vue"
click node_login "https://github.com/lc-lly/ai-lab/blob/main/frontend/src/views/Login.vue"
click node_registration "https://github.com/lc-lly/ai-lab/blob/main/frontend/src/views/Register.vue"
click node_home "https://github.com/lc-lly/ai-lab/blob/main/frontend/src/views/Home.vue"
click node_lab_screen "https://github.com/lc-lly/ai-lab/blob/main/frontend/src/views/Lab.vue"
click node_admin_screens "https://github.com/lc-lly/ai-lab/tree/main/frontend/src/views"
click node_api "https://github.com/lc-lly/ai-lab/blob/main/backend/app/main.py"
click node_settings "https://github.com/lc-lly/ai-lab/blob/main/backend/app/config.py"
click node_db_layer "https://github.com/lc-lly/ai-lab/blob/main/backend/app/database.py"
click node_user_model "https://github.com/lc-lly/ai-lab/blob/main/backend/app/models/user.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_vue_entry,node_app_shell,node_router,node_manager_shell,node_login,node_registration toneBlue
class node_api,node_settings,node_db_layer,node_user_model,node_database toneAmber
class node_home,node_lab_screen,node_admin_screens toneMint
class node_visitor toneIndigo
```

## Components

### Web application

- [Vue bootstrap](https://github.com/lc-lly/ai-lab/blob/main/frontend/src/main.js): `frontend/src/main.js`
- [App view](https://github.com/lc-lly/ai-lab/blob/main/frontend/src/App.vue): `frontend/src/App.vue`
- [Route map](https://github.com/lc-lly/ai-lab/blob/main/frontend/src/router/index.js): `frontend/src/router/index.js`
- [Manager shell](https://github.com/lc-lly/ai-lab/blob/main/frontend/src/layouts/Layout.vue): `frontend/src/layouts/Layout.vue`
- [Login form](https://github.com/lc-lly/ai-lab/blob/main/frontend/src/views/Login.vue): `frontend/src/views/Login.vue`
- [Registration form](https://github.com/lc-lly/ai-lab/blob/main/frontend/src/views/Register.vue): `frontend/src/views/Register.vue`

### Backend and persistence

- [FastAPI app](https://github.com/lc-lly/ai-lab/blob/main/backend/app/main.py): `backend/app/main.py`
- [DB settings](https://github.com/lc-lly/ai-lab/blob/main/backend/app/config.py): `backend/app/config.py`
- [DB session and base](https://github.com/lc-lly/ai-lab/blob/main/backend/app/database.py): `backend/app/database.py`
- [User model](https://github.com/lc-lly/ai-lab/blob/main/backend/app/models/user.py): `backend/app/models/user.py`
- **Configured database**

### Reservation interface

- [Home screen](https://github.com/lc-lly/ai-lab/blob/main/frontend/src/views/Home.vue): `frontend/src/views/Home.vue`
- [Lab screen](https://github.com/lc-lly/ai-lab/blob/main/frontend/src/views/Lab.vue): `frontend/src/views/Lab.vue`
- [Admin screens](https://github.com/lc-lly/ai-lab/tree/main/frontend/src/views): `frontend/src/views`

### Other components

- **Visitor**

## Connections

- Vue bootstrap → App view: mounts (evidence: `frontend/src/main.js`)
- Vue bootstrap → Route map: installs (evidence: `frontend/src/main.js`)
- Visitor → Route map: navigates
- Route map → Manager shell: routes to (evidence: `frontend/src/router/index.js`)
- Route map → Login form: routes to (evidence: `frontend/src/router/index.js`)
- Route map → Registration form: routes to (evidence: `frontend/src/router/index.js`)
- Route map → Home screen: routes to (evidence: `frontend/src/router/index.js`)
- Route map → Lab screen: routes to (evidence: `frontend/src/router/index.js`)
- App view → Route map: renders outlet (evidence: `frontend/src/App.vue`)
- Manager shell → Route map: renders child outlet (evidence: `frontend/src/layouts/Layout.vue`)
- Manager shell → Admin screens: offers menu entries (evidence: `frontend/src/layouts/Layout.vue`)
- Login form → Route map: redirects after success (evidence: `frontend/src/views/Login.vue`)
- FastAPI app → User model: imports model (evidence: `backend/app/main.py`)
- FastAPI app → DB session and base: creates tables (evidence: `backend/app/main.py`)
- DB session and base → DB settings: loads URL (evidence: `backend/app/database.py`)
- DB session and base → Configured database: connects (evidence: `backend/app/database.py`)
- User model → DB session and base: extends base (evidence: `backend/app/models/user.py`)
