Backend service for managing inventory, sales, customers, recommenders, commissions, workers, repairs and analytics for Piano House of Sri Lanka (PHOSL).
PHOSL Backend is a secure Spring Boot REST API built to power a complete piano business management system.
It supports:
- 🔐 Role-based authentication (JWT)
- 🎹 Piano inventory management
- 👤 Customer management
- 🧾 Sales & purchase tracking
- 🤝 Recommender & commission system
- 🧑🔧 Worker management
- 🛠️ Repairs
- 📍 Locations
- 💳 Installments
- 📊 Analytics dashboard APIs
- 📖 Swagger API documentation
- Java 11
- Spring Boot 2.7.18
- Spring Security
- JWT Authentication
- Spring Data JPA
- MySQL
- SpringDoc OpenAPI (Swagger UI)
- Maven
The Spring Boot project is located inside:
PHOSL DB/backend
Database scripts are located in:
PHOSL DB/create.SQL
PHOSL DB/insert.sql
git clone https://github.com/Aeshan-Rosa/PHOSL-backend.git
cd PHOSL-backend/"PHOSL DB"/backendOpen MySQL Workbench and run:
create.SQLinsert.sql
This will create:
piano_management
Open:
src/main/resources/application.yml
Update:
spring:
datasource:
url: jdbc:mysql://localhost:3306/piano_management
username: root
password: rootChange credentials if needed.
Using Maven Wrapper:
./mvnw spring-boot:runOr using Maven:
mvn spring-boot:runApplication runs at:
http://localhost:8080
After running the server, open:
http://localhost:8080/swagger-ui/index.html
Here you can:
- Test all APIs
- Authorize with JWT
- View request/response models
- JWT-based authentication
- Role-based access control
- Protected endpoints
- Configurable secret key
For production:
- Use environment variables
- Use HTTPS
- Secure database credentials
- Unit & Integration Testing
- Docker Setup
- CI/CD Pipeline
- Production deployment guide
- Frontend integration documentation
Aeshan Rosa
Computer Science Undergraduate
University of Westminster (IIT Colombo)
🎹 Built for Piano House of Sri Lanka
Made with Spring Boot & ☕