- Introduction
- Features
- Technologies Used
- Setup Instructions
- Screenshots
- Future Improvements
- Assignment Details
- License
This repository contains the source code for a Real-Time Device Tracking Application, developed as part of an assignment. The application allows a logistics company to monitor the real-time locations of their delivery agents on an interactive map, enhancing operational efficiency and improving route optimization.
-
Geolocation Tracking:
- Continuous tracking using browser-supported geolocation APIs.
- High accuracy with a timeout of 5 seconds and caching disabled.
-
Real-Time Updates:
- Device locations are emitted and received via WebSocket events.
- Updates occur in real-time on the dashboard as location data is received.
-
Interactive Map:
- Integrated using the Leaflet.js library and OpenStreetMap tiles.
- Automatically centers and adjusts markers for agent locations.
- Fully interactive with zoom and pan capabilities.
-
Dynamic Marker Management:
- Adds or updates markers for active agents.
- Removes markers when agents disconnect.
-
Error Handling:
- Logs geolocation errors for debugging purposes.
- Frontend: HTML, CSS, JavaScript, Leaflet.js
- Backend: Node.js, Socket.IO
- Maps: OpenStreetMap via Leaflet.js
- Node.js (version 14 or later)
- npm (Node Package Manager)
- Clone the repository:
git clone https://github.com/TheAyushB/realtime-device-track.git cd realtime-device-track
- Install dependencies:
npm install
- Start the server:
node app.js
- Access the application in your browser at http://localhost:3000.
Live Tracking:
Coordinates Update Live:
-
HTTPS Implementation:
Secure communication using HTTPS protocols to enhance security. -
Agent Status Indicators:
Display additional information like battery level or connection status. -
Analytics Dashboard:
Introduce analytics for route optimization and delivery efficiency. -
Mobile Optimization:
Ensure seamless tracking on mobile devices. -
Scalability:
Enhance performance to manage a larger fleet of agents.
Refer to assignments.md for a detailed problem statement and instructions.
This application was developed as a part of an assignment to demonstrate real-time device tracking using geolocation and maps. It showcases essential features like dynamic marker updates, error handling, and an interactive map interface.
This project is licensed under the MIT License. See the LICENSE file for more details.