A full-stack ride-hailing application with separate frontend and backend components.
├── uber_frontend/ # React frontend application
└── uber_backend/ # Express.js backend API
React application built with Vite
- React 18.3
- Vite 6.0
- ESLint
- CSS Modules
- Navigate to frontend directory:
cd uber_frontend
- Install dependencies:
npm install
- Run development server:
npm run dev
- Build for production:
npm run build
Express.js REST API with MongoDB
- Node.js
- Express.js 4.21
- MongoDB with Mongoose 8.8
- JWT Authentication
- Cookie Parser
- CORS enabled
- User authentication (register/login/logout)
- Captain authentication (register/login/logout)
- Profile management
- Token blacklisting
- Input validation
- Password hashing
- POST
/users/register
- Register new user - POST
/users/login
- User login - GET
/users/profile
- Get user profile - GET
/users/logout
- User logout
- POST
/captains/register
- Register new captain - POST
/captains/login
- Captain login - GET
/captains/profile
- Get captain profile - GET
/captains/logout
- Captain logout
- Navigate to backend directory:
cd uber_backend
- Install dependencies:
npm install
- Create
.env
file with following variables:
PORT=3000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
- Run development server:
npm run dev
- Fullname (firstname, lastname)
- Password
- Socket ID
- Fullname (firstname, lastname)
- Password
- Vehicle details (type, color, plate number, capacity)
- Status (online/offline)
- Socket ID
- Token
- Created At (auto-expires after 24h)
- Password hashing with bcrypt
- JWT authentication
- Token blacklisting
- Input validation
- Protected routes
- CORS enabled
- Cookie-based authentication
cd uber_frontend
npm run dev
cd uber_backend
npm run dev
Detailed API documentation available in uber_backend/README.md
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
ISC