How vaishnaviupadyaya/q-shield works
Q-Shield is a research prototype for QDS document signing and verification, plus attack-simulation experiments and security analytics. Its main workflow hashes a document, creates a quantum seal, and verifies it with simulated measurements; the experiment workflow runs a protocol with optional attacks and evaluates measurement statistics. The frontend also exposes authentication, experiment history, and analytics. Edges reflect README descriptions and SOURCE INDEX references; several UI-to-API and unsampled subsystem connections are omitted because their runtime wiring was not shown.
Main entry points: documents.py Document endpoints · experiment_service.py Experiment orchestration · main.py FastAPI application · auth.py Authentication routes
Components 25
User interface
- Web application
frontend/src/app/page.jsx - Document signing
frontend/src/components/DocumentSigningHub.jsx - Document verification
frontend/src/components/DocumentVerificationHub.jsx - Simulation studio
frontend/src/components/SimulationStudio.jsx - Experiment history
frontend/src/components/ExperimentHistory.jsx - Threat analytics
frontend/src/components/ThreatAnalytics.jsx - Authentication UI
frontend/src/components/auth/AuthModal.jsx
API and identity
- FastAPI application
backend/main.py - Request and response schemas
backend/schemas.py - Authentication routes
backend/routers/auth.py - Authentication service
backend/services/auth_service.py
Document security
- Document endpoints
backend/routers/documents.py - Document hashing
quantum/document_hasher.py - Quantum signature protocol
quantum/protocol.py - Verification certificates
certificates/verification_certificate.py
Threat experiments
- Experiment routes
backend/routers/experiments.py - Experiment orchestration
backend/services/experiment_service.py - Attack scenarios
detection/attacks.py - Attack definitions
attacks/base.py - Measurement statistics
detection/statistics.py - Statistical tests
detection/hypothesis.py
Persistence and metrics
- Experiment metrics
experiments/metrics.py - Experiment history service
backend/services/history_service.py - Firestore and local storage
experiments/firestore_storage.py
Other components
- Q-Shield user
Connections 27
- Q-Shield user → Web application: uses
README.md - Web application → Document signing: renders
frontend/src/app/page.jsx - Web application → Document verification: renders
frontend/src/app/page.jsx - FastAPI application → Authentication routes: registers
backend/main.py - FastAPI application → Experiment routes: registers
backend/main.py - FastAPI application → Document endpoints: registers
backend/main.py - Authentication routes → Authentication service: calls
backend/routers/auth.py - Authentication routes → Request and response schemas: uses
backend/routers/auth.py - Document endpoints → Request and response schemas: uses
backend/routers/documents.py - Document endpoints → Document hashing: uses
backend/routers/documents.py - Document endpoints → Quantum signature protocol: uses
backend/routers/documents.py - Document endpoints → Verification certificates: uses
backend/routers/documents.py - Document endpoints → Firestore and local storage: persists documents
backend/routers/documents.py - Experiment routes → Experiment orchestration: calls
backend/routers/experiments.py - Experiment orchestration → Quantum signature protocol: signs and verifies
backend/services/experiment_service.py - Experiment orchestration → Attack scenarios: applies attacks
backend/services/experiment_service.py - Experiment orchestration → Measurement statistics: compares distributions
backend/services/experiment_service.py - Experiment orchestration → Statistical tests: tests outcomes
backend/services/experiment_service.py - Attack definitions → Attack scenarios: defines scenarios
- Experiment orchestration → Experiment metrics: reports metrics
- Experiment history service → Firestore and local storage: persists experiments
backend/services/history_service.py - Authentication service → Firestore and local storage: reads and writes users
backend/services/auth_service.py - Firestore and local storage → Experiment metrics: uses metrics
experiments/firestore_storage.py - Simulation studio → Experiment routes: configures experiments
- Experiment history → Experiment routes: requests history
- Threat analytics → FastAPI application: requests analytics
- Authentication UI → Authentication routes: authenticates