How suprith-44/hashproof works
Project Type and Purpose
• HashProof is a full-stack web application for secure evidence handling in crime investigations.
• Frontend: React + Tailwind CSS (in the App/ directory).
• Backend: Flask (Server.py) providing REST APIs.
• Blockchain: MultiChain for immutable storage of case metadata.
• File Storage: IPFS for digital evidence (images, videos).
Main Components
a. User Interface (React App)
• Pages: LoginPage, WelcomePage, role-based dashboards (admin, investigator, examiner, officer), logs.
• Assets: public/index.html, Tailwind config.
b. API Layer (Flask server)
• server.py exposes endpoints for authentication, case management, evidence upload, log retrieval.
c. Blockchain Node (MultiChain)
• Permissioned chain storing case metadata and tamper-proof hashes.
d. File Storage Node (IPFS)
• Stores raw evidence; returns content identifiers (CIDs).
e. Role-Based Access Control
• Enforced in backend and MultiChain permissions.
Component Relationships and Data Flow
• User → UI: User interacts with React pages.
• UI → Flask: HTTP(S) requests carrying JSON payloads (login, create case, upload evidence).
• Flask → IPFS: On evidence upload, Flask sends file to IPFS; receives CID.
• Flask → MultiChain:
• Writes case metadata + CID into the blockchain.
• Reads audit trail (logs, case history).
• Flask → UI: Returns responses (success, data, error).
• UI ← shows real-time data from backend responses.
Architectural Patterns and Principles
• Single Page Application (SPA) pattern in React.
• RESTful API in Flask.
• Separation of concerns: UI, business logic, data storage.
• Immutability and auditability via blockchain.
• External service integration (IPFS, MultiChain).