{"id":23767558,"url":"https://github.com/mohammedelbachiri/SpringTaxi","last_synced_at":"2026-03-26T23:30:20.307Z","repository":{"id":262235577,"uuid":"886601344","full_name":"bachiriy/SpringTaxi","owner":"bachiriy","description":"SpringTaxi is a RESTful API developed with Spring Boot to manage a taxi reservation platform. This solution aims to digitize the services of a taxi company, enabling efficient management of reservations, drivers, vehicles, and analytics.","archived":false,"fork":false,"pushed_at":"2024-12-18T13:05:49.000Z","size":382,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-01T00:45:55.492Z","etag":null,"topics":["api","java","spring"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bachiriy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-11T09:16:02.000Z","updated_at":"2024-12-18T14:31:25.000Z","dependencies_parsed_at":"2024-11-11T11:18:56.638Z","dependency_job_id":"7b7991d8-59ae-4abf-b94e-22033b296de1","html_url":"https://github.com/bachiriy/SpringTaxi","commit_stats":null,"previous_names":["bachiriy/springtaxi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachiriy%2FSpringTaxi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachiriy%2FSpringTaxi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachiriy%2FSpringTaxi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachiriy%2FSpringTaxi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bachiriy","download_url":"https://codeload.github.com/bachiriy/SpringTaxi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239946876,"owners_count":19723014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","java","spring"],"created_at":"2025-01-01T00:46:00.475Z","updated_at":"2026-03-26T23:30:20.237Z","avatar_url":"https://github.com/bachiriy.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SpringTaxi - Taxi Management REST API\n\nSpringTaxi is a RESTful API developed with **Spring Boot** to manage a taxi reservation platform. This solution aims to digitize the services of a taxi company, enabling efficient management of reservations, drivers, vehicles, and analytics.\n\n---\n\n## **Key Features**\n\n### Reservations Management\n- Create, update, delete, and view reservations.\n- Price calculation based on distance (up to 100 km) and vehicle type.\n- Check the availability of drivers and vehicles.\n- Manage reservation statuses: `CREATED`, `CONFIRMED`, `COMPLETED`, `CANCELED`.\n\n### Drivers Management\n- Manage driver profiles: create, update, delete, and view.\n- Handle driver availability (start and end times).\n- Ensure a driver has only one active reservation at a time.\n\n### Vehicles Management\n- Manage vehicle details: create, update, delete, and view.\n- Support for three vehicle types:\n    - **BERLINE**: 4-5 seats, 5 MAD/km.\n    - **VAN**: 7-9 seats, 7 MAD/km.\n    - **MINIBUS**: More than 9 seats, 9 MAD/km.\n- Ensure vehicles can have only one active reservation at a time.\n\n### Analytics and Statistics\n- Provide aggregated data for reservations, drivers, and vehicles:\n    - **Reservations**:\n        - Average price per kilometer.\n        - Average trip distance.\n        - Booking distribution by time slots.\n        - Most requested geographical areas.\n    - **Drivers**:\n        - Driver occupancy rate (percentage of time on trips).\n        - Availability analysis by time slots.\n        - Status distribution (e.g., 10 AVAILABLE, 5 ON_TRIP, 2 UNAVAILABLE).\n    - **Vehicles**:\n        - Average mileage by vehicle type.\n        - Usage rate by vehicle type.\n        - Fleet status (e.g., 15 AVAILABLE, 8 ON_TRIP, 3 UNAVAILABLE).\n\n---\n\n## **Project Structure**\nThe project follows a clean and modular architecture:\n- **Controller**: REST endpoints.\n- **Service**: Business logic.\n- **Repository**: Data access using Spring Data JPA.\n- **DAO**: Complex queries and analytics.\n- **Models**: Data entities.\n- **DTOs**: Data Transfer Objects for APIs.\n- **Mapper**: Object mapping between entities and DTOs.\n- **Utils**: Utility classes.\n- **Validation**: Data validation logic.\n- **Exception Handling**: Centralized error management.\n- **Testing**: Unit and integration tests.\n\n---\n\n## **Technologies and Tools**\n\n### Core Frameworks and Tools\n- **Spring Boot**: Application framework.\n- **Spring Data JPA**: ORM for database operations.\n- **Swagger**: API documentation.\n- **Liquibase** (optional): Database migration management.\n\n### Databases\n- **H2**: Development environment.\n- **MySQL**: QA environment.\n- **PostgreSQL**: Production environment.\n\n### Configuration\n- Configuration via `application.yaml` profiles:\n    - `application-dev.yaml` for development.\n    - `application-qa.yaml` for QA.\n    - `application-prod.yaml` for production.\n\n### Testing\n- **JUnit**: Unit tests.\n- **Mockito**: Mocking framework for testing.\n\n---\n\n## **API Endpoints**\n\n### Reservations\nBase path: `/api/reservations`\n- **CRUD Operations**:\n    - `POST /api/reservations`: Create a reservation.\n    - `GET /api/reservations/{id}`: Get a reservation by ID.\n    - `PUT /api/reservations/{id}`: Update a reservation.\n    - `DELETE /api/reservations/{id}`: Delete a reservation.\n- **Analytics**:\n    - `GET /api/reservations/analytics`: Return metrics such as average price per kilometer, trip distribution by time slots, etc.\n\n### Drivers\nBase path: `/api/drivers`\n- **CRUD Operations**:\n    - `POST /api/drivers`: Create a driver profile.\n    - `GET /api/drivers/{id}`: Get a driver by ID.\n    - `PUT /api/drivers/{id}`: Update a driver profile.\n    - `DELETE /api/drivers/{id}`: Delete a driver profile.\n- **Analytics**:\n    - `GET /api/drivers/analytics`: Return metrics such as occupancy rate, availability by time slots, etc.\n\n### Vehicles\nBase path: `/api/vehicles`\n- **CRUD Operations**:\n    - `POST /api/vehicles`: Add a new vehicle.\n    - `GET /api/vehicles/{id}`: Get vehicle details.\n    - `PUT /api/vehicles/{id}`: Update vehicle details.\n    - `DELETE /api/vehicles/{id}`: Remove a vehicle.\n- **Analytics**:\n    - `GET /api/vehicles/analytics`: Return metrics such as mileage and usage rate by type, fleet status, etc.\n\n---\n\n## **Best Practices Implemented**\n- RESTful API design with appropriate HTTP methods: `GET`, `POST`, `PUT`, `DELETE`, `PATCH`.\n- Exception handling and logging with **LOGGER**.\n- Data validation for input requests.\n- Transaction management for consistent data updates.\n- Clean code principles with reusable components.\n\n---\n\n## **Getting Started**\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/bachiriy/SpringTaxi\n   cd SpringTaxi\n   ```\n\n## **Swagger Api Docs**\n    http://localhost:8080/swagger-ui\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammedelbachiri%2FSpringTaxi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohammedelbachiri%2FSpringTaxi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammedelbachiri%2FSpringTaxi/lists"}