Skip to content

Vansh0204/Shuttle_Tracker

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

116 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🚍 Shuttle Tracker

A real-time bus tracking and pick-up notification system built for NST students.


✨ Overview

The Shuttle Tracker web-app allows students to:

  • πŸ“ See the exact location of their college shuttle
  • πŸ›ŽοΈ Request a pick-up with one tap
  • πŸ—“οΈ Display their class schedule to the driver

This system reduces confusion and unnecessary calls, helping everyone stay on time.

🎯 Impact

Role Benefits
Students Shorter waiting times, on-time arrivals
Drivers Fewer calls, clearer routing
Faculty Fewer class disruptions
NST Management More disciplined, data-driven transport system

πŸš€ Tech Stack

  • Frontend: React 19, Vite, TailwindCSS
  • Backend: Node.js, Express.js, Socket.io
  • Authentication: Google OAuth, JWT
  • Real-time Communication: Socket.io
  • Maps: Leaflet, React-Leaflet

πŸ“‚ Project Structure

Shuttle_Tracker/
β”œβ”€β”€ backend/                 # Node.js backend server
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app.js          # Express app entry point
β”‚   β”‚   β”œβ”€β”€ socket.js       # Socket.io configuration
β”‚   β”‚   β”œβ”€β”€ models/         # Database models
β”‚   β”‚   β”‚   └── Bus.js      # Bus model schema
β”‚   β”‚   └── routes/         # API route handlers
β”‚   β”‚       β”œβ”€β”€ auth.js     # Authentication routes
β”‚   β”‚       └── bus.js      # Bus tracking routes
β”‚   β”œβ”€β”€ package.json        # Backend dependencies
β”‚   └── .env.example        # Environment variables template
β”‚
β”œβ”€β”€ frontend/               # React frontend application
β”‚   └── src/
β”‚       β”œβ”€β”€ App.jsx         # Main React component
β”‚       β”œβ”€β”€ main.jsx        # React entry point
β”‚       β”œβ”€β”€ socket.js       # Socket.io client setup
β”‚       β”œβ”€β”€ components/     # Reusable UI components
β”‚       β”‚   β”œβ”€β”€ BusCard.jsx
β”‚       β”‚   β”œβ”€β”€ Footer.jsx
β”‚       β”‚   β”œβ”€β”€ Loader.jsx
β”‚       β”‚   β”œβ”€β”€ Navbar.jsx
β”‚       β”‚   β”œβ”€β”€ ThemeProvider.jsx
β”‚       β”‚   └── ThemeToggle.jsx
β”‚       β”œβ”€β”€ pages/          # Application pages/views
β”‚       β”‚   β”œβ”€β”€ Driver.jsx
β”‚       β”‚   β”œβ”€β”€ Home.jsx
β”‚       β”‚   β”œβ”€β”€ Student.jsx
β”‚       β”‚   └── TrackShuttle.jsx
β”‚       └── assets/logo/main-logo.png
β”‚       β”œβ”€β”€ index.html      # HTML template
β”‚       β”œβ”€β”€ package.json    # Frontend dependencies
β”‚       β”œβ”€β”€ vite.config.js  # Vite configuration
β”‚       β”œβ”€β”€ tailwind.config.js # TailwindCSS config
β”‚       └── eslint.config.js   # ESLint configuration
β”‚
β”œβ”€β”€ README.md               # Project documentation (this file)
β”œβ”€β”€ HLD.md                  # High-level design document
└── LICENSE                 # MIT license

🀝 Contributing Guide

We welcome contributions from the community!

🚦 Quick Start

1. Fork & Clone

git clone https://github.com/YOUR_USERNAME/Shuttle_Tracker.git
cd Shuttle_Tracker

2. Backend Setup

cd backend
npm install
npm run dev
# or
node src/app.js

Create a .env file from .env.example:

cp .env.example .env

Configure MongoDB URI, Google OAuth, etc.

Backend runs on http://localhost:5001

3. Frontend Setup

cd frontend
npm install
npm run dev

Frontend runs on http://localhost:5173

4. Create a Feature Branch

git checkout -b feature/your-feature-name

πŸ“„ Environment Variables

Backend .env example:

MONGODB_URI=mongodb://localhost:27017/shuttle_tracker
GOOGLE_CLIENT_ID=your_google_client_id
JWT_SECRET=your_jwt_secret

Frontend .env (optional):

VITE_GOOGLE_CLIENT_ID=your_google_client_id

πŸ” Important: .env.local is git-ignored β€” never push secrets.


βœ… Development Checklist

Commit Message Format

type(scope): short description

Longer description (optional)

Closes #issue-number

Types: feat, fix, docs, style, refactor, test, chore

Push & PR

git add .
git commit -m "feat: add feature xyz"
git push -u origin feature/your-feature-name
  • Open a Pull Request with a clear description.
  • Reference issues like: Fixes #issue-no.

πŸ“± Features

πŸ‘©β€πŸŽ“ For Students

  • πŸ—ΊοΈ Real-time Bus Tracking
  • πŸ“± One-tap Pickup Request
  • ⏰ ETA Predictions

πŸ§‘β€βœˆοΈ For Drivers

  • πŸ—ΊοΈ Optimized Routes
  • πŸ“Š Trip Analytics

πŸ‘¨β€πŸ’Ό For Administration

  • πŸ“ˆ Usage Analytics
  • 🚌 Fleet Management
  • πŸ“Š Data Insights
  • βš™οΈ System Configuration

πŸ›‘οΈ Security Features

  • Google OAuth Login (NST domain)
  • JWT Token Authentication
  • Rate Limiting & API Protection
  • CORS Security
  • Input Validation & Sanitization
  • Environment Variables for Secrets

πŸ’¬ Community Support

  • Discussions: Open for Q&A
  • Bug Reports: Use Issues with reproducible steps
  • Feature Requests: Open an Issue with details
  • Contact: Maintainers listed in repo

First-time contributors?

  • Look for labels: good first issue, help wanted, documentation

πŸ“ License

Released under MIT License.


Happy Contributing ❀️

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 89.6%
  • CSS 9.6%
  • HTML 0.8%