# jeevanbagade/dasdoc architecture

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

- Interactive diagram: https://gitdiagram.com/jeevanbagade/dasdoc
- Repository: https://github.com/jeevanbagade/dasdoc

## Overview

DocDash is a full-stack print-ordering application: customers create an account, upload documents, choose print options and delivery details, review a server-authoritative quote, pay by UPI or COD, and track orders. The graph preserves the upload/page-count, pricing, payment, and order-history capabilities described in the README. Source excerpts show wizard-to-step composition, upload actions, and order/payment behavior; other service connections are documented at the API level in the README, not verified in sampled route implementations.

Main entry points: [`docdash-document-printing-mvp/src/components/wizard/checkout-wizard.tsx`](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/components/wizard/checkout-wizard.tsx) (Checkout wizard), [`docdash-document-printing-mvp/src/app/api/orders/route.ts`](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/app/api/orders/route.ts) (Order endpoints), [`docdash-document-printing-mvp/src/server/documents.ts`](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/server/documents.ts) (Document processing), [`docdash-document-printing-mvp/src/server/orders.ts`](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/server/orders.ts) (Order service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer experience"]
  node_auth_ui["Sign-in screens<br/>[page.tsx]"]
  node_signup_ui["Registration<br/>[page.tsx]"]
  node_wizard["Checkout wizard"]
  node_upload_step["Document upload<br/>[step-upload.tsx]"]
  node_options_step["Print options<br/>[step-options.tsx]"]
  node_delivery_step["Delivery address<br/>[step-delivery.tsx]"]
  node_bill_step["Quote and bill<br/>[step-bill.tsx]"]
  node_payment_step["Payment choice<br/>[step-payment.tsx]"]
  node_confirmation["Order confirmation<br/>[step-confirm.tsx]"]
  node_order_history["Order history<br/>[page.tsx]"]
  node_order_detail["Order detail<br/>[page.tsx]"]
end

subgraph group_api["REST API"]
  node_auth_api["Auth endpoints<br/>[route.ts]"]
  node_upload_api["Upload endpoints<br/>[route.ts]"]
  node_quote_api["Quote endpoint<br/>[route.ts]"]
  node_orders_api["Order endpoints<br/>[route.ts]"]
end

subgraph group_services["Domain services"]
  node_documents["Document processing<br/>[documents.ts]"]
  node_pagecount["Page counting<br/>[pagecount.ts]"]
  node_auth_service["Session and auth<br/>[auth.ts]"]
  node_order_service["Order service<br/>[orders.ts]"]
  node_payment_service["Payment provider<br/>[payments.ts]"]
  node_storage["File storage<br/>[storage.ts]"]
end

subgraph group_persistence["Persistence"]
  node_database[("PostgreSQL data<br/>[schema.ts]")]
end

subgraph group_shared["Shared rules"]
  node_pricing["Pricing rules<br/>[pricing.ts]"]
  node_validation["Request validation<br/>[schemas.ts]"]
end

node_customer(("Customer"))

node_customer -->|"signs in"| node_auth_ui
node_customer -->|"registers"| node_signup_ui
node_customer -->|"places order"| node_wizard
node_wizard -->|"renders"| node_upload_step
node_wizard -->|"renders"| node_options_step
node_wizard -->|"renders"| node_delivery_step
node_wizard -->|"renders"| node_bill_step
node_wizard -->|"renders"| node_payment_step
node_wizard -->|"renders"| node_confirmation
node_upload_step -->|"uploads files"| node_upload_api
node_auth_ui -->|"submits credentials"| node_auth_api
node_signup_ui -->|"submits registration"| node_auth_api
node_wizard -->|"requests quote"| node_quote_api
node_wizard -->|"places order"| node_orders_api
node_orders_api -->|"serves history"| node_order_history
node_orders_api -->|"serves detail"| node_order_detail
node_upload_api -->|"processes uploads"| node_documents
node_documents -->|"counts pages"| node_pagecount
node_documents -->|"stores files"| node_storage
node_auth_api -->|"authenticates"| node_auth_service
node_quote_api -->|"computes quote"| node_pricing
node_orders_api -->|"places and reads"| node_order_service
node_order_service -->|"requests payment"| node_payment_service
node_order_service -->|"recomputes totals"| node_pricing
node_order_service -->|"persists orders"| node_database
node_auth_service -->|"reads users"| node_database
node_documents -->|"records documents"| node_database
node_quote_api -->|"validates input"| node_validation
node_orders_api -->|"validates input"| node_validation
node_storage -.->|"stores metadata"| node_database

click node_auth_ui "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/app/login/page.tsx"
click node_signup_ui "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/app/signup/page.tsx"
click node_wizard "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/components/wizard/checkout-wizard.tsx"
click node_upload_step "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/components/wizard/step-upload.tsx"
click node_options_step "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/components/wizard/step-options.tsx"
click node_delivery_step "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/components/wizard/step-delivery.tsx"
click node_bill_step "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/components/wizard/step-bill.tsx"
click node_payment_step "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/components/wizard/step-payment.tsx"
click node_confirmation "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/components/wizard/step-confirm.tsx"
click node_order_history "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/app/orders/page.tsx"
click node_order_detail "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/app/orders/%5Bid%5D/page.tsx"
click node_auth_api "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/app/api/auth/signup/route.ts"
click node_upload_api "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/app/api/uploads/route.ts"
click node_quote_api "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/app/api/pricing/quote/route.ts"
click node_orders_api "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/app/api/orders/route.ts"
click node_documents "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/server/documents.ts"
click node_pagecount "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/server/pagecount.ts"
click node_auth_service "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/server/auth.ts"
click node_order_service "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/server/orders.ts"
click node_payment_service "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/server/payments.ts"
click node_storage "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/server/storage.ts"
click node_pricing "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/lib/pricing.ts"
click node_validation "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/lib/schemas.ts"
click node_database "https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/db/schema.ts"

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_auth_ui,node_signup_ui,node_wizard,node_upload_step,node_options_step,node_delivery_step,node_bill_step,node_payment_step,node_confirmation,node_order_history,node_order_detail toneBlue
class node_auth_api,node_upload_api,node_quote_api,node_orders_api toneAmber
class node_documents,node_pagecount,node_auth_service,node_order_service,node_payment_service,node_storage toneMint
class node_database toneRose
class node_pricing,node_validation,node_customer toneIndigo
```

## Components

### Customer experience

- [Sign-in screens](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/app/login/page.tsx): `docdash-document-printing-mvp/src/app/login/page.tsx`
- [Registration](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/app/signup/page.tsx): `docdash-document-printing-mvp/src/app/signup/page.tsx`
- [Checkout wizard](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/components/wizard/checkout-wizard.tsx): `docdash-document-printing-mvp/src/components/wizard/checkout-wizard.tsx`
- [Document upload](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/components/wizard/step-upload.tsx): `docdash-document-printing-mvp/src/components/wizard/step-upload.tsx`
- [Print options](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/components/wizard/step-options.tsx): `docdash-document-printing-mvp/src/components/wizard/step-options.tsx`
- [Delivery address](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/components/wizard/step-delivery.tsx): `docdash-document-printing-mvp/src/components/wizard/step-delivery.tsx`
- [Quote and bill](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/components/wizard/step-bill.tsx): `docdash-document-printing-mvp/src/components/wizard/step-bill.tsx`
- [Payment choice](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/components/wizard/step-payment.tsx): `docdash-document-printing-mvp/src/components/wizard/step-payment.tsx`
- [Order confirmation](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/components/wizard/step-confirm.tsx): `docdash-document-printing-mvp/src/components/wizard/step-confirm.tsx`
- [Order history](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/app/orders/page.tsx): `docdash-document-printing-mvp/src/app/orders/page.tsx`
- [Order detail](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/app/orders/%5Bid%5D/page.tsx): `docdash-document-printing-mvp/src/app/orders/[id]/page.tsx`

### REST API

- [Auth endpoints](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/app/api/auth/signup/route.ts): `docdash-document-printing-mvp/src/app/api/auth/signup/route.ts`
- [Upload endpoints](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/app/api/uploads/route.ts): `docdash-document-printing-mvp/src/app/api/uploads/route.ts`
- [Quote endpoint](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/app/api/pricing/quote/route.ts): `docdash-document-printing-mvp/src/app/api/pricing/quote/route.ts`
- [Order endpoints](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/app/api/orders/route.ts): `docdash-document-printing-mvp/src/app/api/orders/route.ts`

### Domain services

- [Document processing](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/server/documents.ts): `docdash-document-printing-mvp/src/server/documents.ts`
- [Page counting](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/server/pagecount.ts): `docdash-document-printing-mvp/src/server/pagecount.ts`
- [Session and auth](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/server/auth.ts): `docdash-document-printing-mvp/src/server/auth.ts`
- [Order service](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/server/orders.ts): `docdash-document-printing-mvp/src/server/orders.ts`
- [Payment provider](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/server/payments.ts): `docdash-document-printing-mvp/src/server/payments.ts`
- [File storage](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/server/storage.ts): `docdash-document-printing-mvp/src/server/storage.ts`

### Persistence

- [PostgreSQL data](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/db/schema.ts): `docdash-document-printing-mvp/src/db/schema.ts`

### Shared rules

- [Pricing rules](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/lib/pricing.ts): `docdash-document-printing-mvp/src/lib/pricing.ts`
- [Request validation](https://github.com/jeevanbagade/dasdoc/blob/main/docdash-document-printing-mvp/src/lib/schemas.ts): `docdash-document-printing-mvp/src/lib/schemas.ts`

### Other components

- **Customer**

## Connections

- Customer → Sign-in screens: signs in
- Customer → Registration: registers
- Customer → Checkout wizard: places order
- Checkout wizard → Document upload: renders (evidence: `docdash-document-printing-mvp/src/components/wizard/checkout-wizard.tsx`)
- Checkout wizard → Print options: renders (evidence: `docdash-document-printing-mvp/src/components/wizard/checkout-wizard.tsx`)
- Checkout wizard → Delivery address: renders (evidence: `docdash-document-printing-mvp/src/components/wizard/checkout-wizard.tsx`)
- Checkout wizard → Quote and bill: renders (evidence: `docdash-document-printing-mvp/src/components/wizard/checkout-wizard.tsx`)
- Checkout wizard → Payment choice: renders (evidence: `docdash-document-printing-mvp/src/components/wizard/checkout-wizard.tsx`)
- Checkout wizard → Order confirmation: renders (evidence: `docdash-document-printing-mvp/src/components/wizard/checkout-wizard.tsx`)
- Document upload → Upload endpoints: uploads files
- Sign-in screens → Auth endpoints: submits credentials
- Registration → Auth endpoints: submits registration
- Checkout wizard → Quote endpoint: requests quote
- Checkout wizard → Order endpoints: places order
- Order endpoints → Order history: serves history
- Order endpoints → Order detail: serves detail
- Upload endpoints → Document processing: processes uploads
- Document processing → Page counting: counts pages
- Document processing → File storage: stores files
- Auth endpoints → Session and auth: authenticates
- Quote endpoint → Pricing rules: computes quote
- Order endpoints → Order service: places and reads
- Order service → Payment provider: requests payment (evidence: `docdash-document-printing-mvp/src/server/orders.ts`)
- Order service → Pricing rules: recomputes totals
- Order service → PostgreSQL data: persists orders
- Session and auth → PostgreSQL data: reads users (evidence: `docdash-document-printing-mvp/src/server/auth.ts`)
- Document processing → PostgreSQL data: records documents
- Quote endpoint → Request validation: validates input
- Order endpoints → Request validation: validates input
- File storage → PostgreSQL data: stores metadata
