Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🚴 BikeRide - Ride Booking System

A backend ride booking system built using Java, Spring Boot, Spring Security, JWT, Spring Data JPA, MySQL, Docker, and Apache Kafka.

BikeRide was developed as a personal project to gain hands-on experience with enterprise Java backend development. The project covers everything from Core Java concepts to modern backend technologies, following RESTful API design principles and industry best practices.


🌐 Project Links

GitHub Repository

https://github.com/Luffy992/BikeRide


✨ Features

πŸ‘€ User Management

  • User Registration
  • User Login
  • JWT Authentication
  • Secure Password Encryption (BCrypt)
  • Role-Based Authorization
  • Profile Management

🏍 Ride Booking

  • Book a Ride
  • Cancel Ride
  • View Ride History
  • Ride Status Management
  • Bike Availability Check

🚲 Bike Management

  • Add Bike
  • Update Bike
  • Delete Bike
  • View Available Bikes
  • Bike Availability Management

πŸ‘¨β€πŸ’Ό Admin Features

  • Manage Users
  • Manage Bikes
  • Manage Bookings
  • Monitor Ride Information

πŸ” Security

  • Spring Security
  • JWT Authentication
  • Role-Based Access Control
  • Password Encryption
  • Protected REST APIs

⚑ Backend Features

  • RESTful API Design
  • DTO Pattern
  • Validation
  • Global Exception Handling
  • Layered Architecture
  • Clean Code Practices

🐳 DevOps

  • Docker Support
  • Docker Compose
  • Kafka Integration
  • Maven Build System

πŸ— System Architecture

                Client
                   β”‚
                   β–Ό
            REST API Requests
                   β”‚
                   β–Ό
          Spring Security Filter
                   β”‚
                   β–Ό
              Controllers
                   β”‚
                   β–Ό
               Services
                   β”‚
                   β–Ό
            Spring Data JPA
                   β”‚
                   β–Ό
                MySQL Database

          Kafka (Event Messaging)

πŸ“‚ Project Structure

BikeRide
β”‚
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ main
β”‚   β”‚   β”œβ”€β”€ java
β”‚   β”‚   β”‚   β”œβ”€β”€ config
β”‚   β”‚   β”‚   β”œβ”€β”€ controller
β”‚   β”‚   β”‚   β”œβ”€β”€ dto
β”‚   β”‚   β”‚   β”œβ”€β”€ entity
β”‚   β”‚   β”‚   β”œβ”€β”€ exception
β”‚   β”‚   β”‚   β”œβ”€β”€ repository
β”‚   β”‚   β”‚   β”œβ”€β”€ security
β”‚   β”‚   β”‚   β”œβ”€β”€ service
β”‚   β”‚   β”‚   └── util
β”‚   β”‚   β”‚
β”‚   β”‚   └── resources
β”‚   β”‚       β”œβ”€β”€ application.properties
β”‚   β”‚       └── application.yml
β”‚   β”‚
β”‚   └── test
β”‚
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ docker-compose-kafka.yml
β”œβ”€β”€ pom.xml
└── README.md

πŸ›  Technology Stack

Backend

  • Java 21
  • Spring Boot
  • Spring MVC
  • Spring Security
  • Spring Data JPA
  • Hibernate

Database

  • MySQL

Authentication

  • JWT
  • BCrypt Password Encoder

Messaging

  • Apache Kafka

DevOps

  • Docker
  • Docker Compose

Build Tool

  • Maven

Version Control

  • Git
  • GitHub

πŸ” Authentication

BikeRide uses JWT (JSON Web Token) for secure authentication.

Workflow:

  1. User logs in.
  2. Server validates credentials.
  3. JWT Token is generated.
  4. Client stores the token.
  5. Token is sent with every protected request.
  6. Spring Security validates the token before granting access.

πŸ“‘ REST APIs

Authentication APIs

  • Register User
  • Login User

User APIs

  • View Profile
  • Update Profile

Bike APIs

  • Add Bike
  • Update Bike
  • Delete Bike
  • Get Available Bikes

Ride APIs

  • Book Ride
  • Cancel Ride
  • Ride History
  • Ride Details

Admin APIs

  • Manage Users
  • Manage Bikes
  • Manage Bookings

πŸ—„ Database

The application uses MySQL as the primary database.

Main Entities:

  • User
  • Role
  • Bike
  • Booking

Relationships are managed using Spring Data JPA and Hibernate.


🐳 Docker Support

Docker is used to containerize the application.

Run the application using Docker:

docker-compose up --build

Run Kafka services:

docker-compose -f docker-compose-kafka.yml up

βš™ Installation

Clone Repository

git clone https://github.com/Luffy992/BikeRide.git

Navigate

cd BikeRide

Configure Database

Update:

application.properties

with your MySQL credentials.


Build

mvn clean install

Run

mvn spring-boot:run

πŸ“¦ Environment Variables

Configure:

spring.datasource.url=
spring.datasource.username=
spring.datasource.password=

jwt.secret=

spring.kafka.bootstrap-servers=

πŸ“ˆ Future Improvements

Planned enhancements:

  • Payment Gateway Integration
  • Email Notifications
  • SMS Notifications
  • Live Ride Tracking
  • Redis Caching
  • API Gateway
  • Microservices Architecture
  • Kubernetes Deployment
  • CI/CD Pipeline
  • Monitoring with Prometheus & Grafana

πŸ“š Learning Outcomes

This project helped strengthen practical knowledge of:

  • Core Java
  • Object-Oriented Programming
  • Spring Boot
  • Spring MVC
  • Spring Security
  • JWT Authentication
  • Spring Data JPA
  • Hibernate
  • REST API Design
  • Validation
  • Exception Handling
  • MySQL
  • Docker
  • Kafka
  • Git & GitHub

πŸš€ Future Scope

The project can be extended into a production-ready ride booking platform by adding:

  • Payment Gateway
  • Driver Management
  • Real-Time Tracking
  • Notifications
  • Ratings & Reviews
  • Ride Scheduling
  • Surge Pricing
  • Analytics Dashboard
  • Mobile Application
  • Cloud Deployment

πŸ‘¨β€πŸ’» Author

M Luffy

GitHub: https://github.com/Luffy992

LinkedIn: www.linkedin.com/in/somesh-ramola


πŸ“„ License

This project is developed for learning purposes and personal portfolio.

Feel free to fork, explore, and enhance it.


⭐ If you found this project useful, consider giving it a star!

About

Bike Ride Booking System built with Spring Boot, Spring Security, JWT, Docker, Kafka, MySQL, and REST APIs.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages