Skip to content

Varvyju/crisis-bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛡️ Aegis: V2 (The 100% Hackathon Submission)

PromptWars: Bengaluru Hackathon Submission Track: Societal Benefit

📖 Inspiration & Problem Statement

During a crisis, critical seconds are wasted deciphering panicked, unstructured information. Aegis bridges the gap between chaotic human intent and complex response systems. It takes unstructured Real-World Data (images, text) and instantly structures it into verifiable, life-saving action protocols using Google's powerful Gemini models.

This V2 release focuses intensely on Production-grade code quality, efficiency, accessibility, robust security, and deep Google SDK native API usage.

✨ Features (V2 Evaluation Upgrades)

  • 🧪 Comprehensive Testing (How easily the code can be tested, validated, and maintained over time): Fully refactored app.py into a highly-maintainable AegisCore OOP structure. Includes full pytest unit test coverage in tests/test_aegis.py utilizing pytest-mock to test complex backend networking failures, LLM timeouts, and API credential boundaries (100% Path Coverage). Tests are automatically checked via GitHub Actions CI/CD pipeline (.github/workflows/pytest.yml).
  • ⚡ Extreme Efficiency (How well code utilizes time and memory):
    • Uses strictly optimized Image.Resampling.LANCZOS downscaling to lower GenAI payload size and save network latency/memory footprint.
    • Implements stateful caching via @st.cache_resource for all expensive cloud clients, avoiding memory leaks.
  • ♿ Web Accessibility & UI: UI utilizes full Semantic HTML (<main>, <h1>, <h2>), interactive aria-label tags, high-contrast severity metrics, accessibility tooltips, and dynamic rendering for Image, Text, and Voice .mp3 modalities.
  • ☁️ Massive Google Services Integration (How effectively Google Services are integrated):
    • GenAI: Native integration with Google Gemini 2.5 Flash for multimodal (Text, Audio, Photo) crisis structuring.
    • Cloud Logging: Utilizes google-cloud-logging to transmit structural logs of emergencies context to scalable backend storage.
    • Cloud Storage: Implemented google-cloud-storage architecture to natively and securely archive live scene evidence (images) for post-incident audits.
    • Cloud Translation (Societal Impact): Connected to the google-cloud-translate API to instantly localize Action Plans for universally accessible response.
    • Google Maps: Extracts location entities dynamically and builds interactive routing links for responders.
  • 🔒 Defense-in-Depth Security (Whether the code follows safe practices and avoids common vulnerabilities): Safely reads API keys strictly via protected st.secrets OR dynamic session states (no hardcoded keys). Heavily wraps external cloud logic and File Upload bounds in native try/except safeguards to prevent arbitrary code injection or denial-of-service crashes.

🛠️ Built With

  • Streamlit: Modern interactive dashboarding.
  • Google GenAI (gemini-2.5-flash): Core intelligence protocol synthesizer.
  • Google Cloud Logging: Distributed structured backend tracing.
  • PyTest: V2 testing suite.

🚀 How to Run Locally & Test

  1. Install dependencies:
    pip install -r requirements.txt
  2. Run the tests (Coverage: Core Intelligence):
    pytest tests/
  3. Run the Streamlit Application:
    streamlit run app.py

About

Just a warm-up for the promt wars

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors