How shigosag/business-management-system works
This is a browser-based business management system: users view dashboard metrics and charts or manage customer records through a React UI backed by an Express REST API and Prisma/PostgreSQL. The customer workflow runs from the Customers page through the API client, route validation and controller, customer service, and database. Analytics and authentication are separate backend capabilities. Edges reflect shown calls, imports listed in the source index, or README statements; unsampled implementation details are not inferred.
Main entry points: app.ts Express API app · Customers.tsx Customer management · auth.routes.ts Auth routes · db.ts Prisma database client
Components 22
Web application
- App navigation
frontend/src/App.tsx - Dashboard
frontend/src/pages/Dashboard.tsx - Customer management
frontend/src/pages/Customers.tsx - Dashboard charts
frontend/src/components/ChartCard.tsx - Customer modal
frontend/src/components/Modal.tsx - Toast notifications
frontend/src/components/Toast.tsx - HTTP client
frontend/src/api/Client.ts
API and security
- Express API app
backend/src/app.ts - Customer routes
backend/src/routes/customer.routes.ts - Auth routes
backend/src/routes/auth.routes.ts - Analytics routes
backend/src/routes/analytics.routes.ts - Request validation
backend/src/middleware/validate.ts - JWT authentication
backend/src/middleware/auth.ts
Business capabilities
- Customer controller
backend/src/controllers/customer.controller.ts - Customer service
backend/src/services/customer.service.ts - Analytics controller
backend/src/controllers/analytics.controller.ts - Auth controller
backend/src/controllers/auth.controller.ts
Data and operations
- Prisma database client
backend/src/config/db.ts - Database schema
backend/prisma/schema.prisma - Application logger
backend/src/utils/logger.ts
Other components
- Business user
- PostgreSQL
Connections 26
- Business user → App navigation: uses
README.md - App navigation → Dashboard: renders
frontend/src/App.tsx - App navigation → Customer management: renders
frontend/src/App.tsx - Dashboard → HTTP client: requests metrics
frontend/src/pages/Dashboard.tsx - Dashboard → Dashboard charts: renders
frontend/src/pages/Dashboard.tsx - Customer management → HTTP client: requests CRUD
frontend/src/pages/Customers.tsx - Customer management → Customer modal: renders
frontend/src/pages/Customers.tsx - Customer management → Toast notifications: shows feedback
frontend/src/pages/Customers.tsx - HTTP client → Express API app: calls REST API
README.md - Express API app → Customer routes: mounts
backend/src/app.ts - Express API app → Auth routes: mounts
backend/src/app.ts - Express API app → Analytics routes: mounts
backend/src/app.ts - Customer routes → Customer controller: dispatches
backend/src/routes/customer.routes.ts - Customer routes → Request validation: validates writes
backend/src/routes/customer.routes.ts - Auth routes → Auth controller: dispatches
backend/src/routes/auth.routes.ts - Auth routes → Request validation: validates credentials
backend/src/routes/auth.routes.ts - Auth routes → JWT authentication: protects profile
backend/src/routes/auth.routes.ts - Analytics routes → Analytics controller: dispatches
backend/src/routes/analytics.routes.ts - Customer controller → Customer service: delegates
backend/src/controllers/customer.controller.ts - Customer service → Prisma database client: queries data
backend/src/services/customer.service.ts - Auth controller → Prisma database client: reads and writes users
backend/src/controllers/auth.controller.ts - Analytics controller → Prisma database client: queries metrics
backend/src/controllers/analytics.controller.ts - Prisma database client → PostgreSQL: persists data
README.md - Database schema → PostgreSQL: defines structure
- Express API app → Application logger: logs requests
backend/src/app.ts - Analytics controller → Application logger: logs analytics
backend/src/controllers/analytics.controller.ts