A comprehensive SaaS backend solution for small and medium-sized businesses that offer workshops, courses, and training services. Built with Spring Boot 3.3 and PostgreSQL, this platform enables business owners to manage instructors, customers, courses, enrollments, and financial operations from a single, secure API.
The Workshop Management Platform provides a multi-tenant architecture where each business account has complete data isolation. Business owners can:
- Manage Instructors - Add, update, and track instructors with their specializations
- Manage Customers - Maintain a customer database with contact information (CRM)
- Manage Courses - Create workshops with pricing, capacity, scheduling, and instructor assignments
- Handle Enrollments - Register customers to courses and track payment status
- Track Finances - Automatic income recording from paid enrollments, manual income/expense entries, and financial summaries
src/main/java/com/bartugcelebi/workshopmanagment/
βββ config/ # Security, CORS, OpenAPI configurations
βββ controller/ # REST API endpoints
βββ dto/ # Data Transfer Objects (Request/Response)
βββ exception/ # Global exception handling
βββ jwt/ # JWT authentication filters
βββ mapper/ # MapStruct entity-DTO mappers
βββ model/
β βββ abstracts/ # Base entity classes
β βββ entities/ # JPA entities
β βββ enums/ # Enumeration types
βββ repository/ # Spring Data JPA repositories
βββ service/
βββ base/ # Base service interfaces
βββ impl/ # Service implementations
βββ security/ # Security-related services
| Category | Technology |
|---|---|
| Framework | Spring Boot 3.3.0 |
| Language | Java 17 |
| Database | PostgreSQL 15 |
| Security | Spring Security + JWT (jjwt 0.11.5) |
| ORM | Spring Data JPA / Hibernate |
| Validation | Jakarta Bean Validation |
| Mapping | MapStruct 1.6.3 |
| Documentation | SpringDoc OpenAPI (Swagger UI) |
| Build Tool | Maven |
| Containerization | Docker Compose |
| Code Generation | Lombok |
- Java 17 or higher
- Maven 3.8+
- Docker & Docker Compose (for PostgreSQL)
- Git
git clone https://github.com/your-username/workshop-managment.git
cd workshop-managmentCreate a .env file in the project root:
# Database Configuration
DB_NAME=workshop_db
DB_USER=postgres
DB_PASSWORD=your_secure_password
# JWT Configuration
JWT_SECRET_KEY=your_base64_encoded_secret_key_at_least_256_bits
β οΈ Security Note: Generate a strong secret key for production. The JWT secret should be at least 256 bits (32 characters) and Base64 encoded.
docker-compose up -dThis will start a PostgreSQL 15 container with the configured credentials.
# Build the project
./mvnw clean install
# Run the application
./mvnw spring-boot:runThe application will start on http://localhost:8080.
Open your browser and navigate to:
- Swagger UI: http://localhost:8080/docs
- OpenAPI JSON: http://localhost:8080/v3/api-docs
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/v1/auth/register |
Register a new business account |
POST |
/api/v1/auth/login |
Login and receive JWT tokens |
POST |
/api/v1/auth/refresh |
Refresh access token |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/v1/instructors |
Get all instructors |
GET |
/api/v1/instructors/paged |
Get instructors with pagination |
GET |
/api/v1/instructors/{id} |
Get instructor by ID |
POST |
/api/v1/instructors |
Create a new instructor |
PUT |
/api/v1/instructors/{id} |
Update an instructor |
DELETE |
/api/v1/instructors/{id} |
Delete an instructor |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/v1/customers |
Get all customers |
GET |
/api/v1/customers/paged |
Get customers with pagination |
GET |
/api/v1/customers/{id} |
Get customer by ID |
POST |
/api/v1/customers |
Create a new customer |
PUT |
/api/v1/customers/{id} |
Update a customer |
DELETE |
/api/v1/customers/{id} |
Delete a customer |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/v1/courses |
Get all courses |
GET |
/api/v1/courses/paged |
Get courses with pagination |
GET |
/api/v1/courses/{id} |
Get course by ID |
POST |
/api/v1/courses |
Create a new course |
PUT |
/api/v1/courses/{id} |
Update a course |
DELETE |
/api/v1/courses/{id} |
Delete a course |
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/v1/enrollments |
Enroll a customer in a course |
PATCH |
/api/v1/enrollments/{id}/payment |
Update payment status |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/v1/transactions |
Get all transactions |
POST |
/api/v1/transactions/manual |
Create a manual transaction |
GET |
/api/v1/transactions/summary |
Get financial summary for date range |
The API uses JWT (JSON Web Tokens) for authentication. After registering or logging in, you'll receive:
- Access Token: Short-lived token for API requests
- Refresh Token: Long-lived token to obtain new access tokens
Include the access token in the Authorization header:
Authorization: Bearer <your_access_token>curl -X POST http://localhost:8080/api/v1/auth/register \
-H "Content-Type: application/json" \
-d '{
"businessName": "Yoga Studio",
"email": "contact@yogastudio.com",
"password": "SecurePass123!",
"phoneNumber": "+1234567890",
"address": "123 Wellness Street"
}'βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Business βββββββββ Instructor β β Customer β
β β β β β β
β - id β β - id β β - id β
β - name β β - name β β - name β
β - email β β - specialty β β - email β
β - password β β - businessIdβ β - phone β
β - phone β βββββββββββββββ β - businessIdβ
β - address β β βββββββββββββββ
βββββββββββββββ β β
β βΌ β
β βββββββββββββββ β
β β Course β β
β β β β
ββββββββββββββββ - id β β
β - title β β
β - price β β
β - capacity β β
β - dates β β
β - businessIdβ β
β - instructorβ β
βββββββββββββββ β
β β
βΌ βΌ
βββββββββββββββββββββββββββββββ
β Enrollment β
β β
β - id β
β - customerId β
β - courseId β
β - isPaid β
βββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββ
β FinancialTransaction β
β β
β - id β
β - amount β
β - type (INCOME/EXPENSE) β
β - description β
β - transactionDate β
β - businessId β
β - enrollmentId (optional) β
βββββββββββββββββββββββββββββββ
- JWT-based Authentication: Stateless authentication with access and refresh tokens
- Password Encryption: BCrypt password hashing
- Data Isolation: Multi-tenant architecture ensures each business can only access their own data
- CORS Configuration: Configurable cross-origin resource sharing
- Input Validation: Request validation using Jakarta Bean Validation
The platform automatically tracks finances:
- Automatic Income: When an enrollment is marked as "paid", the course fee is automatically recorded as income
- Manual Transactions: Record additional income (e.g., merchandise sales) or expenses (e.g., rent, utilities, supplies)
- Financial Summary: Get total income, total expenses, and net profit for any date range
# Run all tests
./mvnw test
# Run with coverage report
./mvnw test jacoco:reportworkshop-managment/
βββ src/
β βββ main/
β β βββ java/com/bartugcelebi/workshopmanagment/
β β βββ resources/
β β βββ application.properties
β β βββ static/
β β βββ templates/
β βββ test/
βββ .env # Environment variables (create this)
βββ docker-compose.yml # PostgreSQL container setup
βββ pom.xml # Maven dependencies
βββ mvnw # Maven wrapper (Unix)
βββ mvnw.cmd # Maven wrapper (Windows)
βββ PRD.md # Product Requirements Document
βββ TODO.md # Development roadmap
- Unit tests for service layer (JUnit & Mockito)
- Integration tests for controllers (MockMvc)
- Email notifications for enrollments
- Public course listing page
- Calendar-based scheduling interface
- Payment gateway integration
BartuΔ Kaan Γelebi
- GitHub: @BartugKaan
Made with β€οΈ using Spring Boot