How nischay-code/rescure works
Project Type and Purpose
• Res-Cure is a full-stack emergency-response application comprised of:
• A cross-platform mobile client (React Native) for end users to request help.
• A web-based client (React SPA) for hospital staff or users on desktop.
• A static marketing site (HTML/CSS) for public information (about, contact, detail pages).
• A backend powered by Firebase (Authentication, Realtime Database, Cloud Functions).
Main Components
1. User Interfaces
– Mobile App (React Native, Android/iOS via rescure.apk)
– Web App (React SPA in /React)
– Marketing Site (static HTML/CSS in project root)
2. Backend Services (Firebase)
– Authentication (user sign-in, roles)
– Realtime Database (emergency requests, hospital data)
– Cloud Functions (processing requests, notifications)
– Hosting (optional for React SPA and static pages)
3. External Services
– Push Notification / SMS gateway (for hospital alerts)
– Google Maps / Location API (to locate nearby hospitals)
Relationships and Data Flows
• User opens Mobile App → authenticates via Firebase Auth → submits emergency request → writes to Firebase Realtime DB → triggers Cloud Function → sends notification (push/SMS) to hospital staff.
• Hospital staff view request in Web App → fetch data from Realtime DB → update patient status → updates propagate back to mobile clients in real time.
• Marketing Site is hosted separately (e.g., Firebase Hosting or CDN) and does not directly interact with DB; it links to app download and signup pages.
Architectural Patterns and Principles
• Client-Server: UI clients (mobile/web) communicate with backend via Firebase SDKs.
• Event-Driven: Use Cloud Functions to react to database writes (new emergencies) and send notifications.
• Real-Time Synchronization: Realtime Database enables live updates between clients and hospital dashboards.
• Separation of Concerns:
• Presentation layer (UI)
• Business logic layer (Cloud Functions)
• Data layer (Firebase DB)
Technologies and Frameworks
• React Native for cross-platform mobile development.
• React (create-react-app) for web dashboard.
• Firebase suite for backend (Auth, Realtime DB, Cloud Functions, Hosting).
• Android Studio for building/testing APK.
• Standard HTML/CSS for marketing site.