Ucab is a simple and user-friendly cab booking application that allows users to quickly book rides, track them in real time, and manage their bookings efficiently. The application is built using the MERN Stack (MongoDB, Express.js, React.js, Node.js) and includes both User and Admin dashboards for managing rides, users, and vehicles.
With Ucab, users can choose pickup and drop locations, view available cabs, estimate fares, and confirm bookings. Admins can manage users, vehicles, and bookings through a dedicated admin panel.
Example: When Sarah needed to reach the airport urgently, she used Ucab to book a nearby cab and arrived on time.
- User registration and login
- Browse available cabs
- Book a cab with pickup and drop locations
- View estimated fare and arrival time
- Track cab in real-time
- View booking history
- Automatic payment using saved methods
- Discount offers
- Option to purchase refreshments during rides
- Donation option
- Admin authentication
- Manage users
- Manage cab listings
- View and manage bookings
- Add new vehicles
- Upload car images and documents
- React.js
- Axios
- HTML / CSS
- Node.js
- Express.js
- MongoDB
- Mongoose
- JWT Authentication
- Multer (File Uploads)
- CORS
- REST API Architecture
Ucab/
│
├── client/ # React Frontend
│
└── server/ # Node.js Backend
│
├── controllers/ # Business logic for routes
│ ├── adminController.js
│ ├── bookingController.js
│ ├── carController.js
│ └── userController.js
│
├── db/
│ └── config.js # MongoDB connection
│
├── middlewares/
│ ├── authMiddleware.js
│ └── multer.js
│
├── models/
│ ├── AdminSchema.js
│ ├── UserSchema.js
│ ├── CarSchema.js
│ └── MyBookingSchema.js
│
├── routes/
│ ├── adminRoutes.js
│ ├── userRoutes.js
│ ├── carRoutes.js
│ └── bookingRoutes.js
│
├── uploads/ # Stores uploaded files
│
└── server.js # Entry point of backend
Controllers handle the main logic for API requests.
- adminController.js – Admin operations such as managing users and cars
- bookingController.js – Booking functionality like booking rides and retrieving bookings
- carController.js – CRUD operations for car details
- userController.js – User registration, login, and profile management
db/config.js handles the connection to MongoDB using Mongoose.
Example:
mongoose.connect(process.env.MONGO_URI)- Verifies JWT tokens
- Protects private routes
- Handles file uploads
- Used for uploading car images and documents
Stores admin information.
Fields may include:
- name
- password
Stores user account information.
Stores cab information such as:
- car name
- model
- seats
- plate number
- image
Stores booking details including:
- user ID
- car ID
- pickup location
- drop location
- booking date
/api/admin
- Admin login
- Manage users
- Manage vehicles
/api/users
- Register
- Login
- Profile
/api/cars
- Fetch all cars
- Add new car
- Edit car
/api/bookings
- Book cab
- Fetch user bookings
Landing page with introduction and navigation.
Handles authentication and communicates with backend using Axios.
User dashboard showing welcome information and quick links.
Displays available cabs retrieved from backend.
Allows users to book a cab.
Route example:
/bookcab/:id
Displays all bookings made by the logged-in user.
Navigation bar for user dashboard.
Admin authentication pages.
Admin dashboard.
Navigation bar for admin pages.
Displays all registered users with edit or delete options.
Allows editing user details.
Displays all bookings made by users.
Displays all available cabs in the system.
Allows editing cab information.
Form for adding new cab details.
git clone https://github.com/yourusername/ucab.git
cd ucabcd server
npm installcd client
npm installcd server
npm startServer runs on:
http://localhost:8000
cd client
npm startFrontend runs on:
http://localhost:3000
- GPS-based real-time cab tracking
- Integrated payment gateway
- Driver mobile application
- Rating and review system
- Ride sharing feature
This project is developed for educational purposes and learning MERN stack development.
Developed as a MERN Stack Project – Ucab Cab Booking Application.