Skip to content

A forensic-grade Python/Flask server designed as resilient humanitarian infrastructure. Features an immutable SHA-256 Blockchain Ledger for anti-corruption and a custom 'RAM-Ticket' Protocol to secure real-time signaling in low-trust, high-latency network environments.

License

Notifications You must be signed in to change notification settings

AmanCode22/DonoBro_Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🩸 DonorBro Backend (Forensic-Grade Core)

Status: 🟢 Live & Deployed Architecture: Python/Flask + Immutable Blockchain Ledger + RAM-Ticket SSE Mission: Reducing Time-to-Transfusion via Decentralized, Forensic Logic.

SDG Alignment License Environment


🌍 The Mission

DonorBro is Humanitarian Digital Infrastructure. It operates in low-trust, high-latency environments to connect blood donors with urgent requests instantly.

It strictly adheres to UN Sustainable Development Goals:

  • SDG 3: Good Health (Life-saving alerting).
  • SDG 9: Innovation (Resilient, offline-capable infrastructure).
  • SDG 10: Reduced Inequalities (Democratized access to donors).
  • SDG 16: Peace & Justice (Anti-corruption via Blockchain logging).

🏗️ Architecture & Security

The backend acts as a Forensic State Machine, assuming the network is hostile and the client device is unreliable.

1. The "Two-Key" Security Protocol (RAM-Ticket)

To secure real-time events (SSE) in restrictive hosting environments, the system uses a custom handshake:

  1. Auth: Client validates identity via SSO.
  2. Minting: Backend generates a disposable, in-memory "Stream Ticket."
  3. Burning: The ticket is atomically destroyed upon connection, preventing replay attacks.

2. Forensic Blockchain Ledger

Every critical action (Request Created, Donation Pledged, Fulfillment) is hashed and linked to the previous entry using SHA-256.

  • Immutability: Logs cannot be altered without breaking the cryptographic chain.
  • Auditability: Provides a verifiable trail for post-incident analysis.

3. "Heartbeat" Persistence

The system emits keepalive signals to allow client-side monitoring. If the heartbeat stops, the client automatically attempts to heal the connection.


⚙️ Tech Stack

  • Language: Python 3.11+
  • Framework: Flask (Production Mode)
  • Concurrency: Asynchronous Event Workers
  • Database: SQLite (Relational) + Custom JSON Ledger (Forensic)

📜 License

GNU Affero General Public License v3.0 (AGPL-3.0)

Copyright (c) 2026 Team DonorBro

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation.

About

A forensic-grade Python/Flask server designed as resilient humanitarian infrastructure. Features an immutable SHA-256 Blockchain Ledger for anti-corruption and a custom 'RAM-Ticket' Protocol to secure real-time signaling in low-trust, high-latency network environments.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published