How mokshsharma2006/post-quantum-intelligent-api-gateway works
This is a post-quantum, AI-assisted API security gateway. Its principal workflow is client request filtering and sanitization, asynchronous AI analysis, rate limiting, and backend proxying; the gateway also provides PQC demonstrations and security telemetry for a dashboard. The graph preserves documented capabilities, but some subsystems and runtime links are described only in the README; those relationships are cited there rather than presented as source-verified calls.
Main entry points: main.cpp HTTP Gateway · security_engine.py Security Analyzer · rate_limiter.hpp Rate Limiter · zmq_client.hpp ZeroMQ Client
Components 19
Gateway Security
- HTTP Gateway
gateway/src/main.cpp - AI Blocklist
gateway/include/ai_enforcement.hpp - Payload Pre-filter
gateway/src/main.cpp - Request Sanitizer
gateway/src/main.cpp - Rate Limiter
gateway/include/rate_limiter.hpp - Token Bucket
gateway/include/token_bucket.hpp - PQC Manager
gateway/src/pqc_manager.cpp - ZeroMQ Client
gateway/include/zmq_client.hpp - AI Decision Receiver
gateway/src/ai_decision_receiver.cpp - AI Enforcement State
gateway/src/ai_enforcement.cpp
Threat Analysis
- Security Analyzer
ai/security_engine.py - Gemini Classifier
ai/llm_classifier.py
Backend Services
- Backend API
backend/app.py
Monitoring
- Request Metrics
gateway/include/security_metrics.hpp - Security Event Log
gateway/include/security_event_log.hpp - Telemetry Endpoints
gateway/src/main.cpp - Security Dashboard
dashboard/index.html
Other components
- API Client
- Google Gemini
Connections 18
- API Client → HTTP Gateway: sends requests
README.md - HTTP Gateway → AI Blocklist: checks client
README.md - HTTP Gateway → Payload Pre-filter: filters payload
README.md - HTTP Gateway → Request Sanitizer: sanitizes request
gateway/src/main.cpp - HTTP Gateway → ZeroMQ Client: sends event
gateway/src/main.cpp - ZeroMQ Client → Security Analyzer: sends metadata
README.md - Security Analyzer → Gemini Classifier: requests analysis
ai/security_engine.py - Gemini Classifier → Google Gemini: analyzes request
ai/llm_classifier.py - Security Analyzer → AI Decision Receiver: returns decisions
README.md - AI Decision Receiver → AI Enforcement State: records decisions
gateway/src/ai_decision_receiver.cpp - HTTP Gateway → Rate Limiter: checks request
gateway/src/main.cpp - Rate Limiter → Token Bucket: uses bucket
gateway/include/rate_limiter.hpp - HTTP Gateway → Backend API: proxies request
README.md - HTTP Gateway → PQC Manager: serves PQC endpoints
gateway/src/main.cpp - HTTP Gateway → Request Metrics: records traffic
gateway/src/main.cpp - HTTP Gateway → Security Event Log: records events
gateway/src/main.cpp - HTTP Gateway → Telemetry Endpoints: serves telemetry
gateway/src/main.cpp - Telemetry Endpoints → Security Dashboard: provides data
README.md