How senthilnathan8114-create/justice-ledger works
Justice Ledger is a Flask eVault for legal records. The principal workflow is an authenticated user uploading a document (and ownership declaration), screening and storing it encrypted, then recording its signed version on the ledger; users can later retrieve or verify records and produce portable proofs or selective disclosures. Other documented capabilities include legal case/evidence management, identity and access controls, AI assistance, integrations, and replicated nodes. Edges are limited to calls visible in excerpts or references documented by the README/SOURCE INDEX; unsampled internals are represented only at supported paths.
Main entry points: routes_core.py Record and case routes · db.py Application database · services.py Version and verification services · routes_trust.py Verification and sharing routes
Components 31
Identity and access
- Authentication routes
app/routes_auth.py - Admin portal login
app/routes_admin_login.py - Passkey login
app/routes_webauthn.py - Identity and RBAC
app/auth.py - Record permissions
app/access.py
Legal records
- Application database
app/db.py - Record and case routes
app/routes_core.py - Version and verification services
app/services.py - Encrypted content vault
app/storage.py
Ledger and proofs
- Signed ledger
app/blockchain.py - Verification and sharing routes
app/routes_trust.py - Offline proof packages
app/proof.py - Selective disclosure
app/redaction.py - Tamper-evident activity log
app/audit.py - Policy contracts
app/contracts.py
Node operations
- Node administration routes
app/routes_node.py - Peer replication and healing
app/network.py - Key management routes
app/routes_keys.py - Versioned key ring
app/keys.py
AI and integration
- Forgery screening
app/ai.py - External API routes
app/routes_interop.py - API keys and webhooks
app/interop.py - Search and assistant routes
app/routes_extra.py - Grounded legal Q&A
app/grounded.py - Concept search
app/search.py - Legal language glossary
app/legal_i18n.py
Other components
- Legal user
- Administrator
- Web UI
static/app.js - E-filing system
- IPFS node
Connections 36
- Legal user → Web UI: uses
- Administrator → Web UI: opens portal
- Web UI → Authentication routes: requests login
- Web UI → Record and case routes: uploads records
- Authentication routes → Identity and RBAC: checks identity
app/routes_auth.py - Admin portal login → Identity and RBAC: issues admin session
app/routes_admin_login.py - Passkey login → Identity and RBAC: uses authentication
app/routes_webauthn.py - Authentication routes → Application database: reads and writes
app/routes_auth.py - Record and case routes → Identity and RBAC: requires permission
app/routes_core.py - Record and case routes → Record permissions: checks visibility
app/routes_core.py - Record and case routes → Version and verification services: stores version
app/routes_core.py - Record and case routes → Application database: reads and writes
app/routes_core.py - Version and verification services → Encrypted content vault: stores ciphertext
app/services.py - Version and verification services → Forgery screening: extracts text
app/services.py - Version and verification services → Signed ledger: records version
app/services.py - Version and verification services → Application database: stores metadata
app/services.py - Encrypted content vault → IPFS node: stores blobs
- Verification and sharing routes → Signed ledger: checks records
app/routes_trust.py - Verification and sharing routes → Tamper-evident activity log: logs activity
app/routes_trust.py - Verification and sharing routes → Policy contracts: uses policies
app/routes_trust.py - Verification and sharing routes → Application database: reads and writes
app/routes_trust.py - Search and assistant routes → Offline proof packages: creates proofs
app/routes_extra.py - Search and assistant routes → Selective disclosure: handles disclosure
app/routes_extra.py - Search and assistant routes → Concept search: runs search
app/routes_extra.py - Search and assistant routes → Forgery screening: runs AI tools
app/routes_extra.py - Grounded legal Q&A → Concept search: retrieves passages
app/grounded.py - Grounded legal Q&A → Selective disclosure: uses disclosure
app/grounded.py - Grounded legal Q&A → Legal language glossary: uses glossary
app/grounded.py - Node administration routes → Peer replication and healing: administers peers
app/routes_node.py - Node administration routes → Application database: reads state
app/routes_node.py - Key management routes → Versioned key ring: rotates keys
app/routes_keys.py - External API routes → API keys and webhooks: manages integrations
app/routes_interop.py - External API routes → E-filing system: serves filings
- Record and case routes → API keys and webhooks: notifies case events
app/routes_core.py - API keys and webhooks → Signed ledger: uses ledger
app/interop.py - API keys and webhooks → Application database: reads and writes
app/interop.py