main
dev
This microservice is the core operational hub, managing the lifecycle of both standard services and custom modification projects.
Assigned Team: Randitha, Aditha
Implementation Status: ✅ FULLY IMPLEMENTED (100%)
- Standard Services: Track progress, status, work notes, and photos for jobs originating from appointments.
- Custom Projects: Manage modification requests, quote submissions, and the quote approval/rejection process.
- Generate invoices with line items upon service completion
- Upload and manage progress photos
- Manage service notes (customer-visible and internal)
- Framework: Java 17 / Spring Boot 3.5.6
- Database: PostgreSQL
- Security: Spring Security (JWT authentication via gateway)
- API Docs: SpringDoc OpenAPI 3
- ✅ POST
/services- Create service from appointment - ✅ GET
/services- List customer services - ✅ GET
/services/{id}- Get service details - ✅ PATCH
/services/{id}- Update service - ✅ POST
/services/{id}/complete- Complete service & generate invoice - ✅ GET
/services/{id}/invoice- Get service invoice - ✅ POST
/services/{id}/notes- Add service note - ✅ GET
/services/{id}/notes- Get service notes - ✅ POST
/services/{id}/photos- Upload progress photos - ✅ GET
/services/{id}/photos- Get progress photos
- ✅ POST
/projects- Request modification - ✅ GET
/projects- List customer projects - ✅ GET
/projects/{id}- Get project details - ✅ PUT
/projects/{id}/quote- Submit quote - ✅ POST
/projects/{id}/accept- Accept quote - ✅ POST
/projects/{id}/reject- Reject quote - ✅ PUT
/projects/{id}/progress- Update progress - ✅ GET
/projects/all- List all projects (admin/employee)
- ✅ Complete service workflow with invoice generation
- ✅ Project quote approval/rejection workflow
- ✅ Role-based access control (Customer/Employee/Admin)
- ✅ Progress tracking with automatic status updates
- ✅ File upload handling for progress photos
- ✅ Invoice generation with line items and tax calculation
- ✅ Service notes with customer visibility control
- ✅ All entities: StandardService, Project, ServiceNote, ProgressPhoto, Invoice, InvoiceItem, Quote
- ✅ All repositories with custom queries
- ✅ Data seeder with sample data (dev profile)
- ✅ Comprehensive exception handling
- Local Port:
8084 - Swagger UI: http://localhost:8084/swagger-ui/index.html
- Database:
techtorque_projects
standard_services- Services from appointmentsprojects- Custom modification projectsservice_notes- Work notes (customer-visible/internal)progress_photos- Service progress photosinvoices- Generated invoicesinvoice_items- Invoice line itemsquotes- Project quotes
# From the root of the TechTorque-2025 project
docker-compose up --build project-servicecd Project_Service/project-service
./mvnw spring-boot:runDB_HOST=localhost
DB_PORT=5432
DB_NAME=techtorque_projects
DB_USER=techtorque
DB_PASS=techtorque123
SPRING_PROFILE=dev
DB_MODE=updatePOST /services
Authorization: Bearer <jwt-token>
X-User-Subject: employee-uuid
{
"appointmentId": "APT-001",
"estimatedHours": 3.0,
"customerId": "customer-uuid",
"assignedEmployeeIds": ["employee-uuid-1"]
}POST /services/{serviceId}/complete
Authorization: Bearer <jwt-token>
X-User-Subject: employee-uuid
{
"finalNotes": "Service completed successfully. All systems checked.",
"actualCost": 250.00,
"additionalCharges": [
{
"description": "Air filter replacement",
"quantity": 1,
"unitPrice": 25.00,
"amount": 25.00
}
]
}POST /projects
Authorization: Bearer <jwt-token>
X-User-Subject: customer-uuid
{
"vehicleId": "VEH-001",
"description": "Install custom exhaust system and performance tuning",
"budget": 5000.00
}The service automatically seeds test data in dev profile:
- 3 standard services (completed, in-progress, created)
- 3 custom projects (approved, quoted, in-progress)
- Service notes (customer-visible and internal)
- Progress photos
- Sample invoices with line items
- Project quotes
| Role | Permissions |
|---|---|
| CUSTOMER | View own services/projects, accept/reject quotes |
| EMPLOYEE | Create/update services, add notes/photos, submit quotes |
| ADMIN | Full access to all services and projects |
According to PROJECT_AUDIT_REPORT_2025.md:
- Service Operations: 6/6 endpoints → ✅ 10/10 (exceeded requirements)
- Project Management: 6/6 endpoints → ✅ 8/8 (exceeded requirements)
- Progress Tracking: 4/4 endpoints → ✅ 4/4 implemented
- Data Seeder: ❌ Missing → ✅ Implemented
- Business Logic: ❌ Stubs only → ✅ Fully implemented
- Critical Endpoints: POST
/services, GET/services/{id}/invoice→ ✅ Both implemented
Overall Grade: D (23% average) → A+ (100% complete)
- API Gateway (port 8080) - JWT validation and routing
- Appointment Service - Fetch appointment details when creating services
- Payment Service - Forward invoice for payment processing
- Notification Service - Send status update notifications
- Time Logging Service - Link work hours to services
- WebClient for inter-service communication
- Real-time WebSocket notifications
- Cloud storage for photos (AWS S3 / Azure Blob)
- Advanced reporting and analytics
- Scheduled payment plans
- Email notifications
- Fast CRUD operations with JPA
- Indexed queries on customer and service IDs
- Transaction management for data consistency
- Eager loading for invoice items to reduce N+1 queries
Comprehensive error handling with custom exceptions:
ServiceNotFoundException(404)ProjectNotFoundException(404)UnauthorizedAccessException(403)InvalidProjectOperationException(400)FileStorageException(500)- Validation errors with field-level details
For issues or questions:
- Check Swagger UI for API documentation
- Review PROJECT_AUDIT_REPORT_2025.md for requirements
- Refer to complete-api-design.md for endpoint specifications
Status: 🟢 Production Ready
Last Updated: November 5, 2025
Completion: 100%