Skip to content

akashpmani/MyStopAlert

Repository files navigation

🚀 MyStopAlert

Never miss your stop again. Sleep peacefully during long journeys.

MyStopAlert is a location-based travel companion mobile application that helps commuters rest peacefully during long journeys by providing intelligent proximity alerts and automated notifications when approaching their destination.


🎯 Problem We Solve

Long-distance commuters struggle to rest properly due to:

  • Fear of missing their stop/destination
  • Constant manual location monitoring
  • Forgetting to inform pickup contacts
  • Travel anxiety preventing quality rest

💡 Our Solution

MyStopAlert provides an intelligent, always-on travel guardian that:

  • ✅ Monitors your location in the background with battery optimization
  • ✅ Sends proximity alerts at customizable distances from your destination
  • ✅ Automatically notifies pickup contacts when you're near arrival
  • ✅ Handles route delays and changes with adaptive notifications
  • ✅ Provides emergency SOS features for safety
  • ✅ Works universally across all transport modes (bus, train, car, etc.)

🏗️ Architecture

Tech Stack

Backend:

  • FastAPI (Python 3.11+)
  • PostgreSQL 15 + PostGIS
  • Redis 7
  • Celery
  • SQLAlchemy 2.0

Mobile:

  • Flutter 3.16+
  • Dart 3.2+
  • Riverpod (State Management)
  • Clean Architecture

External Services:

  • Google Maps API / Mapbox
  • Twilio / Exotel (SMS/Calls)
  • Firebase (FCM, Analytics, Crashlytics)

Project Structure

MyStopAlert/
├── backend/              # FastAPI backend
│   ├── app/
│   │   ├── api/         # API endpoints
│   │   ├── core/        # Configuration, security
│   │   ├── models/      # Database models
│   │   ├── schemas/     # Pydantic schemas
│   │   ├── services/    # Business logic
│   │   └── db/          # Database configuration
│   ├── alembic/         # Database migrations
│   ├── tests/           # Backend tests
│   └── requirements/    # Python dependencies
│
├── mobile/              # Flutter mobile app
│   ├── lib/
│   │   ├── core/        # Constants, theme, utils
│   │   ├── data/        # Models, repositories, datasources
│   │   ├── domain/      # Entities, repositories, usecases
│   │   └── presentation/# Screens, widgets, providers
│   ├── android/         # Android-specific code
│   ├── ios/             # iOS-specific code
│   └── test/            # Mobile tests
│
├── docker-compose.yml   # Local development environment
└── .github/             # CI/CD workflows

🚀 Quick Start

Prerequisites

  • Backend:

    • Python 3.11+
    • Docker & Docker Compose
    • PostgreSQL 15+ (via Docker)
    • Redis 7+ (via Docker)
  • Mobile:

    • Flutter 3.16+
    • Dart 3.2+
    • Android Studio / Xcode
    • Android SDK / iOS SDK

Backend Setup

# Navigate to backend directory
cd backend

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements/dev.txt

# Start services (PostgreSQL, Redis)
docker-compose up -d

# Run database migrations
alembic upgrade head

# Start development server
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

Backend will be available at: http://localhost:8000
API Documentation: http://localhost:8000/docs

Mobile Setup

# Navigate to mobile directory
cd mobile

# Get dependencies
flutter pub get

# Run on emulator/device
flutter run

# Run tests
flutter test

🧪 Testing

Backend Tests

cd backend
pytest --cov=app --cov-report=html

Mobile Tests

cd mobile
flutter test --coverage

📦 Deployment

Backend Deployment

# Build Docker image
docker build -t mystopAlert-backend:latest ./backend

# Deploy to cloud (AWS/GCP/DigitalOcean)
# See deployment documentation for details

Mobile Deployment

# Android
cd mobile
flutter build appbundle --release

# iOS
flutter build ipa --release

🔑 Key Features

✨ Phase 1 (MVP)

  • User authentication (OTP-based)
  • Destination setting via map
  • Background location tracking
  • Proximity alerts
  • Journey history

🚀 Phase 2 (Core Features)

  • Contact auto-notification (SMS/Call)
  • Customizable alert distances
  • Delay detection
  • Route visualization
  • Battery optimization

💎 Phase 3 (Advanced)

  • SOS emergency features
  • Multi-stop journeys
  • Route recommendations
  • Advanced analytics
  • Social features

📊 Success Metrics

Technical

  • API Uptime: >99.9%
  • API Response Time: <200ms (p95)
  • Alert Accuracy: >99%
  • Battery Impact: <5% per hour

User

  • 7-Day Retention: >40%
  • 30-Day Retention: >25%
  • App Store Rating: >4.5 stars
  • Alert Acknowledgment: >95%

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


🙏 Acknowledgments

  • Google Maps API for routing and geocoding
  • Flutter team for the amazing framework
  • FastAPI for the high-performance backend framework
  • All our beta testers and early users

📞 Contact & Support


🗺️ Roadmap

See our Implementation Plan for detailed development roadmap.

Current Phase: Phase 1 - Foundation & Infrastructure Setup
Status: 🟢 In Progress


Built with ❤️ for commuters everywhere

About

MyStopAlert

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors