Skip to content

Sypher845/Saarthi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš— Saarthi

Your Journey, Our Priority

A modern ride-sharing platform connecting riders with drivers

React Node.js MongoDB Tailwind CSS


✨ Features

πŸ‘₯ User Experience

  • πŸ” Secure Authentication - JWT-based login system
  • πŸ“± Responsive Design - Works on all devices
  • 🎨 Modern UI - Beautiful Tailwind CSS interface
  • ⚑ Real-time Updates - Live ride tracking

πŸš™ Driver Management

  • πŸ‘¨β€βœˆοΈ Captain Profiles - Comprehensive driver information
  • πŸš— Vehicle Management - Car details and status
  • πŸ“ Location Tracking - Real-time positioning
  • πŸ’Ό Earnings Dashboard - Revenue tracking

πŸ›‘οΈ Security & Performance

Feature Technology Status
πŸ”’ Password Hashing bcrypt βœ… Active
🎫 Authentication JWT Tokens βœ… Active
🌐 API Security CORS + Validation βœ… Active
πŸ“Š Database MongoDB + Mongoose βœ… Active

πŸ—οΈ Project Structure

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

πŸš€ Tech Stack

πŸ–₯️ Backend

Backend Technologies
Technology Purpose Version
🟒 Node.js Runtime Environment Latest
πŸš€ Express.js Web Framework ^4.21.2
πŸƒ MongoDB Database ^8.9.3
🎫 JWT Authentication ^9.0.2
πŸ” bcrypt Password Hashing ^5.1.1

🎨 Frontend

Frontend Technologies
Technology Purpose Version
βš›οΈ React UI Library ^19.0.0
⚑ Vite Build Tool Latest
🎨 Tailwind CSS Styling ^4.1.3
🎬 GSAP Animations ^3.13.0
🌐 Axios HTTP Client ^1.8.4

πŸ“‹ Prerequisites

Before running this project, make sure you have:

  • Node.js (v16 or higher)
  • npm or yarn
  • MongoDB (local installation or MongoDB Atlas)
  • Git

⚑ Quick Start Guide

Get Saarthi running in just 4 simple steps!

πŸ”₯ Step 1: Clone the Repository

# 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 install

Create .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_here

Start the backend server:

npm start

βœ… Backend running on: http://localhost:3000

🎨 Step 3: Frontend Setup
# Navigate to frontend directory
cd ../Frontend

# Install dependencies
npm install

Create .env file in Frontend directory:

# API Configuration
VITE_API_URL=http://localhost:3000

Start the development server:

npm run dev

βœ… Frontend running on: http://localhost:5173

πŸŽ‰ Step 4: Access Your Application

Service URL Status
🌐 Frontend http://localhost:5173 🟒 Ready
πŸ”Œ Backend API http://localhost:3000 🟒 Ready

πŸš€ You're all set! Start building amazing rides!

πŸ”§ Available Scripts

Backend

  • npm start - Start the production server
  • npm run dev - Start development server with nodemon
  • npm test - Run tests

Frontend

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run preview - Preview production build
  • npm run lint - Run ESLint

πŸ“š API Endpoints

Authentication

  • POST /users/register - Register a new user
  • POST /users/login - User login
  • POST /captains/register - Register a new captain (driver)
  • POST /captains/login - Captain login

User Management

  • GET /users/profile - Get user profile
  • PUT /users/profile - Update user profile
  • POST /users/logout - User logout

Captain Management

  • GET /captains/profile - Get captain profile
  • PUT /captains/profile - Update captain profile
  • POST /captains/logout - Captain logout

πŸ—ƒοΈ Database Models

User Model

  • Personal information (firstName, lastName)
  • Email and password
  • Authentication methods

Captain Model

  • Personal information (firstName, lastName)
  • Email and password
  • Vehicle information
  • Location data
  • Status (available/busy)

πŸ›‘οΈ Security Features

  • 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

🎨 UI/UX Features

  • 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

πŸš€ Deployment

Backend Deployment

  1. Set up environment variables on your hosting platform
  2. Configure MongoDB connection string
  3. Deploy to platforms like Heroku, Railway, or DigitalOcean

Frontend Deployment

  1. Build the project: npm run build
  2. Deploy the dist folder to platforms like Netlify, Vercel, or GitHub Pages

🀝 Contributing

We love contributions! Here's how you can help make Saarthi even better.

🍴 Fork

# Fork the repo
git fork

🌿 Branch

# Create feature branch
git checkout -b feature/amazing-feature

πŸ“ Commit

# Commit changes
git commit -m 'Add amazing feature'

πŸš€ Submit Pull Request

  1. Push your branch: git push origin feature/amazing-feature
  2. Open a Pull Request with a clear description
  3. Wait for review and feedback
  4. Celebrate your contribution! πŸŽ‰

πŸ’‘ Ideas for contributions:

  • πŸ› Bug fixes
  • ✨ New features
  • πŸ“š Documentation improvements
  • 🎨 UI/UX enhancements
  • πŸ§ͺ Test coverage

πŸ“ License

This project is licensed under the ISC License.

πŸ‘₯ Meet the Team

Suyash
Suyash
πŸš€ Creator & Lead Developer

πŸ™ Acknowledgments

🌟 Inspiration

Modern ride-sharing platforms

πŸ’» Built With

Love, coffee, and code

🀝 Community

Thanks to all contributors


πŸ“ž Get in Touch

GitHub Issues Discussions Email

πŸŽ‰ Happy Coding! Let's build the future of transportation together! πŸš—πŸ’¨

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages