# yamunasrisangana/quick-basket architecture

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

- Interactive diagram: https://gitdiagram.com/yamunasrisangana/quick-basket
- Repository: https://github.com/yamunasrisangana/quick-basket

## Overview

Quick Basket is an administrative API for platform oversight. The evidenced workflows are admin login and protected access, plus a dashboard overview that counts customers, merchants, and products. Its visible domain model covers users, customer profiles and addresses, merchants, categories, and products; the README does not document broader admin operations. Edges reflect shown router registration, calls, and model relationships. Other model files are included as domain components, but their runtime use is not inferred.

Main entry points: [`app/routers/auth.py`](https://github.com/yamunasrisangana/quick-basket/blob/main/app/routers/auth.py) (Authentication routes), [`app/routers/dashboard.py`](https://github.com/yamunasrisangana/quick-basket/blob/main/app/routers/dashboard.py) (Dashboard overview), [`app/core/dependencies.py`](https://github.com/yamunasrisangana/quick-basket/blob/main/app/core/dependencies.py) (Admin authorization), [`app/database.py`](https://github.com/yamunasrisangana/quick-basket/blob/main/app/database.py) (Database sessions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API surface"]
  node_main["API application<br/>[main.py]"]
  node_auth_router["Authentication routes<br/>[auth.py]"]
  node_dashboard["Dashboard overview<br/>[dashboard.py]"]
end

subgraph group_auth["Admin access"]
  node_auth_schema["Login schemas<br/>[auth.py]"]
  node_auth_deps["Admin authorization<br/>[dependencies.py]"]
  node_security["Token and password security<br/>[security.py]"]
end

subgraph group_domain["Platform domain"]
  node_user["User accounts<br/>[user.py]"]
  node_customer["Customer profiles<br/>[customer.py]"]
  node_address["Customer addresses"]
  node_merchant["Merchants<br/>[merchant.py]"]
  node_category["Product categories<br/>[category.py]"]
  node_product["Products<br/>[product.py]"]
end

subgraph group_infra["Persistence and settings"]
  node_db_session["Database sessions<br/>[database.py]"]
  node_settings["Application settings<br/>[config.py]"]
  node_postgres[("PostgreSQL database")]
end

node_admin(("Administrator"))

node_admin -->|"uses API"| node_main
node_main -->|"registers"| node_auth_router
node_main -->|"registers"| node_dashboard
node_admin -->|"submits login"| node_auth_router
node_auth_router -->|"validates with"| node_auth_schema
node_auth_router -->|"queries"| node_db_session
node_auth_router -->|"looks up"| node_user
node_auth_router -->|"verifies and signs"| node_security
node_auth_router -->|"protects profile"| node_auth_deps
node_auth_deps -->|"queries"| node_db_session
node_auth_deps -->|"loads account"| node_user
node_auth_deps -->|"decodes token"| node_security
node_dashboard -->|"requires admin"| node_auth_deps
node_dashboard -->|"counts records"| node_db_session
node_dashboard -->|"counts"| node_customer
node_dashboard -->|"counts by status"| node_merchant
node_dashboard -->|"counts"| node_product
node_user -->|"has profile"| node_customer
node_user -->|"has profile"| node_merchant
node_customer -->|"has addresses"| node_address
node_merchant -->|"has categories"| node_category
node_merchant -->|"has products"| node_product
node_product -->|"belongs to"| node_category
node_db_session -.->|"connects to"| node_postgres
node_main -->|"configures"| node_settings
node_db_session -->|"reads connection config"| node_settings

click node_main "https://github.com/yamunasrisangana/quick-basket/blob/main/app/main.py"
click node_auth_router "https://github.com/yamunasrisangana/quick-basket/blob/main/app/routers/auth.py"
click node_dashboard "https://github.com/yamunasrisangana/quick-basket/blob/main/app/routers/dashboard.py"
click node_auth_schema "https://github.com/yamunasrisangana/quick-basket/blob/main/app/schemas/auth.py"
click node_auth_deps "https://github.com/yamunasrisangana/quick-basket/blob/main/app/core/dependencies.py"
click node_security "https://github.com/yamunasrisangana/quick-basket/blob/main/app/core/security.py"
click node_user "https://github.com/yamunasrisangana/quick-basket/blob/main/app/models/user.py"
click node_customer "https://github.com/yamunasrisangana/quick-basket/blob/main/app/models/customer.py"
click node_address "https://github.com/yamunasrisangana/quick-basket/blob/main/app/models/customer_address.py"
click node_merchant "https://github.com/yamunasrisangana/quick-basket/blob/main/app/models/merchant.py"
click node_category "https://github.com/yamunasrisangana/quick-basket/blob/main/app/models/category.py"
click node_product "https://github.com/yamunasrisangana/quick-basket/blob/main/app/models/product.py"
click node_db_session "https://github.com/yamunasrisangana/quick-basket/blob/main/app/database.py"
click node_settings "https://github.com/yamunasrisangana/quick-basket/blob/main/app/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_main,node_auth_router,node_dashboard toneBlue
class node_auth_schema,node_auth_deps,node_security toneAmber
class node_user,node_customer,node_address,node_merchant,node_category,node_product toneMint
class node_db_session,node_settings,node_postgres toneRose
class node_admin toneIndigo
```

## Components

### API surface

- [API application](https://github.com/yamunasrisangana/quick-basket/blob/main/app/main.py): `app/main.py`
- [Authentication routes](https://github.com/yamunasrisangana/quick-basket/blob/main/app/routers/auth.py): `app/routers/auth.py`
- [Dashboard overview](https://github.com/yamunasrisangana/quick-basket/blob/main/app/routers/dashboard.py): `app/routers/dashboard.py`

### Admin access

- [Login schemas](https://github.com/yamunasrisangana/quick-basket/blob/main/app/schemas/auth.py): `app/schemas/auth.py`
- [Admin authorization](https://github.com/yamunasrisangana/quick-basket/blob/main/app/core/dependencies.py): `app/core/dependencies.py`
- [Token and password security](https://github.com/yamunasrisangana/quick-basket/blob/main/app/core/security.py): `app/core/security.py`

### Platform domain

- [User accounts](https://github.com/yamunasrisangana/quick-basket/blob/main/app/models/user.py): `app/models/user.py`
- [Customer profiles](https://github.com/yamunasrisangana/quick-basket/blob/main/app/models/customer.py): `app/models/customer.py`
- [Customer addresses](https://github.com/yamunasrisangana/quick-basket/blob/main/app/models/customer_address.py): `app/models/customer_address.py`
- [Merchants](https://github.com/yamunasrisangana/quick-basket/blob/main/app/models/merchant.py): `app/models/merchant.py`
- [Product categories](https://github.com/yamunasrisangana/quick-basket/blob/main/app/models/category.py): `app/models/category.py`
- [Products](https://github.com/yamunasrisangana/quick-basket/blob/main/app/models/product.py): `app/models/product.py`

### Persistence and settings

- [Database sessions](https://github.com/yamunasrisangana/quick-basket/blob/main/app/database.py): `app/database.py`
- [Application settings](https://github.com/yamunasrisangana/quick-basket/blob/main/app/config.py): `app/config.py`
- **PostgreSQL database**

### Other components

- **Administrator**

## Connections

- Administrator → API application: uses API (evidence: `README.md`)
- API application → Authentication routes: registers (evidence: `app/main.py`)
- API application → Dashboard overview: registers (evidence: `app/main.py`)
- Administrator → Authentication routes: submits login (evidence: `README.md`)
- Authentication routes → Login schemas: validates with (evidence: `app/routers/auth.py`)
- Authentication routes → Database sessions: queries (evidence: `app/routers/auth.py`)
- Authentication routes → User accounts: looks up (evidence: `app/routers/auth.py`)
- Authentication routes → Token and password security: verifies and signs (evidence: `app/routers/auth.py`)
- Authentication routes → Admin authorization: protects profile (evidence: `app/routers/auth.py`)
- Admin authorization → Database sessions: queries (evidence: `app/core/dependencies.py`)
- Admin authorization → User accounts: loads account (evidence: `app/core/dependencies.py`)
- Admin authorization → Token and password security: decodes token (evidence: `app/core/dependencies.py`)
- Dashboard overview → Admin authorization: requires admin (evidence: `app/routers/dashboard.py`)
- Dashboard overview → Database sessions: counts records (evidence: `app/routers/dashboard.py`)
- Dashboard overview → Customer profiles: counts (evidence: `app/routers/dashboard.py`)
- Dashboard overview → Merchants: counts by status (evidence: `app/routers/dashboard.py`)
- Dashboard overview → Products: counts (evidence: `app/routers/dashboard.py`)
- User accounts → Customer profiles: has profile (evidence: `app/models/user.py`)
- User accounts → Merchants: has profile (evidence: `app/models/user.py`)
- Customer profiles → Customer addresses: has addresses (evidence: `app/models/customer.py`)
- Merchants → Product categories: has categories (evidence: `app/models/merchant.py`)
- Merchants → Products: has products (evidence: `app/models/merchant.py`)
- Products → Product categories: belongs to (evidence: `app/models/product.py`)
- Database sessions → PostgreSQL database: connects to
- API application → Application settings: configures (evidence: `app/main.py`)
- Database sessions → Application settings: reads connection config (evidence: `app/database.py`)
