{"id":18398718,"url":"https://github.com/mongodb-developer/location-tracking","last_synced_at":"2025-08-29T03:45:33.127Z","repository":{"id":68658088,"uuid":"588705121","full_name":"mongodb-developer/location-tracking","owner":"mongodb-developer","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-18T18:28:28.000Z","size":107,"stargazers_count":12,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-07T05:35:39.022Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mongodb-developer.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-13T19:33:43.000Z","updated_at":"2024-10-29T12:04:00.000Z","dependencies_parsed_at":"2025-04-07T05:43:41.244Z","dependency_job_id":null,"html_url":"https://github.com/mongodb-developer/location-tracking","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mongodb-developer/location-tracking","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-developer%2Flocation-tracking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-developer%2Flocation-tracking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-developer%2Flocation-tracking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-developer%2Flocation-tracking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mongodb-developer","download_url":"https://codeload.github.com/mongodb-developer/location-tracking/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-developer%2Flocation-tracking/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272620823,"owners_count":24965608,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T02:24:04.938Z","updated_at":"2025-08-29T03:45:33.102Z","avatar_url":"https://github.com/mongodb-developer.png","language":"TypeScript","readme":"# Real-time Delivery Service Using MongoDB Change Streams\nThe project demonstrates the use of MongoDB Change Streams in a real-time location tracking application. The application is a local package delivery service similar to Uber. Check out the entire article on the [MongoDB Developer Center](https://www.mongodb.com/developer/languages/javascript/real-time-tracking-change-streams-socketio/)\n\n## Project Description\nThe Real-time Delivery Service application allows customers to track their package deliveries in real-time. The application utilizes MongoDB Change Streams to listen for document updates like location and shipment status and uses Socket.io to broadcast them to the connected clients.\n\n## How to Run the Application\n- Clone the repository to your local machine.\n- Create a .env file in the root of the project.\n- Add the MONGODB_CONNECTION_STRING\n- You can easily generate the connection from MongoDB Atlas UI (incase of local instance check this [link](https://www.mongodb.com/docs/drivers/node/current/fundamentals/connection/connect/))\n- Run `npm install` in the root folder to install the required dependencies for the server.\n- Run `npm run dev` in the root folder to start the server.\n- Open a new terminal and navigate to the `/frontend` folder.\n- Run `npm install` to install the required dependencies for the frontend.\n- Run `npm run dev` to start the React application.\n- The server will be running on http://localhost:5050 and the frontend will be running on http://localhost:5173/\n\n## How to Test the Application\n- Make sure you have the application running on your local machine as described in the \"How to Run the Application\" section above.\n- For testing purposes, a user and a driver account have been seeded in the database.\n- Open the frontend of the application in one browser window and choose to login as a user.\n- In another separate browser window, open the frontend and choose to login as a driver.\n- In the user window, create a new shipment and choose the pickup and delivery locations.\n- The driver should receive a notification of the new shipment and be able to accept it.\n- You can then track the shipment in real-time using the location updates provided by MongoDB Change Streams and broadcasted via Socket.io.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb-developer%2Flocation-tracking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongodb-developer%2Flocation-tracking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb-developer%2Flocation-tracking/lists"}