A modern, full-stack operational portal for managing technical dispatches, scheduling customer requests, tracking technician GPS routes in real-time, and automating invoices.
- Authentication: JWT token validation with secure cryptographic refresh rotations and Google OAuth support.
- Client Booking: Interface for customers to book service dispatches, pick slots, and set priority.
- Real-Time GPS Tracking: Streams technician coordinates dynamically over SignalR.
- Unified Portals: Role-based dashboards tailored for Customers, Technicians, and Administrators.
- Automated Billing: Generates service reports, prints itemized invoices, and integrates PayHere sandboxed checkouts.
- CI/CD Integration: Pre-configured GitHub Actions workflow checking code quality, formatting, linting, and compile states.
| Layer | Technology | Version |
|---|---|---|
| Backend API | ASP.NET Core Web API (Clean Architecture) | .NET 7.0 |
| Database | PostgreSQL | v15 |
| WebSockets | SignalR | v7 |
| Frontend UI | Next.js (App Router, Tailwind CSS, Zustand) | v14.2 |
| Analytics | Recharts Area Graphs | v2.12 |
| Containers | Docker & Docker Compose | v3.8 |
WorkforceManage_Platform/
├── backend/ # ASP.NET Core Solution
│ ├── src/
│ │ ├── WorkforceManage.API/ # API Entrypoint, SignalR Hubs & Controllers
│ │ ├── WorkforceManage.Application/ # Business MediatR Commands, Queries & DTOs
│ │ ├── WorkforceManage.Domain/ # Shared Domain Entities & Enums
│ │ └── WorkforceManage.Infrastructure/ # DbContext, S3, Email, and JWT services
│ └── WorkforceManage.sln
│
├── frontend/ # Next.js React Portal
│ ├── src/
│ │ ├── app/ # App Router Pages & Shell Layouts
│ │ ├── components/ # Role Specific Portal Dashboards
│ │ ├── hooks/ # Custom React Hook for SignalR
│ │ └── store/ # Zustand global session states
│
├── infra/ # Deployment Configurations
│ └── docker/ # Multi-stage optimized Dockerfiles
└── docker-compose.yml # Orchestrator
Before installing the project, ensure you have the following installed:
- .NET SDK 7.0 or later
- Node.js v20.x or later (includes
npm) - Docker Desktop (optional, for container runs)
- PostgreSQL instance (optional, if running backend manually)
This launches all layers (API, PostgreSQL, and Next.js) in the background with a single command:
- Clone the repository and navigate to the project directory.
- Build and spin up the containers:
docker-compose up --build -d
- Access the services:
- Frontend Portal: http://localhost:3000
- Backend Web API: http://localhost:5000
- Swagger Docs: http://localhost:5000/swagger
If you prefer running services outside containers for faster hot-reloading:
- Copy .env.example to
.envin the root folder and fill in your keys.
- Spin up a local PostgreSQL instance.
- Edit appsettings.json connection strings to match your PostgreSQL instance parameters.
- Open a terminal and run the backend:
cd backend dotnet restore dotnet run --project src/WorkforceManage.API
- Open a new terminal.
- Install Node dependencies and start the local development dev-server:
cd frontend npm install npm run dev - Open http://localhost:3000 in your browser.
Our app uses SignalR to stream real-time updates:
- Job Status Broadcast:
/hubs/job- Group naming:
user_{userId}(personal notifications),role_{roleName}(dispatch alerts),job_{jobId}(active request tracker).
- Group naming:
- GPS Route Tracking:
/hubs/tracking- Technician pushes location:
SendLocationUpdate(jobId, lat, lng) - Clients listen to:
ReceiveLocationUpdate
- Technician pushes location:
Invoices generate sandboxed PayHere checkouts pointing to https://sandbox.payhere.lk/pay/checkout.
During local runs, clicking "Pay with PayHere" generates mock payment orders using test credentials (Merchant ID: 1224400) and redirects safely to the payment return URLs.