# shashankshekhar05/zorvyn_assignment architecture

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

- Interactive diagram: https://gitdiagram.com/shashankshekhar05/zorvyn_assignment
- Repository: https://github.com/shashankshekhar05/zorvyn_assignment

## Overview

Finance Dashboard is a FastAPI backend for recording income and expenses, managing user access, and presenting financial summaries. The principal workflow is an authenticated client request entering the API, passing through route and service logic, and reading or changing financial records in the database; admin-only routes govern record changes. Authentication covers registration and token issuance, while the dashboard service computes summaries, category totals, and time trends. The README is empty and several route/dependency modules were not sampled, so their internal wiring is not asserted.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API surface"]
  node_application["FastAPI app"]
  node_dependencies["Request dependencies"]
end

subgraph group_identity["Identity and access"]
  node_auth_routes["Auth routes"]
  node_user_routes["User routes"]
  node_user_service["User service"]
  node_security["Token security"]
  node_user_model["User model"]
  node_auth_schema["User schemas"]
end

subgraph group_finance["Financial records"]
  node_transaction_routes["Transaction routes"]
  node_transaction_service["Transaction service"]
  node_dashboard_routes["Dashboard routes"]
  node_dashboard_service["Dashboard analytics"]
  node_transaction_model["Financial records"]
  node_transaction_schema["Transaction schemas"]
  node_dashboard_schema["Dashboard schemas"]
end

subgraph group_persistence["Persistence"]
  node_database_layer["Async database"]
  node_sql_store[("SQL database")]
end

node_client(("API client"))

node_client -->|"sends requests"| node_application
node_application -->|"dispatches auth"| node_auth_routes
node_application -->|"dispatches users"| node_user_routes
node_application -->|"dispatches records"| node_transaction_routes
node_application -->|"dispatches dashboard"| node_dashboard_routes
node_auth_routes -->|"authenticates users"| node_user_service
node_auth_routes -->|"issues tokens"| node_security
node_user_service -->|"hashes passwords"| node_security
node_user_service -->|"queries users"| node_database_layer
node_transaction_routes -->|"handles records"| node_transaction_service
node_transaction_service -->|"queries records"| node_database_layer
node_dashboard_service -->|"reads records"| node_database_layer
node_database_layer -->|"persists data"| node_sql_store
node_application -->|"creates tables"| node_database_layer

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_dependencies,node_client toneBlue
class node_auth_routes,node_user_routes,node_user_service,node_security,node_user_model,node_auth_schema toneAmber
class node_transaction_routes,node_transaction_service,node_dashboard_routes,node_dashboard_service,node_transaction_model,node_transaction_schema,node_dashboard_schema toneMint
class node_database_layer,node_sql_store toneRose
```

## Components

### API surface

- **FastAPI app**
- **Request dependencies**

### Identity and access

- **Auth routes**
- **User routes**
- **User service**
- **Token security**
- **User model**
- **User schemas**

### Financial records

- **Transaction routes**
- **Transaction service**
- **Dashboard routes**
- **Dashboard analytics**
- **Financial records**
- **Transaction schemas**
- **Dashboard schemas**

### Persistence

- **Async database**
- **SQL database**

### Other components

- **API client**

## Connections

- API client → FastAPI app: sends requests
- FastAPI app → Auth routes: dispatches auth
- FastAPI app → User routes: dispatches users
- FastAPI app → Transaction routes: dispatches records
- FastAPI app → Dashboard routes: dispatches dashboard
- Auth routes → User service: authenticates users
- Auth routes → Token security: issues tokens
- User service → Token security: hashes passwords
- User service → Async database: queries users
- Transaction routes → Transaction service: handles records
- Transaction service → Async database: queries records
- Dashboard analytics → Async database: reads records
- Async database → SQL database: persists data
- FastAPI app → Async database: creates tables
