Follow these steps to clone this project and run it on your own machine:
git https://github.com/kameshp1815/Auto-Share-Pooling.git
cd AutoSharePollingcd server
npm install- Create a
.envfile in theserver/directory with the following content:MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret- Replace
your_mongodb_connection_stringwith your MongoDB URI (e.g., from MongoDB Atlas). - Replace
your_jwt_secretwith any random string (used for JWT signing).
- Replace
- Start the backend server:
npm start / node index.js
Open a new terminal window/tab, then:
cd client
npm install- Create a
.envfile in theclient/directory with the following content:VITE_LOCATIONIQ_API_KEY=your_locationiq_api_key- Replace
your_locationiq_api_keywith your LocationIQ API key (get one for free at https://locationiq.com/).
- Replace
- Start the frontend:
npm run dev
- Visit http://localhost:5173 in your browser.
A modern MERN stack ride-booking application inspired by Rapido, supporting both user and driver flows. Users can book rides, view history, and drivers can accept and complete rides. Built with React (Vite + Tailwind), Node.js/Express, and MongoDB.
- Register and login with JWT authentication
- Book rides with vehicle selection (Bike, Auto, Cab)
- Location autocomplete (LocationIQ, Tamil Nadu-wide)
- Real driving distance & fare calculation
- View booking history and ride details
- Profile management (view email, change password, logout)
- Modern, mobile-friendly UI
- Driver login
- View available rides and accept them
- View and complete assigned rides
- Auto-refresh dashboard
- Custom 404 page
- Secure API key handling via environment variables
- CORS and Vite proxy setup for smooth API calls
- Frontend: React, Vite, Tailwind CSS, React Icons
- Backend: Node.js, Express.js
- Database: MongoDB (Mongoose)
- APIs: LocationIQ (Autocomplete & Directions)
MONGODB_URI— Your MongoDB connection stringJWT_SECRET— Secret for JWT token signing
VITE_LOCATIONIQ_API_KEY— Your LocationIQ API key
AutoSharePolling/
client/ # React frontend (Vite + Tailwind)
server/ # Express backend (Node.js + MongoDB)
POST /api/auth/register— Register user/driverPOST /api/auth/login— Login user/driverPOST /api/rides/book— Book a rideGET /api/rides/history/:email— User booking historyGET /api/rides/available— Available rides for driversPOST /api/rides/accept/:rideId— Driver accepts rideGET /api/rides/driver/:email— Driver's ridesPOST /api/rides/complete/:rideId— Mark ride as completed
- Fork the repo and create your branch:
git checkout -b feature/your-feature - Commit your changes:
git commit -m 'Add some feature' - Push to the branch:
git push origin feature/your-feature - Open a Pull Request
This project is for educational/demo purposes. Please check with the author before using in production.
- LocationIQ for geocoding and directions APIs
- React Icons
- Tailwind CSS