# aruljayaraj-afx/skillwell_loginapi architecture

> Architecture diagram of the GitHub repository aruljayaraj-afx/skillwell_loginapi, 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/aruljayaraj-afx/skillwell_loginapi
- Repository: https://github.com/aruljayaraj-afx/skillwell_loginapi

## Overview

This is a small FastAPI user-account API. An HTTP client reaches the application, which mounts the user router; its endpoints delegate login, account creation, password changes, and token authorization to service classes. Those services query or modify the SQLAlchemy user model through a shared database session, with PostgreSQL configured as the backing store. The sampled code also shows short-lived JWT issuance and validation. The README is empty, and no sampled code uses the Pydantic schema, so neither is represented as a runtime stage.

Main entry points: [`services/user_check.py`](https://github.com/aruljayaraj-afx/skillwell_loginapi/blob/main/services/user_check.py) (Account and Token Logic), [`main.py`](https://github.com/aruljayaraj-afx/skillwell_loginapi/blob/main/main.py) (FastAPI Application), [`routers/user_info.py`](https://github.com/aruljayaraj-afx/skillwell_loginapi/blob/main/routers/user_info.py) (User Routes), [`database/db.py`](https://github.com/aruljayaraj-afx/skillwell_loginapi/blob/main/database/db.py) (Database Session)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_application["FastAPI Application<br/>[main.py]"]
  node_user_router["User Routes<br/>[user_info.py]"]
end

subgraph group_identity["Account Services"]
  node_account_services["Account and Token Logic<br/>[user_check.py]"]
end

subgraph group_persistence["Persistence"]
  node_user_model["User Record<br/>[user_data.py]"]
  node_db_session["Database Session<br/>[db.py]"]
end

node_client(("HTTP Client"))
node_postgres[("PostgreSQL")]

node_client -->|"sends requests"| node_application
node_application -->|"mounts routes"| node_user_router
node_user_router -->|"delegates via Depends"| node_account_services
node_account_services -->|"queries and commits"| node_db_session
node_account_services -->|"queries and updates"| node_user_model
node_db_session -->|"connects to"| node_postgres

click node_application "https://github.com/aruljayaraj-afx/skillwell_loginapi/blob/main/main.py"
click node_user_router "https://github.com/aruljayaraj-afx/skillwell_loginapi/blob/main/routers/user_info.py"
click node_account_services "https://github.com/aruljayaraj-afx/skillwell_loginapi/blob/main/services/user_check.py"
click node_user_model "https://github.com/aruljayaraj-afx/skillwell_loginapi/blob/main/models/user_data.py"
click node_db_session "https://github.com/aruljayaraj-afx/skillwell_loginapi/blob/main/database/db.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_user_router,node_client toneBlue
class node_account_services,node_postgres toneAmber
class node_user_model,node_db_session toneMint
```

## Components

### HTTP API

- [FastAPI Application](https://github.com/aruljayaraj-afx/skillwell_loginapi/blob/main/main.py): `main.py`
- [User Routes](https://github.com/aruljayaraj-afx/skillwell_loginapi/blob/main/routers/user_info.py): `routers/user_info.py`

### Account Services

- [Account and Token Logic](https://github.com/aruljayaraj-afx/skillwell_loginapi/blob/main/services/user_check.py): `services/user_check.py`

### Persistence

- [User Record](https://github.com/aruljayaraj-afx/skillwell_loginapi/blob/main/models/user_data.py): `models/user_data.py`
- [Database Session](https://github.com/aruljayaraj-afx/skillwell_loginapi/blob/main/database/db.py): `database/db.py`

### Other components

- **HTTP Client**
- **PostgreSQL**

## Connections

- HTTP Client → FastAPI Application: sends requests (evidence: `main.py`)
- FastAPI Application → User Routes: mounts routes (evidence: `main.py`)
- User Routes → Account and Token Logic: delegates via Depends (evidence: `routers/user_info.py`)
- Account and Token Logic → Database Session: queries and commits (evidence: `services/user_check.py`)
- Account and Token Logic → User Record: queries and updates (evidence: `services/user_check.py`)
- Database Session → PostgreSQL: connects to (evidence: `database/db.py`)
