# powerfilingadmin/powerfiling_prod architecture

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

- Interactive diagram: https://gitdiagram.com/powerfilingadmin/powerfiling_prod
- Repository: https://github.com/powerfilingadmin/powerfiling_prod

## Overview

Powerfiling is a web tax-filing platform: users discover filing services, authenticate, submit tax information, pay for a plan, and manage orders. The server exposes authentication, filing, document, plan, payment, coupon, and referral capabilities, with admin workflows for access and withdrawals. The graph preserves those product branches; unsampled implementations are represented by their existing directories. Edges reflect routes, calls, or relationships visible in the README and supplied source index/excerpts; uncertain client-to-server wiring is omitted.

Main entry points: [`client/src/routes/AppRoutes.jsx`](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/client/src/routes/AppRoutes.jsx) (Page routing), [`server/server.js`](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/server.js) (Express application), [`server/controllers/paymentController.js`](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/controllers/paymentController.js) (Payment workflow), [`server/controllers/authController.js`](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/controllers/authController.js) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_app["React app<br/>[App.jsx]"]
  node_routes["Page routing<br/>[AppRoutes.jsx]"]
  node_marketing["Public pages"]
  node_calculators["Tax calculators"]
  node_blogs["Tax blogs"]
  node_adminui["Admin console"]
end

subgraph group_filing["Filing services"]
  node_services["Service catalog<br/>[servicesData.js]"]
  node_serviceforms["Filing forms"]
  node_filingapi["Filing and documents<br/>[itrController.js]"]
  node_documents[("Document records<br/>[Document.js]")]
end

subgraph group_commerce["Payments and orders"]
  node_userdash["User dashboard<br/>[UserDashboard.jsx]"]
  node_orderui["Order details<br/>[OrderDetails.jsx]"]
  node_checkout["Checkout"]
  node_planapi["Plan catalog API<br/>[planController.js]"]
  node_paymentapi["Payment workflow"]
  node_pricing["Payment pricing<br/>[paymentPricing.js]"]
  node_fulfillment["Purchase fulfillment<br/>[fulfillPurchase.js]"]
  node_purchase[("Purchases<br/>[Purchase.js]")]
  node_cashfree["Cashfree gateway<br/>[cashfreeService.js]"]
end

subgraph group_identity["Identity and referrals"]
  node_authui["Sign-in flows"]
  node_authstate["Auth state<br/>[AuthContext.jsx]"]
  node_referralui["Referral dashboard"]
  node_authroutes["Auth endpoints<br/>[authRoutes.js]"]
  node_authcontroller["Authentication<br/>[authController.js]"]
  node_userstore[("User records<br/>[User.js]")]
  node_referral["Referral rewards"]
end

subgraph group_backend["Server capabilities"]
  node_api["HTTP client<br/>[axios.js]"]
  node_server["Express application<br/>[server.js]"]
  node_adminops["Admin operations"]
  node_email["Email delivery<br/>[sendEmail.js]"]
end

node_visitor(("User"))
node_mailservice["Email provider"]

node_visitor -->|"uses"| node_app
node_app -->|"renders"| node_routes
node_routes -->|"routes to"| node_marketing
node_routes -->|"routes to"| node_calculators
node_routes -->|"routes to"| node_blogs
node_routes -->|"routes to"| node_serviceforms
node_serviceforms -->|"reads catalog"| node_services
node_routes -->|"routes to"| node_authui
node_app -->|"provides auth"| node_authstate
node_authstate -->|"uses"| node_api
node_routes -->|"routes to"| node_userdash
node_routes -->|"routes to"| node_orderui
node_routes -->|"routes to"| node_checkout
node_routes -->|"routes to"| node_referralui
node_routes -->|"routes to"| node_adminui
node_server -->|"mounts routes"| node_authroutes
node_server -->|"mounts routes"| node_adminops
node_authroutes -->|"dispatches"| node_authcontroller
node_authcontroller -->|"reads and writes"| node_userstore
node_authcontroller -->|"sends verification"| node_email
node_authcontroller -->|"delivers mail"| node_mailservice
node_referral -->|"updates rewards"| node_userstore
node_referral -->|"sends notices"| node_email
node_server -->|"mounts routes"| node_filingapi
node_filingapi -->|"uses documents"| node_documents
node_server -->|"mounts routes"| node_planapi
node_server -->|"mounts routes"| node_paymentapi
node_paymentapi -->|"calculates price"| node_pricing
node_paymentapi -->|"creates orders"| node_cashfree
node_paymentapi -->|"fulfills payment"| node_fulfillment
node_fulfillment -->|"records purchase"| node_purchase
node_paymentapi -->|"reads purchases"| node_purchase

