BusSnooze is a Progressive Web App (PWA) that helps bus passengers avoid missing their stops. The app tracks your location via GPS and triggers an alarm as soon as you enter a pre-set radius near your destination.
- 📍 Real-time GPS Tracking: Shows your current location with a directional arrow.
- 🔍 Smart Search: Quickly find addresses/bus stops with auto-suggestions.
- 🔔 Proximity Alarm: Automatically rings and vibrates when you are near your destination (100m - 2000m radius).
- 📌 Saved Locations: Save your frequent stops (Home, Work, School...) to activate alarms with a single tap.
- 🌓 Dark Mode: Modern dark theme for nighttime travel, including a dark-style map.
- 🌐 Multi-language Support: Easily switch between English and Vietnamese.
- 🛡️ Anti-Sleep Mode (Wake Lock): Prevents the device from turning off the screen to ensure stable GPS tracking throughout the journey.
- 💾 Persistent Settings: Automatically saves your alarm radius and pinned locations.
- 📱 Mobile Optimized: Modern UI designed for one-handed use, can be installed as a PWA.
- React 18 & Vite: Fast and optimized development platform.
- Tailwind CSS: Modern, responsive styling.
- Leaflet & React-Leaflet: Map rendering and location interaction.
- Lucide React: Consistent iconography.
- Motion (Framer Motion): Smooth animations.
- Web Audio API: Browser-based alarm sound synthesis.
-
Clone the repository:
git clone https://github.com/YourUsername/BusSnooze.git cd BusSnooze -
Install dependencies:
npm install
-
Run in development mode:
npm run dev
-
Build for production:
npm run build
- Go to your repo Settings -> Pages.
- Under Build and deployment > Source, select GitHub Actions.
- The app will automatically deploy whenever you push to
main.
If you prefer not to use GitHub Actions:
- Install the
gh-pagespackage:npm install gh-pages --save-dev
- Add these scripts to your
package.json:"homepage": "https://<your-username>.github.io/<your-repo-name>/", "scripts": { "predeploy": "npm run build", "deploy": "gh-pages -d dist" }
- Run the deployment command:
npm run deploy
- On GitHub, go to Settings -> Pages and set the source branch to
gh-pages.
Due to browser security policies:
- Add to Home Screen: For the most stable performance, please use the "Add to Home Screen" feature on your mobile browser.
- Stay Awake: Enable the "Anti-Sleep Mode" in the app settings to keep GPS active while the screen is on (but dimmed).
- GPS Permissions: Ensure that location permissions are set to "While Using" or "Always".
Contributions (Pull Requests) and bug reports (Issues) are welcome.
Made by TomDev and AI with ❤️🔥
