How malix55/car-workshop_management_system works
Purpose and Topology
Car Workshop Management System is a split JavaScript application: a React frontend for workshop operations and a Node.js backend API. The stated scope includes workshop/client management, ecommerce, scheduling, financial workflows, location/remote-mechanic features, and authenticated web/mobile access. The repository contains no separate mobile client or dedicated integrations implementation.
• Backend entry point: Workshop-server/server.js
• Frontend entry point and route composition: workshop-frontend/src/index.js, workshop-frontend/src/Routes.js
Backend API and Application Boundary
The backend is organized as an HTTP server with route, controller, middleware, schema, and persistence-model layers. Workshop-server/server.js initializes the process; Workshop-server/routes/user.js exposes the currently visible route surface; Workshop-server/controllers/user.js holds request handling/business actions. This is the primary boundary consumed by the frontend and any future mobile client.
• Workshop-server/server.js
• Workshop-server/routes/user.js
• Workshop-server/controllers/user.js
Identity, Authorization, and User Lifecycle
Authentication and authorization are middleware-enforced around API access. JWT authentication is explicitly represented, while a separate user authorization middleware suggests role- or user-state checks. User persistence and admin validation schemas support account administration.
• Workshop-server/middleware/jwt-auth.js
• Workshop-server/middleware/userAuth.js
• Workshop-server/models/users.js
• Workshop-server/schemas/admin.js
Core Operational Data Domain
Server-side models define the system-of-record entities for the workshop: clients, staff, appointments/events, products, orders, and expenses. These models form the key persistence boundary; frontend screens should treat the API as authoritative rather than managing these entities locally.
• Workshop-server/models/client.js, Workshop-server/models/staff.js
• Workshop-server/models/appointments.js, Workshop-server/models/event.js
• Workshop-server/models/products.js, Workshop-server/models/orders.js, Workshop-server/models/expense.js
Frontend Shell, Navigation, and Session State
The React client composes application routes, sign-in, a dashboard shell, sidebar/navigation, and a sign-in context. Route-level views host workflow-specific component trees; SigninContext is the visible client-side session/auth state boundary.
• workshop-frontend/src/Routes.js
• workshop-frontend/src/storage/SigninContext.js
• workshop-frontend/src/views/Signin/Signin.js
• workshop-frontend/src/components/Sidebar/Sidebar.js
Workshop Operations Workflows
Operational UI is divided into domain modules: customer and employee management, inventory, orders, calendar scheduling, requests/expenses/time-off, reporting, and pricing. Dashboard views aggregate operational status and reusable dashboard widgets rather than constituting the data source.
• workshop-frontend/src/components/Client/Clients.js, workshop-frontend/src/components/AddClients/AddClients.js
• workshop-frontend/src/components/Employee/Employees.js, workshop-frontend/src/components/AddEmployees/AddEmployees.js
• workshop-frontend/src/components/Inventory/Inventory.js, workshop-frontend/src/components/Orders/Orders.js
• workshop-frontend/src/components/Calander/Calander.js, workshop-frontend/src/components/Requests/Expense/Expense.js
• workshop-frontend/src/views/Dashboard/Dashboard.js
Files, Configuration, and External Dependencies
Uploads are handled server-side through dedicated middleware and a local image upload directory, making local filesystem storage an infrastructure dependency. Environment settings and runtime configuration are separated into .env and config.js. The tree does not establish concrete payment, chat, scraping, mapping, or realtime-service adapters despite those README claims.
• Workshop-server/middleware/file-upload.js
• Workshop-server/uploads/images
• Workshop-server/config.js
• Workshop-server/.env
Main entry points: Routes.js Route composition · routes/user.js API routes · controllers/user.js Request actions · server.js API server
Components 17
React frontend
- Frontend entry
workshop-frontend/src/index.js - Route composition
workshop-frontend/src/Routes.js - Sign-in session · Client-side session and authentication state.
workshop-frontend/src/storage/SigninContext.js - Sign-in
workshop-frontend/src/views/Signin/Signin.js - Sidebar navigation
workshop-frontend/src/components/Sidebar/Sidebar.js - Dashboard · Aggregates workshop status and widgets.
workshop-frontend/src/views/Dashboard/Dashboard.js - Operations workflows · Clients, staff, inventory, orders, calendar, and expenses.
workshop-frontend/src/components/Client/Clients.js
Node.js backend
- API server
Workshop-server/server.js - API routes · Visible API route surface.
Workshop-server/routes/user.js - Request actions · Handles API requests and business actions.
Workshop-server/controllers/user.js - JWT authentication
Workshop-server/middleware/jwt-auth.js - User authorization · Applies role or user-state checks.
Workshop-server/middleware/userAuth.js - File upload middleware
Workshop-server/middleware/file-upload.js - Runtime configuration · Environment and server runtime settings.
Workshop-server/config.js
Persistence & storage
- Users & admin validation · User records supported by admin validation schemas.
Workshop-server/models/users.js - Workshop domain data · Clients, staff, appointments, events, products, orders, and expenses.
Workshop-server/models/client.js - Uploaded images
Workshop-server/uploads/images
Connections 18
- Frontend entry → Route composition: mounts
- Route composition → Sign-in: renders
- Route composition → Dashboard: renders
- Route composition → Operations workflows: renders
- Sign-in → Sign-in session: establishes
- Sign-in session → Route composition: gates session
- Sidebar navigation → Route composition: navigates
- Dashboard → API routes: API requests
- Operations workflows → API routes: API requests
- API server → API routes: hosts
- API routes → JWT authentication: authenticates
- JWT authentication → User authorization: authorizes
- User authorization → Request actions: permits requests
- Request actions → Users & admin validation: manages accounts
- Request actions → Workshop domain data: reads and writes
- API routes → File upload middleware: accepts uploads
- File upload middleware → Uploaded images: stores files
- API server → Runtime configuration: loads