# bharatchandra-sys/vijetha-digital architecture

> Architecture diagram of the GitHub repository bharatchandra-sys/vijetha-digital, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bharatchandra-sys/vijetha-digital
- Repository: https://github.com/bharatchandra-sys/vijetha-digital

## Overview

Vijetha Digital is a digital-printing commerce platform: customers browse products, configure and price an order, pay, then track fulfilment and receive notifications; staff and administrators manage operations. The repository also contains a separate Next.js SEO/marketing site alongside the React commerce application. The README documents pricing, Razorpay, email, storage and administration capabilities; source evidence is uneven, so unsampled implementation links are omitted or marked unverified rather than inferred as direct calls.

Main entry points: [`app/main.py`](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/main.py) (FastAPI application), [`frontend/src/pages/Checkout.jsx`](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/frontend/src/pages/Checkout.jsx) (Checkout), [`app/api/orders/router.py`](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/api/orders/router.py) (Order API), [`app/services/order_service.py`](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/services/order_service.py) (Order lifecycle)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Commerce storefront"]
  node_react_app["React application<br/>[App.jsx]"]
  node_product_pages["Product browsing<br/>[ProductDetail.jsx]"]
  node_checkout["Checkout<br/>[Checkout.jsx]"]
end

subgraph group_commerce["Commerce services"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_product_api["Product API<br/>[router.py]"]
  node_pricing_api["Pricing API<br/>[router.py]"]
  node_order_api["Order API<br/>[router.py]"]
  node_order_service["Order lifecycle<br/>[order_service.py]"]
  node_payment_api["Payment API<br/>[router.py]"]
  node_review_api["Reviews API<br/>[router.py]"]
  node_review_service["Review service<br/>[review_service.py]"]
  node_orders_db[("Order records<br/>[order.py]")]
  node_postgres[("PostgreSQL<br/>[session.py]")]
end

subgraph group_identity_admin["Identity and administration"]
  node_auth_api["Authentication API<br/>[router.py]"]
  node_auth_service["Authentication service<br/>[auth_service.py]"]
  node_token_manager["Token lifecycle<br/>[token_manager.py]"]
  node_admin_api["Administration API<br/>[router.py]"]
end

subgraph group_async_external["Async and integrations"]
  node_celery_tasks["Email tasks<br/>[email_tasks.py]"]
  node_email_service["Brevo email service"]
  node_razorpay["Razorpay"]
  node_redis[("Redis")]
end

subgraph group_marketing["SEO marketing"]
  node_next_site["SEO marketing site<br/>[page.tsx]"]
end

node_customer(("Customer"))

node_customer -->|"uses"| node_react_app
node_react_app -->|"routes to"| node_product_pages
node_react_app -->|"routes to"| node_checkout
node_product_pages -.->|"requests products"| node_product_api
node_checkout -.->|"requests pricing"| node_pricing_api
node_checkout -.->|"places order"| node_order_api
node_checkout -.->|"starts payment"| node_payment_api
node_api_app -->|"registers"| node_product_api
node_api_app -->|"registers"| node_pricing_api
node_api_app -->|"registers"| node_order_api
node_api_app -->|"registers"| node_payment_api
node_api_app -->|"registers"| node_auth_api
node_api_app -->|"registers"| node_review_api
node_api_app -->|"registers"| node_admin_api
node_order_api -->|"creates order"| node_order_service
node_order_service -->|"persists lifecycle"| node_orders_db
node_order_api -->|"queries orders"| node_postgres
node_order_service -->|"dispatches notifications"| node_celery_tasks
node_review_api -->|"calls"| node_review_service
node_review_service -->|"checks purchase"| node_orders_db
node_auth_api -->|"handles authentication"| node_auth_service
node_auth_api -->|"validates refresh"| node_token_manager
node_auth_service -->|"manages tokens"| node_token_manager
node_token_manager -->|"checks revocation"| node_redis
node_admin_api -.->|"oversees orders"| node_order_service
node_payment_api -.->|"verifies payments"| node_razorpay
node_celery_tasks -->|"sends email"| node_email_service
node_email_service -.->|"delivers notifications"| node_customer
node_next_site -.->|"presents services"| node_customer

click node_react_app "https://github.com/bharatchandra-sys/vijetha-digital/blob/main/frontend/src/App.jsx"
click node_product_pages "https://github.com/bharatchandra-sys/vijetha-digital/blob/main/frontend/src/pages/ProductDetail.jsx"
click node_checkout "https://github.com/bharatchandra-sys/vijetha-digital/blob/main/frontend/src/pages/Checkout.jsx"
click node_api_app "https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/main.py"
click node_product_api "https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/api/products/router.py"
click node_pricing_api "https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/api/pricing/router.py"
click node_order_api "https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/api/orders/router.py"
click node_order_service "https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/services/order_service.py"
click node_payment_api "https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/api/payments/router.py"
click node_review_api "https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/api/reviews/router.py"
click node_review_service "https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/services/review_service.py"
click node_orders_db "https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/models/order.py"
click node_postgres "https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/db/session.py"
click node_auth_api "https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/api/auth/router.py"
click node_auth_service "https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/services/auth_service.py"
click node_token_manager "https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/core/token_manager.py"
click node_admin_api "https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/api/admin/router.py"
click node_celery_tasks "https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/tasks/email_tasks.py"
click node_email_service "https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/services/brevo_email_service.py"
click node_next_site "https://github.com/bharatchandra-sys/vijetha-digital/blob/main/frontend1/app/page.tsx"

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_react_app,node_product_pages,node_checkout toneBlue
class node_api_app,node_product_api,node_pricing_api,node_order_api,node_order_service,node_payment_api,node_review_api,node_review_service,node_orders_db,node_postgres toneAmber
class node_auth_api,node_auth_service,node_token_manager,node_admin_api toneMint
class node_celery_tasks,node_email_service,node_razorpay,node_redis toneRose
class node_next_site,node_customer toneIndigo
```

## Components

### Commerce storefront

- [React application](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Product browsing](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/frontend/src/pages/ProductDetail.jsx): `frontend/src/pages/ProductDetail.jsx`
- [Checkout](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/frontend/src/pages/Checkout.jsx): `frontend/src/pages/Checkout.jsx`

### Commerce services

- [FastAPI application](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/main.py): `app/main.py`
- [Product API](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/api/products/router.py): `app/api/products/router.py`
- [Pricing API](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/api/pricing/router.py): `app/api/pricing/router.py`
- [Order API](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/api/orders/router.py): `app/api/orders/router.py`
- [Order lifecycle](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/services/order_service.py): `app/services/order_service.py`
- [Payment API](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/api/payments/router.py): `app/api/payments/router.py`
- [Reviews API](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/api/reviews/router.py): `app/api/reviews/router.py`
- [Review service](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/services/review_service.py): `app/services/review_service.py`
- [Order records](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/models/order.py): `app/models/order.py`
- [PostgreSQL](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/db/session.py): `app/db/session.py`

### Identity and administration

- [Authentication API](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/api/auth/router.py): `app/api/auth/router.py`
- [Authentication service](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/services/auth_service.py): `app/services/auth_service.py`
- [Token lifecycle](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/core/token_manager.py): `app/core/token_manager.py`
- [Administration API](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/api/admin/router.py): `app/api/admin/router.py`

### Async and integrations

- [Email tasks](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/tasks/email_tasks.py): `app/tasks/email_tasks.py`
- [Brevo email service](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/app/services/brevo_email_service.py): `app/services/brevo_email_service.py`
- **Razorpay**
- **Redis**

### SEO marketing

- [SEO marketing site](https://github.com/bharatchandra-sys/vijetha-digital/blob/main/frontend1/app/page.tsx): `frontend1/app/page.tsx`

### Other components

- **Customer**

## Connections

- Customer → React application: uses
- React application → Product browsing: routes to (evidence: `frontend/src/App.jsx`)
- React application → Checkout: routes to (evidence: `frontend/src/App.jsx`)
- Product browsing → Product API: requests products
- Checkout → Pricing API: requests pricing
- Checkout → Order API: places order
- Checkout → Payment API: starts payment
- FastAPI application → Product API: registers (evidence: `app/main.py`)
- FastAPI application → Pricing API: registers (evidence: `app/main.py`)
- FastAPI application → Order API: registers (evidence: `app/main.py`)
- FastAPI application → Payment API: registers (evidence: `app/main.py`)
- FastAPI application → Authentication API: registers (evidence: `app/main.py`)
- FastAPI application → Reviews API: registers (evidence: `app/main.py`)
- FastAPI application → Administration API: registers (evidence: `app/main.py`)
- Order API → Order lifecycle: creates order (evidence: `app/api/orders/router.py`)
- Order lifecycle → Order records: persists lifecycle (evidence: `app/services/order_service.py`)
- Order API → PostgreSQL: queries orders (evidence: `app/api/orders/router.py`)
- Order lifecycle → Email tasks: dispatches notifications (evidence: `app/services/order_service.py`)
- Reviews API → Review service: calls (evidence: `app/api/reviews/router.py`)
- Review service → Order records: checks purchase (evidence: `app/services/review_service.py`)
- Authentication API → Authentication service: handles authentication (evidence: `app/api/auth/router.py`)
- Authentication API → Token lifecycle: validates refresh (evidence: `app/api/auth/router.py`)
- Authentication service → Token lifecycle: manages tokens (evidence: `app/services/auth_service.py`)
- Token lifecycle → Redis: checks revocation
- Administration API → Order lifecycle: oversees orders (evidence: `app/api/admin/router.py`)
- Payment API → Razorpay: verifies payments
- Email tasks → Brevo email service: sends email (evidence: `app/tasks/email_tasks.py`)
- Brevo email service → Customer: delivers notifications
- SEO marketing site → Customer: presents services
