Engineering Resilience
Into Every Digital Layer.
PRANA-VAYU is a secure, cloud-native systems architecture and environmental incident-response platform inspired by the Vedic principles of Prana (vital energy) and Vayu (continuous movement). Designed with strict Rust type boundaries, serverless Python Lambda compute, DynamoDB persistence, and zero-panic data integrity guarantees.
End-to-End System & Data Flow
PRANA-VAYU separates untrusted ingress, deterministic domain validation, serverless orchestration, and persistent storage into distinct isolation boundaries.
Operational Web Console
Single-page operational dashboard featuring Leaflet geospatial telemetry, real-time registry filters, Web Audio feedback, and formal letterhead generation.
index.html (ES2022 / Leaflet)API Gateway HTTP API
AWS API Gateway v2 managing HTTP routing, explicit CORS preflight (OPTIONS), request rate limits, and 20KB payload bounding.
AWS::Serverless::HttpApiPython 3.12 Lambda Handler
Boto3 orchestration microservice handling payload sanitization, dual AI routing (Gemini 3.8 Flash / Bedrock Claude 3.5 Sonnet), and fail-closed 503 error handling.
lambda_function.pyRust 2021 prana-core
High-assurance domain crate with typed Severity rankings, geographic coordinate symmetry, and a 6-stage lifecycle state machine.
crates/prana-core (Serde / thiserror)Amazon DynamoDB Table
On-demand serverless NoSQL storage. Partition key: incident_id: String. Point-In-Time Recovery (PITR) and SSE encryption enabled.
AWS::DynamoDB::Table (On-Demand)Dual AI & Fallback Engine
Google Gemini Interactions API with automatic failover to Bedrock and deterministic qualitative fallback that guarantees zero downtime.
Gemini 3.8 Flash + Bedrock ClaudeRust Domain Modeling & Type Safety
In PRANA-VAYU, critical business decisions and state transitions are handled by a dedicated Rust crate (crates/prana-core), preventing runtime panics, invalid coordinate pairs, and illegal lifecycle jumps.
/// Operational severity classification for localized air pollution incidents.
pub enum Severity {
Moderate = 1,
High = 2,
Severe = 3,
}
impl Severity {
/// Protocol response urgency window (15m, 60m, 360m).
pub fn response_window_minutes(&self) -> u32 {
match self {
Severity::Severe => 15,
Severity::High => 60,
Severity::Moderate => 360,
}
}
pub fn requires_immediate_escalation(&self) -> bool {
matches!(self, Severity::Severe | Severity::High)
}
}
/// Strict incident lifecycle state transitions:
/// Reported -> Validated -> Assessed -> ResponseActive -> Documented -> Resolved
pub enum LifecycleState {
Reported,
Validated,
Assessed,
ResponseActive,
Documented,
Resolved,
Archived,
}
impl LifecycleState {
pub fn can_transition_to(&self, next: LifecycleState) -> bool {
match (self, next) {
(s, n) if *s == n => true,
(LifecycleState::Reported, LifecycleState::Validated) => true,
(LifecycleState::Validated, LifecycleState::Assessed) => true,
(LifecycleState::Assessed, LifecycleState::ResponseActive) => true,
_ => false, // Backward or illegal jumps forbidden
}
}
}
AWS Serverless Architecture & SAM Configuration
PRANA-VAYU uses AWS SAM (Serverless Application Model) to deploy on-demand, cost-effective infrastructure with zero idle charges.
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Globals:
Function:
Timeout: 30
MemorySize: 128
Runtime: python3.12
Resources:
PranaVayuHttpApi:
Type: AWS::Serverless::HttpApi
Properties:
CorsConfiguration:
AllowOrigins: ['*']
AllowMethods: ['GET', 'POST', 'OPTIONS']
IncidentsTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: PRANA_VAYU_Incidents
BillingMode: PAY_PER_REQUEST
PointInTimeRecoverySpecification:
PointInTimeRecoveryEnabled: true
Defense-in-Depth Engineering Principles
Security and operational resilience are woven into the system from protocol design to cloud execution.
Input Boundary Sanitization
Strict server-side and Rust domain validation limits notes to 3000 chars, zones to 180 chars, and ensures coordinate symmetry (both lat & lng must be present).
Fail-Closed 503 Handling
On database or runtime errors, the API fails closed with HTTP 503 without leaking Python stack traces, AWS account numbers, or table metadata.
Least-Privilege IAM
The Lambda execution role is strictly scoped to GetItem, PutItem, and Scan on the specific DynamoDB table ARN and model invoke ARN.
No Secrets on Client
Gemini and AWS credentials reside exclusively in server-side environment variables. The web console operates safely in local mode without credentials.
Sensor Reading Integrity
The platform explicitly displays PM2.5, PM10, NOx, and VOCs as NULL / UNMEASURED unless certified physical sensors are attached, preventing fabricated metrics.
Volunteer Safety Protocol
Guidance emphasizes physical separation (120m cordon, 15m hose dousing). Volunteers are explicitly advised never to confront operators or enter smoke.
Setup, Testing & Deployment Guide
Reproducible developer instructions grounded in the actual codebase.
# Run the comprehensive 10-test suite (0 external network calls)
python -m unittest test_lambda.py
# Output:
Ran 10 tests in 0.008s
OK
# Run Rust domain crate unit tests
cargo test --manifest-path crates/prana-core/Cargo.toml
# 1. Build serverless artifacts
sam build
# 2. Deploy guided to AWS
sam deploy --guided
# 3. Static Web Hosting via Amplify
git push origin main
# Amplify auto-builds index.html globally via amplify.yml
Verified Implementation & Research Horizons
Transparently categorizing what is verified today, underway, and planned for future research.
Verified Implemented
Production ReadySeverity rating, lifecycle state machine, Serde normalization, coordinate bounds.
Python 3.12 Lambda, HTTP API Gateway v2, DynamoDB on-demand table with PITR.
Gemini 3.8 Flash Interactions API + Bedrock Claude 3.5 Sonnet + deterministic fallback.
Interactive Leaflet GIS, real-time registry, research dossier, and regulatory print engine.
In Development
UnderwayCompiling prana-core directly to WASM for in-browser client-side rule validation.
Secure payload transmission to State Pollution Control Board complaint portals.
IndexedDB background sync for zero-connectivity field spotter data ingestion.
Research Direction
Future ResearchEdge IoT calibration and cryptographic signing for low-cost optical particulate counters.
Mathematical verification of incident state machine transitions using TLA+ / Kani.
Live Environmental Incident Operations Console
Explore the functional, anti-vibe-coding operational console. Submit a report, inspect the geospatial plume grid, review qualitative research dossiers, and generate official regulatory notices.
Select a tab above to log an observation, inspect geospatial downwind plumes, or generate formal Section 19(5) Air Act administrative representations.
| Timestamp | Incident ID | Zone | Source | Severity | Status | Action |
|---|---|---|---|---|---|---|
| Loading registry... | ||||||
Select an incident in the Registry to inspect its qualitative chemical speciation.
Prioritized non-confrontational safety actions will appear here.
Native high-APTI plant buffers (Peepal, Neem, Kaner) and source controls will appear here.
Section 19(5) Air (Prevention & Control of Pollution) Act, 1981 reference memo will appear here.
AS PHENIX & Architectural Attribution
“PRANA-VAYU explores how thoughtful systems architecture, secure software engineering, and efficient execution can work together to build resilient digital infrastructure.”
Architectural Philosophy: Vedic Cosmology Meets Digital Resilience
In Vedic cosmology, life exists at the intersection of the five primordial elements: Prithvi (Earth), Jala (Water), Agni (Fire), Vayu (Air), and Akasha (Space). While humans survive weeks without food and days without water, cellular irreversible brain death occurs in under three minutes without clean air. Localized air pollution must be treated as an acute, life-critical violation.
PRANA-VAYU translates this biological urgency into computational resilience: deterministic error containment, strict boundary sanitization, and immutable verification.
Lead Architect & Creator
SARVEPALLI AUDI SIVA BHANUVARDHAN
Brand: AS PHENIX
Category: Secure Systems Engineering & Cloud Resilience