Skip to content

Ryde is a comprehensive full-stack taxi application designed to streamline ride-hailing services. It features a robust backend using Node.js, Express, MongoDB, and JWT, along with a dynamic React-based frontend developed with Vite. Real-time features like live location updates are powered by Socket.io, while Google Maps API handles maps and routes.

Notifications You must be signed in to change notification settings

sachinkg-13/Ryde

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 

Repository files navigation

RYDE (Taxi Application)

Description

Ryde is a comprehensive full-stack taxi application designed to streamline ride-hailing services. It features a powerful backend built with Node.js, Express, MongoDB, and JWT as well as a dynamic React-based frontend developed with Vite. Real-time functionalities like live location updates are handled using Socket.io, while mapping and navigation are powered by the Google Maps API.

Table of Contents

Overview

A full-stack taxi application that provides a robust backend API and a responsive frontend interface. The backend is built with Node.js, Express, MongoDB, and JWT for authentication, while the frontend is implemented using React and Vite. Real-time functionalities, such as live location updates, are powered by Socket.io.

Project Structure

  • Backend: Located in the Backend directory. Contains:
    • Express server and API routes for users, captains, maps, and rides.
    • A socket implementation for real-time communication.
    • Environment configuration and database connection.
  • Frontend: Located in the Frontend directory. Contains:
    • A React application built with Vite.
    • Routing, context providers (User, Captain, Socket), and pages for login, registration, and ride management.

Technologies

  • Backend: Node.js, Express.js, MongoDB, JWT, Socket.io, Google Maps API
  • Frontend: React, Vite, React Router

Prerequisites

  • Node.js (version 14+)
  • npm

Installation

Clone the Repository

git clone https://github.com/sachinkg-13/Ryde.git
cd Ryde

Setup Backend

cd Backend
npm install

Create a .env file in the Backend folder to configure environment variables (e.g., PORT, DB connection string).

Setup Frontend

cd ../Frontend
npm install

Running the Application

Start the Backend Server

From the Backend directory, run:

npm start

The backend server will be running on http://localhost:3000.

Start the Frontend Client

From the Frontend directory, run:

npm run dev

Access the frontend in your browser at the provided local URL (typically http://localhost:5173).

API Endpoints

Users

  • POST /users/register
    Registers a new user.
    Body: { fullname: { firstname, lastname }, email, password }
  • POST /users/login
    Logs in a user.
    Body: { email, password }
  • GET /users/profile
    Retrieves the authenticated user’s profile.
    Auth: Bearer <token>
  • GET /users/logout
    Logs out the current user.

Captains

  • POST /captains/register
    Registers a new captain.
    Body: { fullname: { firstname, lastname }, email, password, vehicle: { color, plate, capacity, vehicleType } }
  • POST /captains/login
    Logs in a captain.
    Body: { email, password }
  • GET /captains/profile
    Retrieves the authenticated captain’s profile.
    Auth: Bearer <token>
  • GET /captains/logout
    Logs out the current captain.

Maps

  • GET /maps/get-coordinates
    Returns coordinates for a given address using the Google Maps API.
    Query: ?address=<address>
  • GET /maps/get-distance-time
    Returns distance and time between two locations using the Google Maps API.
    Query: ?origin=<>&destination=<>
  • GET /maps/get-suggestions
    Provides autocomplete suggestions using the Google Places API.
    Query: ?input=<input>

Rides

  • POST /rides/create
    Creates a new ride.
    Body: { pickup, destination, vehicleType }
    Auth: Bearer <token>
  • GET /rides/get-fare
    Returns fare estimates between two locations.
    Query: ?pickup=<>&destination=<>
    Auth: Bearer <token>

Screenshots

Home Page (User)

Home Page

Captain Home Page

Captain Home Page

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License.


Happy Coding

About

Ryde is a comprehensive full-stack taxi application designed to streamline ride-hailing services. It features a robust backend using Node.js, Express, MongoDB, and JWT, along with a dynamic React-based frontend developed with Vite. Real-time features like live location updates are powered by Socket.io, while Google Maps API handles maps and routes.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages