How usmankhalid172/hisabdo-mern-webapp works
HisabDo is a merchant bookkeeping web application for managing customers, vendors, transactions, cash flow, reports, and account access. The main documented workflow is merchant sign-in or registration, session protection, then using the dashboard to manage business records and review results. The repository contains both a Day 31 snapshot and a root application; this map focuses on the root application. Source evidence is uneven: authentication behavior is documented, while several product pages and services are indexed but not excerpted, so uncertain page-to-API links are omitted.
Main entry points: auth-token.ts JWT verification · route.ts Authentication API · page.tsx Login and registration · middleware.ts Route protection
Components 22
Identity and access
- Login and registration
src/app/(auth)/login/page.tsx - Authentication API
src/app/api/auth/login/route.ts - Auth state
src/context/AuthContext.tsx - Route protection
src/middleware.ts
Business records
- Customer records
src/app/(dashboard)/customers/page.tsx - Customer API
src/app/api/customers/route.ts - Vendor records
src/app/(dashboard)/vendors/page.jsx - Vendor API
src/app/api/vendors/route.js - Transactions
src/app/(dashboard)/transactions/page.tsx - Transaction API
src/app/api/transactions/route.ts - Expense tracking
src/app/(dashboard)/expenses/page.tsx
Dashboard and insights
- Dashboard
src/app/(dashboard)/dashboard/page.tsx - Dashboard summary
src/app/api/dashboard/summary/route.js - Reports
src/app/(dashboard)/reports/page.tsx - Reports API
src/app/api/reports/route.js
Shared services
- Business services
src/services/hisabdoService.ts - AI assistant
src/services/chatbotService.ts - Subscriptions
src/services/subscriptionService.ts - Supabase data
src/lib/supabase/server.ts - Local data store
src/lib/db-store.js - JWT verification
src/lib/auth-token.ts
Other components
- Merchant
Connections 12
- Merchant → Login and registration: starts session
README.md - Login and registration → Authentication API: submits credentials
README.md - Authentication API → JWT verification: issues tokens
src/app/api/auth/login/route.ts - Auth state → JWT verification: uses client
src/context/AuthContext.tsx - Merchant → Route protection: requests protected routes
README.md - Route protection → Login and registration: redirects unauthenticated
README.md - Customer API → Supabase data: reads and writes
src/app/api/customers/route.ts - Transaction API → JWT verification: verifies session
src/app/api/transactions/route.ts - Dashboard summary → JWT verification: checks token
src/app/api/dashboard/summary/route.js - Reports API → Local data store: reads records
src/app/api/reports/route.js - Vendor API → Local data store: reads and writes
src/app/api/vendors/route.js - Authentication API → JWT verification: verifies credentials
src/app/api/auth/login/route.ts