A real-time location tracking application built using Node.js, Express, Socket.io, and Leaflet.js. This app allows users to share their live location, which updates dynamically on an interactive map.
- ✅ Live Location Sharing – Uses the Geolocation API to send real-time location updates.
- 🔄 Real-Time Updates – Powered by WebSockets (Socket.io) for seamless communication.
- 🗺 Interactive Map – Displays live user locations using Leaflet.js and OpenStreetMap.
- 👥 User Tracking – Detects when users connect or disconnect.
- ⚡ Lightweight & Fast – Built with Express.js for quick and efficient handling.
realtime-tracker/
│── public/ # Frontend assets
│ ├── css/style.css # Styles for the map
│ ├── js/script.js # Handles socket connections and map updates
│── views/
│ ├── index.ejs # Main frontend template
│── app.js # Backend server with Express & Socket.io
│── package.json # Project dependencies
│── .env # Environment variables (PORT)
git clone https://github.com/your-username/realtime-tracker.git
cd realtime-trackernpm installnpm run devnpm startVisit http://localhost:3000 to see the real-time tracking in action!
- Node.js + Express.js – Backend server
- Socket.io – Real-time WebSocket communication
- Leaflet.js – Interactive mapping
- EJS – Templating engine
- CSS – Styling
- 🌍 Show all users' locations in real-time.
- 🗺 Improve UI with custom map markers.
- 📊 Store location history in a database (MongoDB/PostgreSQL).
- 📱 Make the app mobile-friendly.