How faizan-7890/angular-postgres works
OpsTrack is a CMMS for equipment lifecycle management, preventative maintenance, repair workflows, technician assignments, and spare-parts inventory. Users work through Angular dashboard, Kanban, schedules, and inventory screens; those screens use the API client to reach NestJS controllers and domain services backed by Prisma/PostgreSQL. Scheduled maintenance can also generate work orders. The README documents asset search, QR badges, and dashboard KPIs, but corresponding asset source files are absent from the supplied tree; those capabilities are represented at the enclosing backend source path. Frontend feature-to-client wiring is summarized from the documented product structure; only selected backend calls were sampled.
Main entry points: api.service.ts REST API client · prisma.service.ts Prisma database client · main.ts NestJS application · work-orders.service.ts Work-order workflow
Components 20
Angular interface
- Dashboard KPIs
frontend/src/app/features/dashboard/dashboard.component.ts - Equipment directory
frontend/src/app - Work-order Kanban
frontend/src/app/features/kanban/kanban.component.ts - Schedule manager
frontend/src/app/features/schedules/schedules.component.ts - Parts inventory
frontend/src/app/features/inventory/inventory.component.ts - REST API client
frontend/src/app/core/services/api.service.ts
NestJS domain API
- NestJS application
backend/src/main.ts - Equipment lifecycle
backend/src - Work-order endpoints
backend/src/work-orders/work-orders.controller.ts - Work-order workflow
backend/src/work-orders/work-orders.service.ts - Parts endpoints
backend/src/spare-parts/spare-parts.controller.ts - Parts inventory logic
backend/src/spare-parts/spare-parts.service.ts - Technician endpoints
backend/src/technicians/technicians.controller.ts - Technician directory
backend/src/technicians/technicians.service.ts
Maintenance automation
- Schedule endpoints
backend/src/maintenance-schedules/schedules.controller.ts - Schedule evaluation
backend/src/maintenance-schedules/schedules.service.ts - Daily schedule worker
backend/src/maintenance-schedules/schedules.scheduler.ts
Persistence
- Prisma database client
backend/src/prisma/prisma.service.ts - PostgreSQL store
Other components
- Maintenance user
Connections 28
- Maintenance user → Dashboard KPIs: views
- Maintenance user → Equipment directory: manages assets
- Maintenance user → Work-order Kanban: dispatches work
- Maintenance user → Schedule manager: sets schedules
- Maintenance user → Parts inventory: checks stock
- Dashboard KPIs → REST API client: requests data
- Equipment directory → REST API client: searches assets
- Work-order Kanban → REST API client: updates orders
- Schedule manager → REST API client: manages schedules
- Parts inventory → REST API client: reads inventory
- REST API client → NestJS application: HTTP requests
- NestJS application → Work-order endpoints: routes requests
- NestJS application → Schedule endpoints: routes requests
- NestJS application → Parts endpoints: routes requests
- NestJS application → Technician endpoints: routes requests
- Work-order endpoints → Work-order workflow: invokes
- Schedule endpoints → Schedule evaluation: invokes
- Parts endpoints → Parts inventory logic: invokes
- Technician endpoints → Technician directory: invokes
- Work-order workflow → Prisma database client: queries and transacts
- Schedule evaluation → Prisma database client: queries and writes
- Parts inventory logic → Prisma database client: queries and writes
- Technician directory → Prisma database client: queries
- Equipment lifecycle → Prisma database client: accesses data
- Prisma database client → PostgreSQL store: reads and writes
- Daily schedule worker → Schedule evaluation: evaluates due rules
- Schedule evaluation → Work-order workflow: creates due orders
- Work-order workflow → Parts inventory logic: deducts stock