A fully responsive, full-stack real-time location sharing app for college bus tracking. Built with modern tools and optimized for AI development with Cursor.
Students can:
- Log in securely
- Share their live location
- View real-time locations of buses and students on a map
Built using:
- Next.js + Tailwind CSS
- Supabase (Auth + DB + Realtime)
- Leaflet.js for mapping
- Vercel for deployment
- Cursor IDE for AI-assisted development
- Supabase Email Auth
- Sign Up captures: Name, Roll Number, Email, Bus Number, Start Point
- Session management and access control
- βShare My Locationβ button
- Live GPS tracking via browser geolocation API
- Location stored in Supabase
locationstable - Tracks timestamp, lat, long per user
- Leaflet-based map showing:
- All student locations
- Calculated average/most recent position for each bus
- Realtime auto-updates via Supabase subscriptions
- Filter by:
- Bus Number
- Starting Point
- Search by:
- Roll Number
- Student Name
| Column | Type | Description |
|---|---|---|
| id | UUID | PK, from Supabase |
| name | TEXT | Student Name |
| TEXT | Unique, for login | |
| roll_number | TEXT | Unique Student ID |
| bus_number | TEXT | Assigned Bus |
| start_point | TEXT | Starting Location |
| Column | Type | Description |
|---|---|---|
| id | UUID | PK |
| user_id | UUID | FK to users |
| latitude | FLOAT | Current Latitude |
| longitude | FLOAT | Current Longitude |
| timestamp | TIMESTAMP | Time of location capture |
| Layer | Technology |
|---|---|
| Frontend | Next.js (App Router) |
| Styling | Tailwind CSS |
| Backend | Supabase |
| Realtime | Supabase Subscriptions |
| Maps | Leaflet.js |
| Deployment | Vercel |
| Development | Cursor IDE |
- Clone the repo
git clone https://github.com/your-username/bus-tracker
cd bus-tracker