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%