A modern ride-sharing platform connecting riders with drivers
|
|
| Feature | Technology | Status |
|---|---|---|
| π Password Hashing | bcrypt | β Active |
| π« Authentication | JWT Tokens | β Active |
| π API Security | CORS + Validation | β Active |
| π Database | MongoDB + Mongoose | β Active |
Saarthi/
βββ Backend/ # Node.js/Express API server
β βββ controllers/ # Route controllers
β βββ models/ # MongoDB data models
β βββ routes/ # API routes
β βββ services/ # Business logic
β βββ middlewares/ # Custom middleware
β βββ db/ # Database configuration
βββ Frontend/ # React application
β βββ src/ # Source code
β βββ public/ # Static assets
β βββ package.json # Frontend dependencies
βββ README.md # Project documentation
Before running this project, make sure you have:
- Node.js (v16 or higher)
- npm or yarn
- MongoDB (local installation or MongoDB Atlas)
- Git
# Clone the project
git clone https://github.com/your-username/Saarthi.git
cd Saarthiπ§ Step 2: Backend Setup
# Navigate to backend directory
cd Backend
# Install dependencies
npm installCreate .env file in Backend directory:
# Server Configuration
PORT=3000
# Database Configuration
MONGODB_URI=mongodb://localhost:27017/saarthi
# Security
JWT_SECRET=your_super_secret_jwt_key_hereStart the backend server:
npm startβ
Backend running on: http://localhost:3000
π¨ Step 3: Frontend Setup
# Navigate to frontend directory
cd ../Frontend
# Install dependencies
npm installCreate .env file in Frontend directory:
# API Configuration
VITE_API_URL=http://localhost:3000Start the development server:
npm run devβ
Frontend running on: http://localhost:5173
| Service | URL | Status |
|---|---|---|
| π Frontend | http://localhost:5173 |
π’ Ready |
| π Backend API | http://localhost:3000 |
π’ Ready |
π You're all set! Start building amazing rides!
npm start- Start the production servernpm run dev- Start development server with nodemonnpm test- Run tests
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
POST /users/register- Register a new userPOST /users/login- User loginPOST /captains/register- Register a new captain (driver)POST /captains/login- Captain login
GET /users/profile- Get user profilePUT /users/profile- Update user profilePOST /users/logout- User logout
GET /captains/profile- Get captain profilePUT /captains/profile- Update captain profilePOST /captains/logout- Captain logout
- Personal information (firstName, lastName)
- Email and password
- Authentication methods
- Personal information (firstName, lastName)
- Email and password
- Vehicle information
- Location data
- Status (available/busy)
- Password Hashing - Using bcrypt for secure password storage
- JWT Authentication - Stateless authentication with JSON Web Tokens
- Input Validation - Server-side validation using express-validator
- CORS Protection - Configured for secure cross-origin requests
- Responsive Design - Mobile-first approach with Tailwind CSS
- Smooth Animations - GSAP-powered transitions and effects
- Modern Interface - Clean and intuitive user experience
- Bootstrap Icons - Comprehensive icon library
- Set up environment variables on your hosting platform
- Configure MongoDB connection string
- Deploy to platforms like Heroku, Railway, or DigitalOcean
- Build the project:
npm run build - Deploy the
distfolder to platforms like Netlify, Vercel, or GitHub Pages
# Fork the repo
git fork |
# Create feature branch
git checkout -b feature/amazing-feature |
# Commit changes
git commit -m 'Add amazing feature' |
- Push your branch:
git push origin feature/amazing-feature - Open a Pull Request with a clear description
- Wait for review and feedback
- Celebrate your contribution! π
π‘ Ideas for contributions:
- π Bug fixes
- β¨ New features
- π Documentation improvements
- π¨ UI/UX enhancements
- π§ͺ Test coverage
This project is licensed under the ISC License.
