Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš— SwiftRide ✨

GitHub license PRs Welcome Built with Node.js

A modern, scalable ride-hailing platform for seamless urban mobility.


πŸš€ Table of Contents


Project Overview

SwiftRide is a next-generation ride-hailing and transport booking platform designed for fast, reliable, and secure urban travel. With real-time ride tracking, intuitive booking, and a robust driver dashboard, SwiftRide empowers both riders and drivers for a smooth journey every time.

  • Purpose: Connects passengers and drivers for on-demand rides.
  • Core Benefits:
    • Fast and secure ride booking
    • Real-time location tracking
    • Transparent pricing and payment
    • User-friendly experience for both riders and drivers

✨ Features

  • πŸš• Real-time ride tracking
  • πŸ“± Easy ride booking & cancellation
  • πŸ”’ Secure user authentication (JWT)
  • πŸ’³ Payment integration (placeholder)
  • πŸ§‘β€βœˆοΈ Driver dashboard & management
  • πŸ—ΊοΈ Live map and route calculation
  • πŸ“Š Ride history & analytics
  • πŸ“© Notifications (placeholder)
  • πŸ›‘οΈ Role-based access (user/driver)

πŸ› οΈ Tech Stack

Frontend:

  • React React (Vite)
  • TailwindCSS TailwindCSS
  • Axios Axios

Backend:

  • Node.js Node.js with Express.js
  • MongoDB MongoDB (Mongoose)
  • Socket.io Socket.io (real-time updates)
  • JWT JWT (Authentication)
  • Express Express Validator

Other Tools:

  • Nodemon Nodemon (dev)
  • ESLint ESLint & Prettier

πŸ“¦ Folder Structure Overview

SwiftRide/
β”œβ”€β”€ frontend/           # React app (Vite, TailwindCSS)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/ # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ pages/      # Main app pages (Home, Login, etc.)
β”‚   β”‚   β”œβ”€β”€ context/    # React context providers
β”‚   β”‚   └── assets/     # Images, icons, etc.
β”‚   └── public/         # Static files
β”œβ”€β”€ backend/            # Node.js/Express API
β”‚   β”œβ”€β”€ controllers/    # Route controllers (user, ride, captain, etc.)
β”‚   β”œβ”€β”€ models/         # Mongoose schemas
β”‚   β”œβ”€β”€ routes/         # Express route definitions
β”‚   β”œβ”€β”€ services/       # Business logic/services
β”‚   β”œβ”€β”€ db/             # Database connection
β”‚   β”œβ”€β”€ socket.js       # Socket.io logic
β”‚   β”œβ”€β”€ app.js          # Express app setup
β”‚   └── server.js       # Server entry point
β”œβ”€β”€ package.json        # Project metadata/scripts
└── README.md           # Project documentation

Descriptions:

  • frontend/: All client-side code and UI
  • backend/: All server-side logic and API endpoints
  • controllers/, models/, routes/, services/: Modular backend structure
  • db/: Database connection logic
  • socket.js: Real-time communication

🏁 Getting Started

1. Clone the repository

git clone https://github.com/your-username/SwiftRide.git
cd SwiftRide

2. Install dependencies

Frontend

cd frontend
npm install

Backend

cd ../backend
npm install

3. Configure environment variables

  • Copy .env.example to .env in both frontend/ and backend/ directories (if applicable).
  • Fill in the required values (see Environment Variables).

4. Run the development servers

Frontend

npm run dev
# Runs on http://localhost:5173

Backend

npm run dev
# Runs on http://localhost:5000

βš™οΈ Environment Variables

  • Create a .env file in both frontend/ and backend/ directories as needed.
  • Example placeholders:
    • VITE_API_URL=http://localhost:5000
    • DATABASE_URL=mongodb://localhost:27017/swiftride
    • JWT_SECRET=your_jwt_secret
    • GOOGLE_MAPS_API_KEY=your_api_key
  • Never commit secrets to version control.

πŸš€ Deployment

Frontend Deployment (Vercel/Netlify)

  1. Build the frontend:
cd frontend
npm run build
  1. Deploy the dist/ folder to Vercel or Netlify.
  2. Set environment variables in your hosting platform dashboard.

Backend Deployment (Render/Railway/Heroku)

  1. Ensure your package.json has a start script:
"scripts": {
  "start": "node server.js"
}
  1. Push your code to GitHub and connect to your hosting platform.
  2. Configure environment variables (DATABASE_URL, JWT_SECRET, etc.) in your hosting dashboard.
  3. Deploy and your backend API will be live!

Important Notes:

  • Use production-ready MongoDB instance (e.g., MongoDB Atlas).
  • Enable CORS for frontend-backend communication.
  • Use HTTPS in production for secure data transmission.

🀝 Contributing

We welcome contributions! To get started:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/your-feature)
  3. Commit your changes (git commit -m 'Add new feature')
  4. Push to your branch (git push origin feature/your-feature)
  5. Open a Pull Request (PR)

Coding Style:

  • Use clear, descriptive commit messages
  • Follow existing code style and structure
  • Write clean, maintainable code

πŸ“„ License

This project is licensed under the MIT License. See the LICENSE file for details.


πŸ–ΌοΈ Preview / Screenshots

Add screenshots, GIFs, or demo links here to showcase SwiftRide’s UI and features!


SwiftRide β€” Modern mobility, made simple.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages