# honky67/e-commerce-project_-re-vintage- architecture

> Architecture diagram of the GitHub repository honky67/e-commerce-project_-re-vintage-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/honky67/e-commerce-project_-re-vintage-
- Repository: https://github.com/honky67/e-commerce-project_-re-vintage-

## Overview

RE Vintage is a vintage-commerce storefront with a Next.js frontend and a FastAPI backend. Shoppers can browse a mock product and shop catalog and view product details; account registration and login use the API. Seller dashboards and admin pages provide additional product, store, and administration capabilities. The backend exposes authentication, product, shop, and admin routes over SQLAlchemy models. The README gives no further product specification; several frontend catalog paths use mock data, and the API-to-backend connection is not directly verified by the excerpts.

Main entry points: [`E-commerce-Project_-RE-Vintage-/backend/app/api/routes/auth.py`](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/api/routes/auth.py) (Auth routes), [`E-commerce-Project_-RE-Vintage-/backend/app/api/router.py`](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/api/router.py) (API router), [`E-commerce-Project_-RE-Vintage-/frontend/src/lib/api.ts`](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/frontend/src/lib/api.ts) (API client), [`E-commerce-Project_-RE-Vintage-/backend/app/db/session.py`](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/db/session.py) (Database sessions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_home["Home catalog<br/>[page.tsx]"]
  node_shop_listing["Shop directory<br/>[page.tsx]"]
  node_product_detail["Product detail<br/>[page.tsx]"]
  node_mock_catalog["Mock catalog data<br/>[mockData.ts]"]
end

subgraph group_identity["Identity"]
  node_auth_form["Login / register<br/>[AuthForm.tsx]"]
  node_auth_state["Auth state<br/>[AuthProvider.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
end

subgraph group_seller_admin["Seller &amp; Admin"]
  node_admin_page["Admin page<br/>[page.tsx]"]
  node_seller_products["Product management<br/>[page.tsx]"]
  node_seller_store["Store management<br/>[page.tsx]"]
end

subgraph group_backend["Backend API"]
  node_app_entry["Backend entry<br/>[main.py]"]
  node_api_router["API router<br/>[router.py]"]
  node_auth_routes["Auth routes<br/>[auth.py]"]
  node_product_routes["Product routes<br/>[products.py]"]
  node_shop_routes["Shop routes<br/>[shops.py]"]
  node_admin_routes["Admin routes<br/>[admin.py]"]
  node_auth_deps["Auth dependencies<br/>[deps.py]"]
  node_security["Token security<br/>[security.py]"]
  node_schemas["API schemas<br/>[schemas.py]"]
end

subgraph group_persistence["Persistence"]
  node_db_session["Database sessions<br/>[session.py]"]
  node_models[("Domain models")]
end

node_shopper(("Shopper"))
node_vendor_admin(("Vendor / admin"))

node_shopper -->|"browses"| node_home
node_shopper -->|"finds shops"| node_shop_listing
node_shopper -->|"views item"| node_product_detail
node_home -->|"reads products"| node_mock_catalog
node_shop_listing -->|"reads shops"| node_mock_catalog
node_product_detail -->|"looks up item"| node_mock_catalog
node_shopper -->|"signs in"| node_auth_form
node_auth_form -->|"calls auth"| node_auth_state
node_auth_state -->|"requests identity"| node_api_client
node_vendor_admin -->|"manages listings"| node_seller_products
node_vendor_admin -->|"manages store"| node_seller_store
node_vendor_admin -->|"administers"| node_admin_page
node_seller_products -->|"calls API"| node_api_client
node_seller_store -->|"calls API"| node_api_client
node_admin_page -->|"calls API"| node_api_client
node_api_client -.->|"sends HTTP"| node_app_entry
node_app_entry -->|"mounts routes"| node_api_router
node_api_router -->|"registers routes"| node_auth_routes
node_api_router -->|"registers routes"| node_product_routes
node_api_router -->|"registers routes"| node_shop_routes
node_api_router -->|"registers routes"| node_admin_routes
node_auth_routes -->|"checks current user"| node_auth_deps
node_auth_routes -->|"hashes and signs"| node_security
node_auth_routes -->|"gets session"| node_db_session
node_auth_routes -->|"queries users"| node_models
node_auth_routes -->|"validates payloads"| node_schemas
node_auth_deps -->|"decodes token"| node_security
node_auth_deps -->|"gets session"| node_db_session
node_product_routes -->|"uses session"| node_db_session
node_product_routes -->|"uses product models"| node_models
node_product_routes -->|"uses schemas"| node_schemas
node_shop_routes -->|"uses session"| node_db_session
node_shop_routes -->|"uses shop models"| node_models
node_shop_routes -->|"uses schemas"| node_schemas
node_app_entry -->|"initializes database"| node_db_session
node_app_entry -->|"loads models"| node_models

click node_home "https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/frontend/src/app/page.tsx"
click node_shop_listing "https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/frontend/src/app/shops/page.tsx"
click node_product_detail "https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/frontend/src/app/product/%5Bid%5D/page.tsx"
click node_mock_catalog "https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/frontend/src/data/mockData.ts"
click node_auth_form "https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/frontend/src/components/AuthForm.tsx"
click node_auth_state "https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/frontend/src/components/AuthProvider.tsx"
click node_api_client "https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/frontend/src/lib/api.ts"
click node_admin_page "https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/frontend/src/app/admin/page.tsx"
click node_seller_products "https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/frontend/src/app/dashboard/products/page.tsx"
click node_seller_store "https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/frontend/src/app/dashboard/store/page.tsx"
click node_app_entry "https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/main.py"
click node_api_router "https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/api/router.py"
click node_auth_routes "https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/api/routes/auth.py"
click node_product_routes "https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/api/routes/products.py"
click node_shop_routes "https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/api/routes/shops.py"
click node_admin_routes "https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/api/routes/admin.py"
click node_auth_deps "https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/api/deps.py"
click node_security "https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/core/security.py"
click node_db_session "https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/db/session.py"
click node_models "https://github.com/honky67/e-commerce-project_-re-vintage-/tree/main/E-commerce-Project_-RE-Vintage-/backend/app/models"
click node_schemas "https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/schemas.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_home,node_shop_listing,node_product_detail,node_mock_catalog toneBlue
class node_auth_form,node_auth_state,node_api_client toneAmber
class node_admin_page,node_seller_products,node_seller_store toneMint
class node_app_entry,node_api_router,node_auth_routes,node_product_routes,node_shop_routes,node_admin_routes,node_auth_deps,node_security,node_schemas toneRose
class node_db_session,node_models,node_shopper,node_vendor_admin toneIndigo
```

## Components

### Storefront

- [Home catalog](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/frontend/src/app/page.tsx): `E-commerce-Project_-RE-Vintage-/frontend/src/app/page.tsx`
- [Shop directory](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/frontend/src/app/shops/page.tsx): `E-commerce-Project_-RE-Vintage-/frontend/src/app/shops/page.tsx`
- [Product detail](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/frontend/src/app/product/%5Bid%5D/page.tsx): `E-commerce-Project_-RE-Vintage-/frontend/src/app/product/[id]/page.tsx`
- [Mock catalog data](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/frontend/src/data/mockData.ts): `E-commerce-Project_-RE-Vintage-/frontend/src/data/mockData.ts`

### Identity

- [Login / register](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/frontend/src/components/AuthForm.tsx): `E-commerce-Project_-RE-Vintage-/frontend/src/components/AuthForm.tsx`
- [Auth state](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/frontend/src/components/AuthProvider.tsx): `E-commerce-Project_-RE-Vintage-/frontend/src/components/AuthProvider.tsx`
- [API client](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/frontend/src/lib/api.ts): `E-commerce-Project_-RE-Vintage-/frontend/src/lib/api.ts`

### Seller & Admin

- [Admin page](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/frontend/src/app/admin/page.tsx): `E-commerce-Project_-RE-Vintage-/frontend/src/app/admin/page.tsx`
- [Product management](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/frontend/src/app/dashboard/products/page.tsx): `E-commerce-Project_-RE-Vintage-/frontend/src/app/dashboard/products/page.tsx`
- [Store management](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/frontend/src/app/dashboard/store/page.tsx): `E-commerce-Project_-RE-Vintage-/frontend/src/app/dashboard/store/page.tsx`

### Backend API

- [Backend entry](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/main.py): `E-commerce-Project_-RE-Vintage-/backend/app/main.py`
- [API router](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/api/router.py): `E-commerce-Project_-RE-Vintage-/backend/app/api/router.py`
- [Auth routes](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/api/routes/auth.py): `E-commerce-Project_-RE-Vintage-/backend/app/api/routes/auth.py`
- [Product routes](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/api/routes/products.py): `E-commerce-Project_-RE-Vintage-/backend/app/api/routes/products.py`
- [Shop routes](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/api/routes/shops.py): `E-commerce-Project_-RE-Vintage-/backend/app/api/routes/shops.py`
- [Admin routes](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/api/routes/admin.py): `E-commerce-Project_-RE-Vintage-/backend/app/api/routes/admin.py`
- [Auth dependencies](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/api/deps.py): `E-commerce-Project_-RE-Vintage-/backend/app/api/deps.py`
- [Token security](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/core/security.py): `E-commerce-Project_-RE-Vintage-/backend/app/core/security.py`
- [API schemas](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/schemas.py): `E-commerce-Project_-RE-Vintage-/backend/app/schemas.py`

### Persistence

- [Database sessions](https://github.com/honky67/e-commerce-project_-re-vintage-/blob/main/E-commerce-Project_-RE-Vintage-/backend/app/db/session.py): `E-commerce-Project_-RE-Vintage-/backend/app/db/session.py`
- [Domain models](https://github.com/honky67/e-commerce-project_-re-vintage-/tree/main/E-commerce-Project_-RE-Vintage-/backend/app/models): `E-commerce-Project_-RE-Vintage-/backend/app/models`

### Other components

- **Shopper**
- **Vendor / admin**

## Connections

- Shopper → Home catalog: browses (evidence: `E-commerce-Project_-RE-Vintage-/frontend/src/app/page.tsx`)
- Shopper → Shop directory: finds shops (evidence: `E-commerce-Project_-RE-Vintage-/frontend/src/app/shops/page.tsx`)
- Shopper → Product detail: views item (evidence: `E-commerce-Project_-RE-Vintage-/frontend/src/app/product/[id]/page.tsx`)
- Home catalog → Mock catalog data: reads products (evidence: `E-commerce-Project_-RE-Vintage-/frontend/src/app/page.tsx`)
- Shop directory → Mock catalog data: reads shops (evidence: `E-commerce-Project_-RE-Vintage-/frontend/src/app/shops/page.tsx`)
- Product detail → Mock catalog data: looks up item (evidence: `E-commerce-Project_-RE-Vintage-/frontend/src/app/product/[id]/page.tsx`)
- Shopper → Login / register: signs in (evidence: `E-commerce-Project_-RE-Vintage-/frontend/src/components/AuthForm.tsx`)
- Login / register → Auth state: calls auth (evidence: `E-commerce-Project_-RE-Vintage-/frontend/src/components/AuthForm.tsx`)
- Auth state → API client: requests identity (evidence: `E-commerce-Project_-RE-Vintage-/frontend/src/components/AuthProvider.tsx`)
- Vendor / admin → Product management: manages listings (evidence: `E-commerce-Project_-RE-Vintage-/frontend/src/app/dashboard/products/page.tsx`)
- Vendor / admin → Store management: manages store (evidence: `E-commerce-Project_-RE-Vintage-/frontend/src/app/dashboard/store/page.tsx`)
- Vendor / admin → Admin page: administers (evidence: `E-commerce-Project_-RE-Vintage-/frontend/src/app/admin/page.tsx`)
- Product management → API client: calls API (evidence: `E-commerce-Project_-RE-Vintage-/frontend/src/app/dashboard/products/page.tsx`)
- Store management → API client: calls API (evidence: `E-commerce-Project_-RE-Vintage-/frontend/src/app/dashboard/store/page.tsx`)
- Admin page → API client: calls API (evidence: `E-commerce-Project_-RE-Vintage-/frontend/src/app/admin/page.tsx`)
- API client → Backend entry: sends HTTP
- Backend entry → API router: mounts routes (evidence: `E-commerce-Project_-RE-Vintage-/backend/app/main.py`)
- API router → Auth routes: registers routes (evidence: `E-commerce-Project_-RE-Vintage-/backend/app/api/router.py`)
- API router → Product routes: registers routes (evidence: `E-commerce-Project_-RE-Vintage-/backend/app/api/router.py`)
- API router → Shop routes: registers routes (evidence: `E-commerce-Project_-RE-Vintage-/backend/app/api/router.py`)
- API router → Admin routes: registers routes (evidence: `E-commerce-Project_-RE-Vintage-/backend/app/api/router.py`)
- Auth routes → Auth dependencies: checks current user (evidence: `E-commerce-Project_-RE-Vintage-/backend/app/api/routes/auth.py`)
- Auth routes → Token security: hashes and signs (evidence: `E-commerce-Project_-RE-Vintage-/backend/app/api/routes/auth.py`)
- Auth routes → Database sessions: gets session (evidence: `E-commerce-Project_-RE-Vintage-/backend/app/api/routes/auth.py`)
- Auth routes → Domain models: queries users (evidence: `E-commerce-Project_-RE-Vintage-/backend/app/api/routes/auth.py`)
- Auth routes → API schemas: validates payloads (evidence: `E-commerce-Project_-RE-Vintage-/backend/app/api/routes/auth.py`)
- Auth dependencies → Token security: decodes token (evidence: `E-commerce-Project_-RE-Vintage-/backend/app/api/deps.py`)
- Auth dependencies → Database sessions: gets session (evidence: `E-commerce-Project_-RE-Vintage-/backend/app/api/deps.py`)
- Product routes → Database sessions: uses session (evidence: `E-commerce-Project_-RE-Vintage-/backend/app/api/routes/products.py`)
- Product routes → Domain models: uses product models (evidence: `E-commerce-Project_-RE-Vintage-/backend/app/api/routes/products.py`)
- Product routes → API schemas: uses schemas (evidence: `E-commerce-Project_-RE-Vintage-/backend/app/api/routes/products.py`)
- Shop routes → Database sessions: uses session (evidence: `E-commerce-Project_-RE-Vintage-/backend/app/api/routes/shops.py`)
- Shop routes → Domain models: uses shop models (evidence: `E-commerce-Project_-RE-Vintage-/backend/app/api/routes/shops.py`)
- Shop routes → API schemas: uses schemas (evidence: `E-commerce-Project_-RE-Vintage-/backend/app/api/routes/shops.py`)
- Backend entry → Database sessions: initializes database (evidence: `E-commerce-Project_-RE-Vintage-/backend/app/main.py`)
- Backend entry → Domain models: loads models (evidence: `E-commerce-Project_-RE-Vintage-/backend/app/main.py`)
