This Spring Boot 3.4.5 API project was developed as a learning initiative and progressively hardens into a practical backend reference system.
It models a real‑world transport company, enabling admin users to:
Manage employees, departments, vehicles, travel lines, and trips
Process seat booking and reservation logic
Expose all operations via RESTful endpoints documented through Swagger (OpenAPI)
(Swagger UI is searchable at /swagger-ui.html) GitHub: https://github.com/Marwan...
company-management-system
Tech Stack & Architecture
ComponentDetails
LanguageJava 21
FrameworkSpring Boot 3.4.5, Spring Data JPA
SecurityOAuth2 / Spring Security
DatabaseMySQL (run in Docker container)
Build ToolMaven / mvnw wrapper
API DocsSwagger UI (Swagger‑annotation driven)
PackagingDocker Compose, runnable JAR
Technical foundation is aligned with modern Java backend best practices: layered architecture with Controllers → Services → Repositories, and automatic schema creation when the app starts
Key Features
CRUD endpoints for all core entities: employees, vehicles, departments, travel lines, trips
Seat booking flow — create, check availability, and reserve seats within a trip lifecycle
API documentation & testing via Swagger UI and Postman-exportable OpenAPI spec
Production-ready build options:
Downloadable executable JAR
mvn spring‑boot:run for dev usage
Containerized MySQL server preconfigured by docker-compose.yml
Best Practices Implemented
Layered, decoupled architecture (Controllers → Services → Repositories)
DTO (data transfer object) use with request/response models
Validation using @Valid and Hibernate Validator annotations
Global exception handling with @ControllerAdvice and consistent HTTP responses
Secure endpoints using Spring Security + OAuth2 for resource protection
Automated schema migrations handled via JPA’s spring.jpa.hibernate.ddl-auto=update
Configuration management powered through application‑*.properties for dev vs prod
Unit & integration testing using ./mvnw test as part of CI pipeline
Semantic versioning with Git tags, v2.0‑alpha released in June 2025
What You’ll See in the Code
Entities mapping relationships: @OneToMany, @ManyToOne (e.g. Trip → Vehicle, Trip → TravelLine)
Service layer enforcing business logic: seat availability checks, trip scheduling, and department associations
Repository interfaces with Spring Data JPA abstractions (JpaRepository)
Swagger annotations for rich OpenAPI schema generation at compile time
Docker Compose orchestration: the MySQL container boots up automatically with firmware and sample schema on first run