Car-Sharing-Service
Project Information
The Car Sharing Service is a modern solution aimed at transforming the outdated car rental system in our city. With a vision to enhance user experience, streamline operations, and improve payment processes, this project aims to digitize and automate various aspects of the car sharing service.
🚘 Car Sharing App 🚘
Introduction
Welcome to Car Sharing Service App! 👋
Our Car Sharing Service App is a convenient and secure app which will definitely be the best solution for you and your renting car services. Both customers and managers will get pleasant experience while using it.
Why?
- Security: all private and sensitive information that customers provide us with will be stored securely.
- Functionality: customers will be able to conveniently look through the info on the cars, make rentals and pay for them
- Notifications: we use Telegram API to send notifications about created rentals, paid rentals, overdue rentals etc. In future this notifications may be adjusted to your requirements (e.g. they may be sent to only managers, only to users or to both)
- Payment system:
Technologies 🔨
- Programming Language: Java - Main programming language for the backend logic.
- Build System: Maven - Dependency management and build automation.
- Programming Language: Java 17
- Spring Framework: Spring boot, Spring JPA, Spring Security
- Database Management: MySQL, Hibernate, Liquibase
- Build System: Maven
-
Containerization and Deployment:
- Docker - Containerization for easy deployment and scalability.
- Amazon Web Services (AWS) - Cloud platform for hosting and managing services.
-
Continuous Integration:
- Telegram API - Integration for real-time notifications.
- Stripe API - Payment processing integration.
- Telegram API - Real-time notifications
- Stripe API - Payment processing
- Documentation: Swagger
- Other tools: MapStruct, Lombok
Use cases are following
- Customer can create account (register)
- Customer can sign in
- Customer can display list of all available cars
- Customer can make a reservation for a specific car (if it is not already reserved by other customer)
- To run the project, open IntelliJ IDEA and press "Ctrl+Shift+F10" or use the "Run" option from the menu.
Basic endpoints for testing API
-
User Registration
- HTTP Method: POST
- Endpoint: http://localhost:8080/api/auth/registration
- Description: This endpoint allows users to register a new account.
- Request Body:
{ "email": "user@example.com", "password": "securepassword", "firstName": "John", "lastName": "Doe" }
- Response:
{ "id": 1, "email": "user@example.com" }
-
User Login
- HTTP Method: POST
- Endpoint: http://localhost:8080/api/auth/login
- Description: This endpoint allows users to log in to their accounts.
- Request Body:
{ "email": "user@example.com", "password": "securepassword" }
- Response:
{ "token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhd2VAZ21haWwuY29tIiwiaWF0IjoxNzAwNzMwMzk4LCJleHAiOjE3MDEzMzAzOTh9.YNvlGIJ301KuJEwMyuMIdMYKV9Pq13dT1OvgBvz2ed0" }
Project architecture
Database structure
Controllers and endpoints available ⬇
Authentication Controller:
HTTP method | Endpoint | Role | Function |
---|---|---|---|
POST | /auth/registration | ALL | Allows a new customer to register |
POST | /auth/login | ALL | Authenticates a customer and returns JWT token |
User Controller: Updating and getting user info
HTTP method | Endpoint | Role | Function |
---|---|---|---|
PUT | /users/{id}/role | MANAGER | Enables managers to update user's role |
GET | /users/me | CUSTOMER | Enables customers to get info about themselves |
PATCH | /users/update | CUSTOMER | Enables customers to update their firstname and lastname |
Car Controller: Managing and browsing cars
HTTP method | Endpoint | Role | Function |
---|---|---|---|
POST | /cars | MANAGER | Enables manager to add a new car to DB |
GET | /cars | ALL | Enables even unauthorized users to get all cars |
GET | /cars/{id} | ALL | Enables even unauthorized users to get info on a specific car |
PUT | /cars/{id} | MANAGER | Enables managers to update info on an existing in DB car |
DELETE | /categories/{id} | MANAGER | Enables managers to delete a car from DB |
Contacts
- Author The-Champions-JV
- Author: The Champions team