Bachau is a decentralized, offline-capable emergency governance ecosystem designed to connect citizens with official government emergency channels in high-friction environments. It enables immediate situational awareness, emergency reporting, and coordination through secure digital interfaces while providing auxiliary support via verified volunteer networks and NGO/INGO integration.
bachau-integrated/
├── bachao / # Flutter Project Root
│ ├── android/ # Android native host project
│ │ ├── app/ # Android application module
│ │ ├── gradle/ # Gradle wrapper files
│ │ ├── .gitignore # Android-specific gitignore
│ │ ├── build.gradle.kts # Project-level Gradle build script
│ │ ├── gradle.properties # Gradle configuration properties
│ │ ├── settings.gradle.kts # Gradle settings
│ │ └── ...
│ ├── ios/ # iOS native host project
│ │ ├── Flutter/ # Flutter assets and configuration for iOS
│ │ ├── Runner/ # iOS application code (Swift/Obj-C)
│ │ ├── Runner.xcodeproj/ # Xcode project file
│ │ ├── Runner.xcworkspace/ # Xcode workspace file
│ │ ├── .gitignore # iOS-specific gitignore
│ │ └── ...
│ ├── lib/ # Main Dart source code (Flutter app)
│ │ └── main.dart # Entry point
│ ├── linux/ # Linux native host project
│ ├── macos/ # macOS native host project
│ ├── web/ # Web host project
│ ├── windows/ # Windows native host project
│ ├── test/ # Unit and Widget tests
│ ├── .dart_tool/ # [IGNORED] Internal Dart/Flutter tools cache and build info
│ ├── .idea/ # [IGNORED] IntelliJ IDEA project settings
│ ├── build/ # [IGNORED] Build output directory (generated binaries, APKs, etc.)
│ ├── .gitignore # Git ignore rules for the Flutter project
│ ├── analysis_options.yaml # Linter rules for Dart code
│ ├── pubspec.lock # Lockfile for Dart dependencies
│ ├── pubspec.yaml # Project configuration and dependencies
│ └── README.md # Project-specific README
|
├── frontend/ # React Native (Expo) mobile application
│ ├── app/ # App screens and navigation
│ ├── components/ # Reusable UI components
│ ├── assets/ # Images and static files
│ ├── constants/ # App constants and themes
│ ├── hooks/ # Custom React hooks
│ ├── package.json # Frontend dependencies
│ └── app.json # Expo configuration
│
├── backend/ # FastAPI backend services
│ ├── api/ # API endpoints
│ │ ├── dispatcher.py # Emergency dispatch endpoints
│ │ ├── health.py # Health check endpoints
│ │ ├── sms.py # SMS service endpoints
│ │ └── sos.py # SOS emergency endpoints
│ ├── app/ # Application setup
│ │ ├── main.py # FastAPI app entry point
│ │ └── __init__.py
│ ├── core/ # Core configurations
│ │ ├── config.py # App configuration
│ │ └── security.py # Security utilities
│ ├── model/ # Data models
│ │ ├── dispatcher.py # Dispatcher models
│ │ ├── guardians.py # Guardian models
│ │ ├── incident.py # Incident models
│ │ ├── sms.py # SMS models
│ │ └── sos.py # SOS models
│ ├── services/ # Business logic services
│ │ ├── decoder.py # Message decoding service
│ │ ├── dispatcher.py # Dispatch coordination service
│ │ ├── guardians.py # Guardian management service
│ │ └── sms-ingest/ # SMS ingestion service
│ ├── ws/ # WebSocket handlers
│ │ ├── guardians.py # Guardian WebSocket handlers
│ │ └── incidents.py # Incident WebSocket handlers
│ ├── requirements.txt # Python dependencies
│ └── .env # Environment variables
│
├── packages/ # Shared utilities
│ └── sms-core/ # SMS encoding/decoding utilities
│ ├── decode.py # SMS decoding logic
│ ├── encode.ts # SMS encoding logic (TypeScript)
│ └── spec.md # SMS protocol specification
│
├── test_main.http # API testing file
└── README.md # This file
- Emergency Reporting: Citizens can report emergencies through the mobile app
- Real-time Updates: Live incident tracking and updates
- Offline Capability: Works in low-connectivity environments
- User Authentication: Phone number verification with OTP
- API Endpoints: RESTful services for emergency management
- WebSocket Support: Real-time communication for live updates
- SMS Integration: Handles SMS-based emergency reports
- Data Models: Structured data for incidents, guardians, and dispatchers
- SMS Core: Encoding/decoding utilities for SMS-based emergency reports
- Cross-platform Types: Shared data structures between frontend and backend
cd backend
pip install -r requirements.txt
uvicorn app.main:app --reloadcd frontend
npm install
npx expo start- Health:
/health- Service health check - SOS:
/sos- Emergency SOS endpoints - SMS:
/sms- SMS service integration - Dispatcher:
/dispatcher- Emergency dispatch coordination
-
User Management
- Phone number authentication with OTP
- Profile setup for citizens and volunteers
- Verified KYC for professional responders (government channels, nurses, doctors)
-
Emergency Reporting and Coordination
- Centralized dashboard aggregating incoming reports
- Geospatial mapping of emergency incidents and responders
- Routing to official government channels with optional volunteer support
-
Governance Integration
- Provides actionable data to government emergency services
- Supports bridging communication with NGOs/INGOs for auxiliary support
- Offline-capable reporting mechanisms for low-connectivity regions
-
Supporting Features
- Volunteer coordination network
- Optional SMS reporting and compressed messaging for low-bandwidth environments
- Search and mapping utilities
- Provide public or private API endpoints for government channels, NGOs, and third-party applications to access aggregated emergency data securely.
- Support additional disaster-specific modules and integration with government applications.
- Expand analytics and reporting tools for situational awareness and resource allocation.
-
Monorepo Initialization
- Single repository contains all services, frontend, shared packages, infrastructure, and documentation.
-
Frontend Development
apps/mobilecontains React Native Expo project- Provides offline-capable emergency reporting, volunteer coordination, and geospatial tracking
- Placeholder modules for screens, services, and local storage
-
Backend Development
services/apicontains FastAPI application- Implements REST endpoints, authentication, SOS routing, volunteer matching, and geospatial utilities
-
Middleware Services
services/sms-ingestfor low-connectivity or offline emergency reports- Abstracts different communication protocols (SMS, Android device reports, SMPP)
-
Shared Modules
packages/sms-corefor encoding/decoding messagespackages/geofor geospatial computationspackages/typesfor cross-service type consistency
-
Infrastructure
infra/dockerfor containerizationinfra/nginxfor reverse proxy and load balancinginfra/envfor environment-specific configuration

