# irfanruddin/fullstack-project architecture

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

- Interactive diagram: https://gitdiagram.com/irfanruddin/fullstack-project
- Repository: https://github.com/irfanruddin/fullstack-project

## Overview

UrbanCart is a multi-vendor commerce platform with customer shopping, seller operations, and administration. Customers discover products, manage carts and wishlists, check out, and follow orders; sellers apply and manage shop activity; admins oversee platform operations. React routes role-specific experiences and sends REST requests through a shared API client to FastAPI routers, which work with SQLAlchemy models and MySQL. The README describes admin functionality as pending, despite admin source files being present. Some frontend and router links rely on README statements or SOURCE INDEX references rather than inspected implementations.

Main entry points: [`backend/app/main.py`](https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/main.py) (FastAPI application), [`frontend/src/api.js`](https://github.com/irfanruddin/fullstack-project/blob/main/frontend/src/api.js) (API client), [`frontend/src/App.jsx`](https://github.com/irfanruddin/fullstack-project/blob/main/frontend/src/App.jsx) (App routes), [`backend/app/models.py`](https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/models.py) (Domain models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Customer storefront"]
  node_app_routes["App routes<br/>[App.jsx]"]
  node_api_client["API client<br/>[api.js]"]
  node_auth_state["Auth state<br/>[auth.jsx]"]
  node_discovery["Product discovery"]
  node_cart_wishlist["Cart and wishlist"]
  node_checkout_ui["Checkout<br/>[Checkout.jsx]"]
  node_order_ui["Order history<br/>[Orders.jsx]"]
end

subgraph group_seller["Seller workspace"]
  node_seller_apply["Seller application<br/>[SellerApply.jsx]"]
  node_seller_dashboard["Seller operations"]
end

subgraph group_admin["Administration"]
  node_admin_ui["Admin operations"]
end

subgraph group_backend["API and domain"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_auth_router["Authentication<br/>[auth.py]"]
  node_catalogue_router["Catalogue<br/>[catalogue.py]"]
  node_cart_router["Cart and wishlist API<br/>[cart.py]"]
  node_checkout_router["Checkout API<br/>[checkout.py]"]
  node_orders_router["Order API<br/>[orders.py]"]
  node_seller_router["Seller API<br/>[seller.py]"]
  node_admin_router["Admin API<br/>[admin.py]"]
  node_services["Commerce services<br/>[services.py]"]
  node_email["Email service"]
end

subgraph group_data["Persistence and security"]
  node_security["Access control<br/>[security.py]"]
  node_models["Domain models<br/>[models.py]"]
  node_database["Database session<br/>[database.py]"]
  node_mysql[("MySQL")]
end

node_customer(("Customer"))
node_seller_actor(("Seller"))
node_admin_actor(("Admin"))

node_customer -->|"uses storefront"| node_app_routes
node_seller_actor -->|"uses workspace"| node_app_routes
node_admin_actor -->|"uses admin"| node_app_routes
node_app_routes -->|"routes to"| node_discovery
node_app_routes -->|"routes to"| node_checkout_ui
node_app_routes -->|"routes to"| node_order_ui
node_app_routes -->|"routes to"| node_seller_apply
node_app_routes -->|"routes to"| node_seller_dashboard
node_api_client -->|"sends requests"| node_api_app
node_auth_state -->|"calls"| node_api_client
node_discovery -->|"calls"| node_api_client
node_cart_wishlist -->|"calls"| node_api_client
node_checkout_ui -->|"calls"| node_api_client
node_order_ui -->|"calls"| node_api_client
node_seller_apply -->|"calls"| node_api_client
node_seller_dashboard -->|"calls"| node_api_client
node_admin_ui -->|"calls"| node_api_client
node_api_app -->|"registers"| node_auth_router
node_api_app -->|"registers"| node_catalogue_router
node_api_app -->|"registers"| node_cart_router
node_api_app -->|"registers"| node_checkout_router
node_api_app -->|"registers"| node_orders_router
node_api_app -->|"registers"| node_seller_router
node_api_app -->|"registers"| node_admin_router
node_checkout_router -->|"uses"| node_services
node_auth_router -->|"authenticates with"| node_security
node_auth_router -->|"sends messages"| node_email
node_auth_router -->|"queries"| node_models
node_catalogue_router -->|"queries"| node_models
node_checkout_router -->|"reads and writes"| node_models
node_orders_router -->|"reads and writes"| node_models
node_seller_router -->|"reads and writes"| node_models
node_admin_router -->|"reads and writes"| node_models
node_services -->|"creates orders"| node_models
node_database -->|"connects to"| node_mysql
node_models -->|"uses base"| node_database

click node_app_routes "https://github.com/irfanruddin/fullstack-project/blob/main/frontend/src/App.jsx"
click node_api_client "https://github.com/irfanruddin/fullstack-project/blob/main/frontend/src/api.js"
click node_auth_state "https://github.com/irfanruddin/fullstack-project/blob/main/frontend/src/auth.jsx"
click node_discovery "https://github.com/irfanruddin/fullstack-project/tree/main/frontend/src/pages"
click node_cart_wishlist "https://github.com/irfanruddin/fullstack-project/tree/main/frontend/src"
click node_checkout_ui "https://github.com/irfanruddin/fullstack-project/blob/main/frontend/src/pages/Checkout.jsx"
click node_order_ui "https://github.com/irfanruddin/fullstack-project/blob/main/frontend/src/pages/Orders.jsx"
click node_seller_apply "https://github.com/irfanruddin/fullstack-project/blob/main/frontend/src/pages/seller/SellerApply.jsx"
click node_seller_dashboard "https://github.com/irfanruddin/fullstack-project/blob/main/frontend/src/pages/seller/SellerDashboard.jsx"
click node_admin_ui "https://github.com/irfanruddin/fullstack-project/tree/main/frontend/src/admin"
click node_api_app "https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/main.py"
click node_auth_router "https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/routers/auth.py"
click node_catalogue_router "https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/routers/catalogue.py"
click node_cart_router "https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/routers/cart.py"
click node_checkout_router "https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/routers/checkout.py"
click node_orders_router "https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/routers/orders.py"
click node_seller_router "https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/routers/seller.py"
click node_admin_router "https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/routers/admin.py"
click node_services "https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/services.py"
click node_security "https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/security.py"
click node_models "https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/models.py"
click node_database "https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/database.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_app_routes,node_api_client,node_auth_state,node_discovery,node_cart_wishlist,node_checkout_ui,node_order_ui toneBlue
class node_seller_apply,node_seller_dashboard toneAmber
class node_admin_ui toneMint
class node_api_app,node_auth_router,node_catalogue_router,node_cart_router,node_checkout_router,node_orders_router,node_seller_router,node_admin_router,node_services,node_email toneRose
class node_security,node_models,node_database,node_mysql,node_customer,node_seller_actor,node_admin_actor toneIndigo
```

## Components

### Customer storefront

- [App routes](https://github.com/irfanruddin/fullstack-project/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [API client](https://github.com/irfanruddin/fullstack-project/blob/main/frontend/src/api.js): `frontend/src/api.js`
- [Auth state](https://github.com/irfanruddin/fullstack-project/blob/main/frontend/src/auth.jsx): `frontend/src/auth.jsx`
- [Product discovery](https://github.com/irfanruddin/fullstack-project/tree/main/frontend/src/pages): `frontend/src/pages`
- [Cart and wishlist](https://github.com/irfanruddin/fullstack-project/tree/main/frontend/src): `frontend/src`
- [Checkout](https://github.com/irfanruddin/fullstack-project/blob/main/frontend/src/pages/Checkout.jsx): `frontend/src/pages/Checkout.jsx`
- [Order history](https://github.com/irfanruddin/fullstack-project/blob/main/frontend/src/pages/Orders.jsx): `frontend/src/pages/Orders.jsx`

### Seller workspace

- [Seller application](https://github.com/irfanruddin/fullstack-project/blob/main/frontend/src/pages/seller/SellerApply.jsx): `frontend/src/pages/seller/SellerApply.jsx`
- [Seller operations](https://github.com/irfanruddin/fullstack-project/blob/main/frontend/src/pages/seller/SellerDashboard.jsx): `frontend/src/pages/seller/SellerDashboard.jsx`

### Administration

- [Admin operations](https://github.com/irfanruddin/fullstack-project/tree/main/frontend/src/admin): `frontend/src/admin`

### API and domain

- [FastAPI application](https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication](https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/routers/auth.py): `backend/app/routers/auth.py`
- [Catalogue](https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/routers/catalogue.py): `backend/app/routers/catalogue.py`
- [Cart and wishlist API](https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/routers/cart.py): `backend/app/routers/cart.py`
- [Checkout API](https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/routers/checkout.py): `backend/app/routers/checkout.py`
- [Order API](https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/routers/orders.py): `backend/app/routers/orders.py`
- [Seller API](https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/routers/seller.py): `backend/app/routers/seller.py`
- [Admin API](https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/routers/admin.py): `backend/app/routers/admin.py`
- [Commerce services](https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/services.py): `backend/app/services.py`
- **Email service**

### Persistence and security

- [Access control](https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/security.py): `backend/app/security.py`
- [Domain models](https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/models.py): `backend/app/models.py`
- [Database session](https://github.com/irfanruddin/fullstack-project/blob/main/backend/app/database.py): `backend/app/database.py`
- **MySQL**

### Other components

- **Customer**
- **Seller**
- **Admin**

## Connections

- Customer → App routes: uses storefront (evidence: `README.md`)
- Seller → App routes: uses workspace (evidence: `README.md`)
- Admin → App routes: uses admin (evidence: `README.md`)
- App routes → Product discovery: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Checkout: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Order history: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Seller application: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Seller operations: routes to (evidence: `frontend/src/App.jsx`)
- API client → FastAPI application: sends requests (evidence: `README.md`)
- Auth state → API client: calls (evidence: `frontend/src/auth.jsx`)
- Product discovery → API client: calls (evidence: `frontend/src/pages/Product.jsx`)
- Cart and wishlist → API client: calls (evidence: `frontend/src/cartContext.jsx`)
- Checkout → API client: calls (evidence: `frontend/src/pages/Checkout.jsx`)
- Order history → API client: calls (evidence: `frontend/src/pages/Orders.jsx`)
- Seller application → API client: calls (evidence: `frontend/src/pages/seller/SellerApply.jsx`)
- Seller operations → API client: calls (evidence: `frontend/src/pages/seller/SellerDashboard.jsx`)
- Admin operations → API client: calls (evidence: `frontend/src/admin/adminUi.jsx`)
- FastAPI application → Authentication: registers (evidence: `backend/app/main.py`)
- FastAPI application → Catalogue: registers (evidence: `backend/app/main.py`)
- FastAPI application → Cart and wishlist API: registers (evidence: `backend/app/main.py`)
- FastAPI application → Checkout API: registers (evidence: `backend/app/main.py`)
- FastAPI application → Order API: registers (evidence: `backend/app/main.py`)
- FastAPI application → Seller API: registers (evidence: `backend/app/main.py`)
- FastAPI application → Admin API: registers (evidence: `backend/app/main.py`)
- Checkout API → Commerce services: uses (evidence: `backend/app/routers/checkout.py`)
- Authentication → Access control: authenticates with (evidence: `backend/app/routers/auth.py`)
- Authentication → Email service: sends messages (evidence: `backend/app/routers/auth.py`)
- Authentication → Domain models: queries (evidence: `backend/app/routers/auth.py`)
- Catalogue → Domain models: queries (evidence: `backend/app/routers/catalogue.py`)
- Checkout API → Domain models: reads and writes (evidence: `backend/app/routers/checkout.py`)
- Order API → Domain models: reads and writes (evidence: `backend/app/routers/orders.py`)
- Seller API → Domain models: reads and writes (evidence: `backend/app/routers/seller.py`)
- Admin API → Domain models: reads and writes (evidence: `backend/app/routers/admin.py`)
- Commerce services → Domain models: creates orders (evidence: `backend/app/services.py`)
- Database session → MySQL: connects to (evidence: `backend/app/database.py`)
- Domain models → Database session: uses base (evidence: `backend/app/models.py`)
