How wahidakhtar/arcad works
ARCAD is a web application for managing project and site operations, people, billing, transactions, tickets, and administration. Users enter through the authenticated frontend; the application routes them to feature pages, which request API data and receive live update events. The backend mounts API routes that implement domain operations using services and persistent models. The supplied material has no README, and many domain files were not excerpted, so some feature-to-API relationships are shown only as unverified links rather than asserted call chains.
Main entry points: main.py FastAPI application · App.tsx Page router · database.py Relational database · useWebSocket.ts Live updates client
Components 28
Web application
- Page router
frontend/src/App.tsx - Auth context
frontend/src/context/AuthContext.tsx - API client
frontend/src/lib/api.ts - Live updates client
frontend/src/hooks/useWebSocket.ts - Transactions UI
frontend/src/features/transactions/hooks/useTransactionsPage.ts - Site detail UI
frontend/src/features/sites/siteDetail/hooks/useSiteDetail.ts - PO detail UI
frontend/src/features/billing/po/hooks/usePoDetail.ts
API and access
- FastAPI application
backend/app/main.py - Authentication routes
backend/app/api/routes/auth.py - Session authorization
backend/app/api/auth.py - Auth service
backend/app/services/auth.py
Operations domains
- Operations routes
backend/app/api/routes/sites.py - Operations services
backend/app/services/sites.py - Project routes
backend/app/api/routes/projects.py - Ticket routes
backend/app/api/routes/tickets.py - Transaction routes
backend/app/api/routes/transactions.py - Dashboard service
backend/app/services/dashboard.py
Billing and finance
- Billing routes
backend/app/api/routes/billing.py - Billing service
backend/app/services/billing.py - Accounting rules
backend/app/services/acc_rules.py
Runtime services
- Relational database
backend/app/core/database.py - Session cache
backend/app/core/cache.py - WebSocket manager
backend/app/core/ws_manager.py - Auth records
backend/app/models/auth.py - Core records
backend/app/models/core.py - People records
backend/app/models/hr.py
Other components
- Staff user
- Redis
Connections 38
- Staff user → Page router: uses
frontend/src/App.tsx - Page router → Auth context: checks session
frontend/src/App.tsx - Page router → Live updates client: opens live connection
frontend/src/App.tsx - Page router → Transactions UI: routes to
frontend/src/App.tsx - Page router → Site detail UI: routes to
frontend/src/App.tsx - Page router → PO detail UI: routes to
frontend/src/App.tsx - Auth context → API client: requests session
frontend/src/context/AuthContext.tsx - Transactions UI → API client: fetches records
frontend/src/features/transactions/hooks/useTransactionsPage.ts - Transactions UI → Live updates client: subscribes events
frontend/src/features/transactions/hooks/useTransactionsPage.ts - Site detail UI → API client: loads site data
frontend/src/features/sites/siteDetail/hooks/useSiteDetail.ts - Site detail UI → Live updates client: subscribes events
frontend/src/features/sites/siteDetail/hooks/useSiteDetail.ts - PO detail UI → Live updates client: subscribes events
frontend/src/features/billing/po/hooks/usePoDetail.ts - API client → FastAPI application: HTTP requests
- Live updates client → WebSocket manager: receives broadcasts
- FastAPI application → Authentication routes: mounts routes
backend/app/main.py - FastAPI application → Billing routes: mounts routes
backend/app/main.py - FastAPI application → Operations routes: mounts routes
backend/app/main.py - FastAPI application → Project routes: mounts routes
backend/app/main.py - FastAPI application → Ticket routes: mounts routes
backend/app/main.py - FastAPI application → Transaction routes: mounts routes
backend/app/main.py - FastAPI application → Dashboard service: loads dashboard
- Authentication routes → Auth service: uses service
backend/app/api/routes/auth.py - Authentication routes → Session authorization: uses authorization
backend/app/api/routes/auth.py - Session authorization → Session cache: reads session cache
backend/app/api/auth.py - Session authorization → Relational database: loads user context
backend/app/api/auth.py - Auth service → Session cache: invalidates sessions
backend/app/services/auth.py - Auth service → Auth records: persists tokens
backend/app/services/auth.py - Auth service → People records: reads users
backend/app/services/auth.py - Session cache → Redis: uses store
backend/app/core/cache.py - Relational database → FastAPI application: configured at startup
backend/app/main.py - Billing routes → Billing service: calls service
backend/app/api/routes/billing.py - Billing routes → Accounting rules: applies rules
backend/app/api/routes/billing.py - Billing routes → WebSocket manager: broadcasts updates
backend/app/api/routes/billing.py - Billing service → Relational database: uses persistence
- Operations routes → Operations services: uses service
- Accounting rules → Relational database: uses persistence
- Relational database → Core records: model base
backend/app/models/core.py - Relational database → Auth records: model base
backend/app/models/auth.py