A full-stack ride-sharing platform connecting drivers and passengers for convenient carpooling. Built with Spring Boot and React.
- For Drivers: Publish rides, manage bookings, track earnings
- For Passengers: Search rides, book seats, track bookings
- Security: JWT authentication with role-based access (Driver/Passenger)
- Real-time Updates: Dynamic dashboard with booking notifications
Backend: Spring Boot 3.5.3 • Java 17 • MySQL • Spring Security • JWT
Frontend: React 19 • Vite • Tailwind CSS • Axios • React Router
- Java 17+, Node.js 16+, MySQL 8.0+, Maven 3.6+
CREATE DATABASE share2go_app;cd share2go-backend
# Edit src/main/resources/application.properties with your MySQL credentials
./mvnw spring-boot:runBackend runs on http://localhost:8080
cd share2go-frontend
# Create .env file: VITE_API_BASE_URL=http://localhost:8080/api
npm install
npm run devFrontend runs on http://localhost:5173
POST /api/auth/register- Register userPOST /api/auth/login- Login user
POST /api/rides- Publish ride (Driver)GET /api/rides/search?source=X&destination=Y&date=Z- Search ridesGET /api/rides/driver/{driverId}- Get driver's rides
POST /api/bookings- Create booking (Passenger)PUT /api/bookings/{id}/accept- Accept booking (Driver)PUT /api/bookings/{id}/reject- Reject booking (Driver)
share2go-rideBooking/
├── share2go-backend/ # Spring Boot REST API
│ ├── src/main/java/com/share2go/
│ │ ├── auth/ # JWT authentication
│ │ ├── controller/ # REST controllers
│ │ ├── entity/ # JPA entities
│ │ ├── repository/ # Data access
│ │ └── service/ # Business logic
│ └── src/main/resources/
│ └── application.properties
│
└── share2go-frontend/ # React SPA
├── src/
│ ├── components/ # Reusable components
│ ├── pages/ # Route pages
│ ├── context/ # Auth context
│ └── router/ # Route config
└── package.json
spring.datasource.url=jdbc:mysql://localhost:3306/share2go_app
spring.datasource.username=root
spring.datasource.password=your_password
jwt.secret=your_secret_key_minimum_256_bitsVITE_API_BASE_URL=http://localhost:8080/api
⚠️ Security: Change default JWT secret before production deployment!
Laxman Kale
GitHub: @Laxmankale • Repository
Made with ❤️ for the ride-sharing community





