Spring Boot backend for a production-style utility billing workflow. The project uses Maven, Java 17, PostgreSQL, Spring Security with JWT, DTO-based APIs, Swagger/OpenAPI, seeded users, and layered services.
- Java 17
- Spring Boot 3.3.x
- Maven
- PostgreSQL
- Spring Data JPA
- Spring Security + JWT
- Swagger UI via springdoc-openapi
- Create the PostgreSQL database:
CREATE DATABASE utility_billing_db;-
Configure credentials in
src/main/resources/application.properties. -
Start the API:
./mvnw spring-boot:runOn Windows:
.\mvnw.cmd spring-boot:runSwagger UI:
http://localhost:8080/swagger-ui/index.html
| Role | Password | |
|---|---|---|
| Admin | admin@utility.rw | Admin123! |
| Operator | operator@utility.rw | Operator123! |
| Finance | finance@utility.rw | Finance123! |
| Customer | customer@utility.rw | Customer123! |
- Public customer registers through
/api/v1/auth/register; role is alwaysROLE_CUSTOMER. - Operator records a valid meter reading.
- The system automatically generates a
PENDING_APPROVALbill. - Admin or Finance approves the bill.
- Admin or Finance records payments.
- Customer views only their linked profile, meters, approved/paid/overdue bills, payments, and notifications.
.\mvnw.cmd testThe project also includes PostgreSQL routine SQL in src/main/resources/db/routines.sql.