https://github.com/mohammadhasanii/momtracker
To make things easier for both of us, I created MomTracker. This project allows me to share my location in real-time, calculate how far I am from home, and display it on a map. Now, instead of asking me, she can just check the app and see where I am.
https://github.com/mohammadhasanii/momtracker
geolocation gps location-tracking map maps mom-tracker
Last synced: 6 months ago
JSON representation
To make things easier for both of us, I created MomTracker. This project allows me to share my location in real-time, calculate how far I am from home, and display it on a map. Now, instead of asking me, she can just check the app and see where I am.
- Host: GitHub
- URL: https://github.com/mohammadhasanii/momtracker
- Owner: mohammadhasanii
- Created: 2025-03-29T21:19:25.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2025-04-05T12:03:43.000Z (6 months ago)
- Last Synced: 2025-04-05T13:19:36.533Z (6 months ago)
- Topics: geolocation, gps, location-tracking, map, maps, mom-tracker
- Language: JavaScript
- Homepage:
- Size: 4.08 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# MomTracker

## About the Project
Every night, my mom asks me:
"Where are you going?"
"Why are you coming back so late?"To make things easier for both of us, I created **MomTracker**. This project allows me to share my location in real-time, calculate how far I am from home, and display it on a map. Now, instead of asking me, she can just check the app and see where I am.
## Features
- **Real-Time Location Tracking**: Real-time communication\*\* via Socket.IO (no polling)
- **Distance Calculation**: Calculates the distance between my current location and home and displays it in a popup on the map.- **Interactive Map**: Uses `leaflet` for a smooth and interactive map experience.
- **Auto-reconnection** for stable WebSocket connections
- **Lightweight architecture** (removed legacy REST endpoints)
- **One-command deployment** with Docker Compose## Why MomTracker?
This project is a fun and practical way to keep my mom updated about my whereabouts while giving me some peace of mind during my nightly adventures. It's a win-win!
## How It Works
1. **Frontend**:
- Built with React.
- Displays the map and a popup with my name and the distance to home.
- RealTime tracking with a lightweight connection2. **Backend**:
- Built with Express.js.
- Connection With Socket.IO
- Very lightweight3. **Distance Calculation**:
- Uses the Haversine formula to calculate the distance between my current location and home.## Manual Run
1. Clone the repository:
```bash
git clone https://github.com/mohammadhasanii/MomTracker.git
cd momtracker
```2. Install dependencies:
```bash
npm install
```3. Start the server:
```bash
npm run server
```4. Start the React app:
```bash
npm start
```5. Open your browser and navigate to:
```
http://localhost:3000
```## Tech Stack
- **Frontend**: `React`, `leaflet` `Socket.IO`
- **Backend**: `Express.js` `Socket.IO`
- **Data Storage**: Memory## Docker Compose Deployment
```bash
docker-compose up --build
```## Docker Configuration Highlights
```yaml
services:
react-app:
ports: ["3000:3000"] # Access at http://localhost:3000
volumes: ["./:/app"] # Live code reloadnode-app:
ports: ["5000:5000"] # Backend and Socket.IO endpoint
depends_on: react-app # Optional startup orderingnetworks:
mynetwork: # Isolated network for inter-container communication
```## Future Plans
- Add a feature to notify my mom when I reach home.
- Improve the UI with more animations and better styling.---
**Disclaimer**: This project is just for fun and personal use. It's not meant to be a professional-grade tracking solution. 😊