# evr1lay/grooves architecture

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

- Interactive diagram: https://gitdiagram.com/evr1lay/grooves
- Repository: https://github.com/evr1lay/grooves

## Overview

Grooves is a record-catalog application: a user interacts with a single-page frontend, which uses a FastAPI CRUD API to list, create, update, and delete records. Requests pass through route handlers and dependency injection to a record service, repository, and SQLite-backed SQLAlchemy models. Schemas define API payloads, while application startup initializes the database tables. The README documents the frontend and CRUD API; frontend implementation details and its exact HTTP wiring were not sampled.

Main entry points: [`app/api/routers/record.py`](https://github.com/evr1lay/grooves/blob/main/app/api/routers/record.py) (Record routes), [`app/db/session.py`](https://github.com/evr1lay/grooves/blob/main/app/db/session.py) (Database session), [`app/main.py`](https://github.com/evr1lay/grooves/blob/main/app/main.py) (FastAPI application), [`app/repositories/record.py`](https://github.com/evr1lay/grooves/blob/main/app/repositories/record.py) (Record repository)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API and application"]
  node_application["FastAPI application<br/>[main.py]"]
  node_routes["Record routes<br/>[record.py]"]
  node_dependencies["Service dependencies<br/>[dependencies.py]"]
end

subgraph group_domain["Record domain"]
  node_schemas["Record schemas<br/>[record.py]"]
  node_service["Record service<br/>[record.py]"]
end

subgraph group_persistence["Persistence"]
  node_repository["Record repository<br/>[record.py]"]
  node_record_model["Record ORM model<br/>[record.py]"]
  node_base_model["ORM base<br/>[base.py]"]
  node_db_session["Database session<br/>[session.py]"]
  node_configuration["Database configuration<br/>[config.py]"]
  node_sqlite[("SQLite records store")]
end

subgraph group_client["Client"]
  node_frontend["Record frontend<br/>[index.html]"]
end

node_user(("User"))

node_user -->|"uses"| node_frontend
node_frontend -->|"calls CRUD API"| node_routes
node_application -->|"registers"| node_routes
node_application -->|"creates tables"| node_base_model
node_application -->|"uses engine"| node_db_session
node_routes -->|"resolves service"| node_dependencies
node_routes -->|"calls"| node_service
node_routes -->|"validates and returns"| node_schemas
node_dependencies -->|"gets session"| node_db_session
node_dependencies -->|"constructs"| node_service
node_service -->|"calls"| node_repository
node_service -->|"validates output"| node_schemas
node_repository -->|"queries and persists"| node_record_model
node_repository -->|"accepts payloads"| node_schemas
node_repository -->|"uses session"| node_db_session
node_record_model -->|"extends"| node_base_model
node_db_session -->|"loads settings"| node_configuration
node_db_session -->|"connects"| node_sqlite
node_application -->|"initializes schema"| node_sqlite

click node_frontend "https://github.com/evr1lay/grooves/blob/main/frontend/index.html"
click node_application "https://github.com/evr1lay/grooves/blob/main/app/main.py"
click node_routes "https://github.com/evr1lay/grooves/blob/main/app/api/routers/record.py"
click node_dependencies "https://github.com/evr1lay/grooves/blob/main/app/api/dependencies.py"
click node_schemas "https://github.com/evr1lay/grooves/blob/main/app/schemas/record.py"
click node_service "https://github.com/evr1lay/grooves/blob/main/app/services/record.py"
click node_repository "https://github.com/evr1lay/grooves/blob/main/app/repositories/record.py"
click node_record_model "https://github.com/evr1lay/grooves/blob/main/app/models/record.py"
click node_base_model "https://github.com/evr1lay/grooves/blob/main/app/models/base.py"
click node_db_session "https://github.com/evr1lay/grooves/blob/main/app/db/session.py"
click node_configuration "https://github.com/evr1lay/grooves/blob/main/app/core/config.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_application,node_routes,node_dependencies,node_user toneBlue
class node_schemas,node_service toneAmber
class node_repository,node_record_model,node_base_model,node_db_session,node_configuration,node_sqlite toneMint
class node_frontend toneRose
```

## Components

### API and application

- [FastAPI application](https://github.com/evr1lay/grooves/blob/main/app/main.py): `app/main.py`
- [Record routes](https://github.com/evr1lay/grooves/blob/main/app/api/routers/record.py): `app/api/routers/record.py`
- [Service dependencies](https://github.com/evr1lay/grooves/blob/main/app/api/dependencies.py): `app/api/dependencies.py`

### Record domain

- [Record schemas](https://github.com/evr1lay/grooves/blob/main/app/schemas/record.py): `app/schemas/record.py`
- [Record service](https://github.com/evr1lay/grooves/blob/main/app/services/record.py): `app/services/record.py`

### Persistence

- [Record repository](https://github.com/evr1lay/grooves/blob/main/app/repositories/record.py): `app/repositories/record.py`
- [Record ORM model](https://github.com/evr1lay/grooves/blob/main/app/models/record.py): `app/models/record.py`
- [ORM base](https://github.com/evr1lay/grooves/blob/main/app/models/base.py): `app/models/base.py`
- [Database session](https://github.com/evr1lay/grooves/blob/main/app/db/session.py): `app/db/session.py`
- [Database configuration](https://github.com/evr1lay/grooves/blob/main/app/core/config.py): `app/core/config.py`
- **SQLite records store**

### Client

- [Record frontend](https://github.com/evr1lay/grooves/blob/main/frontend/index.html): `frontend/index.html`

### Other components

- **User**

## Connections

- User → Record frontend: uses (evidence: `README.md`)
- Record frontend → Record routes: calls CRUD API (evidence: `README.md`)
- FastAPI application → Record routes: registers (evidence: `app/main.py`)
- FastAPI application → ORM base: creates tables (evidence: `app/main.py`)
- FastAPI application → Database session: uses engine (evidence: `app/main.py`)
- Record routes → Service dependencies: resolves service (evidence: `app/api/routers/record.py`)
- Record routes → Record service: calls (evidence: `app/api/routers/record.py`)
- Record routes → Record schemas: validates and returns (evidence: `app/api/routers/record.py`)
- Service dependencies → Database session: gets session (evidence: `app/api/dependencies.py`)
- Service dependencies → Record service: constructs (evidence: `app/api/dependencies.py`)
- Record service → Record repository: calls (evidence: `app/services/record.py`)
- Record service → Record schemas: validates output (evidence: `app/services/record.py`)
- Record repository → Record ORM model: queries and persists (evidence: `app/repositories/record.py`)
- Record repository → Record schemas: accepts payloads (evidence: `app/repositories/record.py`)
- Record repository → Database session: uses session (evidence: `app/repositories/record.py`)
- Record ORM model → ORM base: extends (evidence: `app/models/record.py`)
- Database session → Database configuration: loads settings (evidence: `app/db/session.py`)
- Database session → SQLite records store: connects (evidence: `app/db/session.py`)
- FastAPI application → SQLite records store: initializes schema (evidence: `app/main.py`)