click node_app "https://github.com/powerfilingadmin/powerfiling_prod/blob/main/client/src/App.jsx"
click node_routes "https://github.com/powerfilingadmin/powerfiling_prod/blob/main/client/src/routes/AppRoutes.jsx"
click node_marketing "https://github.com/powerfilingadmin/powerfiling_prod/tree/main/client/src/pages/frontend"
click node_calculators "https://github.com/powerfilingadmin/powerfiling_prod/tree/main/client/src/pages/calculators"
click node_blogs "https://github.com/powerfilingadmin/powerfiling_prod/tree/main/client/src/pages/blog"
click node_services "https://github.com/powerfilingadmin/powerfiling_prod/blob/main/client/src/data/servicesData.js"
click node_serviceforms "https://github.com/powerfilingadmin/powerfiling_prod/tree/main/client/src/pages/services"
click node_authui "https://github.com/powerfilingadmin/powerfiling_prod/tree/main/client/src/components/auth"
click node_authstate "https://github.com/powerfilingadmin/powerfiling_prod/blob/main/client/src/context/AuthContext.jsx"
click node_referralui "https://github.com/powerfilingadmin/powerfiling_prod/blob/main/client/src/pages/ReferralDashboard/ReferralDashboard.jsx"
click node_userdash "https://github.com/powerfilingadmin/powerfiling_prod/blob/main/client/src/pages/dashboard/UserDashboard.jsx"
click node_orderui "https://github.com/powerfilingadmin/powerfiling_prod/blob/main/client/src/pages/dashboard/OrderDetails.jsx"
click node_checkout "https://github.com/powerfilingadmin/powerfiling_prod/tree/main/client/src/pages/payment"
click node_adminui "https://github.com/powerfilingadmin/powerfiling_prod/tree/main/client/src/pages/admin"
click node_api "https://github.com/powerfilingadmin/powerfiling_prod/blob/main/client/src/api/axios.js"
click node_server "https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/server.js"
click node_authroutes "https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/routes/authRoutes.js"
click node_authcontroller "https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/controllers/authController.js"
click node_userstore "https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/models/User.js"
click node_referral "https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/controllers/referralController.js"
click node_filingapi "https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/controllers/itrController.js"
click node_documents "https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/models/Document.js"
click node_planapi "https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/controllers/planController.js"
click node_paymentapi "https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/controllers/paymentController.js"
click node_pricing "https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/utils/paymentPricing.js"
click node_fulfillment "https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/utils/fulfillPurchase.js"
click node_purchase "https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/models/Purchase.js"
click node_cashfree "https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/services/cashfreeService.js"
click node_adminops "https://github.com/powerfilingadmin/powerfiling_prod/tree/main/server/controllers"
click node_email "https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/utils/sendEmail.js"

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,node_routes,node_marketing,node_calculators,node_blogs,node_adminui,node_visitor toneBlue
class node_services,node_serviceforms,node_filingapi,node_documents toneAmber
class node_userdash,node_orderui,node_checkout,node_planapi,node_paymentapi,node_pricing,node_fulfillment,node_purchase,node_cashfree toneMint
class node_authui,node_authstate,node_referralui,node_authroutes,node_authcontroller,node_userstore,node_referral toneRose
class node_api,node_server,node_adminops,node_email,node_mailservice toneIndigo
```

## Components

### Web experience

- [React app](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Page routing](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/client/src/routes/AppRoutes.jsx): `client/src/routes/AppRoutes.jsx`
- [Public pages](https://github.com/powerfilingadmin/powerfiling_prod/tree/main/client/src/pages/frontend): `client/src/pages/frontend`
- [Tax calculators](https://github.com/powerfilingadmin/powerfiling_prod/tree/main/client/src/pages/calculators): `client/src/pages/calculators`
- [Tax blogs](https://github.com/powerfilingadmin/powerfiling_prod/tree/main/client/src/pages/blog): `client/src/pages/blog`
- [Admin console](https://github.com/powerfilingadmin/powerfiling_prod/tree/main/client/src/pages/admin): `client/src/pages/admin`

### Filing services

- [Service catalog](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/client/src/data/servicesData.js): `client/src/data/servicesData.js`
- [Filing forms](https://github.com/powerfilingadmin/powerfiling_prod/tree/main/client/src/pages/services): `client/src/pages/services`
- [Filing and documents](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/controllers/itrController.js): `server/controllers/itrController.js`
- [Document records](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/models/Document.js): `server/models/Document.js`

### Payments and orders

- [User dashboard](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/client/src/pages/dashboard/UserDashboard.jsx): `client/src/pages/dashboard/UserDashboard.jsx`
- [Order details](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/client/src/pages/dashboard/OrderDetails.jsx): `client/src/pages/dashboard/OrderDetails.jsx`
- [Checkout](https://github.com/powerfilingadmin/powerfiling_prod/tree/main/client/src/pages/payment): `client/src/pages/payment`
- [Plan catalog API](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/controllers/planController.js): `server/controllers/planController.js`
- [Payment workflow](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/controllers/paymentController.js): `server/controllers/paymentController.js`
- [Payment pricing](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/utils/paymentPricing.js): `server/utils/paymentPricing.js`
- [Purchase fulfillment](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/utils/fulfillPurchase.js): `server/utils/fulfillPurchase.js`
- [Purchases](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/models/Purchase.js): `server/models/Purchase.js`
- [Cashfree gateway](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/services/cashfreeService.js): `server/services/cashfreeService.js`

### Identity and referrals

- [Sign-in flows](https://github.com/powerfilingadmin/powerfiling_prod/tree/main/client/src/components/auth): `client/src/components/auth`
- [Auth state](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/client/src/context/AuthContext.jsx): `client/src/context/AuthContext.jsx`
- [Referral dashboard](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/client/src/pages/ReferralDashboard/ReferralDashboard.jsx): `client/src/pages/ReferralDashboard/ReferralDashboard.jsx`
- [Auth endpoints](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/routes/authRoutes.js): `server/routes/authRoutes.js`
- [Authentication](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/controllers/authController.js): `server/controllers/authController.js`
- [User records](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/models/User.js): `server/models/User.js`
- [Referral rewards](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/controllers/referralController.js): `server/controllers/referralController.js`

### Server capabilities

- [HTTP client](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/client/src/api/axios.js): `client/src/api/axios.js`
- [Express application](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/server.js): `server/server.js`
- [Admin operations](https://github.com/powerfilingadmin/powerfiling_prod/tree/main/server/controllers): `server/controllers`
- [Email delivery](https://github.com/powerfilingadmin/powerfiling_prod/blob/main/server/utils/sendEmail.js): `server/utils/sendEmail.js`

### Other components

- **User**
- **Email provider**

## Connections

- User → React app: uses (evidence: `README.md`)
- React app → Page routing: renders (evidence: `client/src/App.jsx`)
- Page routing → Public pages: routes to (evidence: `client/src/routes/AppRoutes.jsx`)
- Page routing → Tax calculators: routes to (evidence: `client/src/routes/AppRoutes.jsx`)
- Page routing → Tax blogs: routes to (evidence: `client/src/routes/AppRoutes.jsx`)
- Page routing → Filing forms: routes to (evidence: `client/src/routes/AppRoutes.jsx`)
- Filing forms → Service catalog: reads catalog (evidence: `client/src/pages/services/ServiceDetail.jsx`)
- Page routing → Sign-in flows: routes to (evidence: `client/src/routes/AppRoutes.jsx`)
- React app → Auth state: provides auth (evidence: `client/src/App.jsx`)
- Auth state → HTTP client: uses (evidence: `client/src/context/AuthContext.jsx`)
- Page routing → User dashboard: routes to (evidence: `client/src/routes/AppRoutes.jsx`)
- Page routing → Order details: routes to (evidence: `client/src/routes/AppRoutes.jsx`)
- Page routing → Checkout: routes to (evidence: `client/src/routes/AppRoutes.jsx`)
- Page routing → Referral dashboard: routes to (evidence: `client/src/routes/AppRoutes.jsx`)
- Page routing → Admin console: routes to (evidence: `client/src/routes/AppRoutes.jsx`)
- Express application → Auth endpoints: mounts routes (evidence: `server/server.js`)
- Express application → Admin operations: mounts routes (evidence: `server/server.js`)
- Auth endpoints → Authentication: dispatches (evidence: `server/routes/authRoutes.js`)
- Authentication → User records: reads and writes (evidence: `server/controllers/authController.js`)
- Authentication → Email delivery: sends verification (evidence: `server/controllers/authController.js`)
- Authentication → Email provider: delivers mail
- Referral rewards → User records: updates rewards (evidence: `server/controllers/referralController.js`)
- Referral rewards → Email delivery: sends notices (evidence: `server/controllers/referralController.js`)
- Express application → Filing and documents: mounts routes (evidence: `server/server.js`)
- Filing and documents → Document records: uses documents (evidence: `server/controllers/itrController.js`)
- Express application → Plan catalog API: mounts routes (evidence: `server/server.js`)
- Express application → Payment workflow: mounts routes (evidence: `server/server.js`)
- Payment workflow → Payment pricing: calculates price (evidence: `server/controllers/paymentController.js`)
- Payment workflow → Cashfree gateway: creates orders (evidence: `server/controllers/paymentController.js`)
- Payment workflow → Purchase fulfillment: fulfills payment (evidence: `server/controllers/paymentController.js`)
- Purchase fulfillment → Purchases: records purchase (evidence: `server/utils/fulfillPurchase.js`)
- Payment workflow → Purchases: reads purchases (evidence: `server/controllers/paymentController.js`)
