How mariemammar1/neuro_trace works
NeuroTrace is a prototype for brain-MRI tumor classification and artifact traceability. A user submits an image through the web interface; the API coordinates preprocessing, prediction, confidence-based validation, Grad-CAM explanation, and case/artifact recording, which the interface presents for review. Artifact storage combines local files and database metadata with SHA-256 hashes and a Fabric registration attempt. The frontend also exposes history, dashboard, integrity, and blockchain views. Some backend routes and agent internals were not excerpted, so edges involving them rely on the source index or README rather than complete call-flow inspection.
Main entry points: orchestrator.py Workflow coordinator · artifact_service.py Artifact registration · app.js UI router · api.js API client
Components 26
Web interface
- UI router
frontend/js/app.js - Image analysis
frontend/js/pages/analyze.js - Case views
frontend/js/pages/dashboard.js - Traceability views
frontend/js/pages/blockchain.js - API client
frontend/js/api.js
API and workflow
- HTTP API
api/main.py - Workflow coordinator
src/neurotrace/agents/orchestrator.py
MRI analysis
- Preprocessing agent
src/neurotrace/agents/preprocessing_agent.py - Image preprocessing
src/neurotrace/preprocessing/processor.py - Prediction agent
src/neurotrace/agents/ai_agent.py - Tumor classifier
src/neurotrace/ai/predictor.py - Model loader
src/neurotrace/ai/model_loader.py - Validation agent
src/neurotrace/agents/validation_agent.py - Confidence rules
src/neurotrace/validation/validator.py - Explanation agent
src/neurotrace/agents/explainability_agent.py - Grad-CAM
src/neurotrace/explainability/gradcam.py
Artifact records
- Artifact registration
src/neurotrace/storage/artifact_service.py - Local artifact files
src/neurotrace/storage/local_storage.py - Case database
src/neurotrace/storage/database.py - Case metadata
src/neurotrace/storage/models.py
Integrity and ledger
- SHA-256 hashing
src/neurotrace/security/hashing.py - Blockchain agent
src/neurotrace/agents/blockchain_agent.py - Fabric client
src/neurotrace/blockchain/fabric_client.py - Fabric gateway
src/neurotrace/blockchain/fabric_gateway/server.js
Other components
- User
- Hyperledger Fabric
Connections 27
- User → UI router: uses
frontend/js/app.js - UI router → Image analysis: routes to
frontend/js/app.js - UI router → Case views: routes to
frontend/js/app.js - UI router → Traceability views: routes to
frontend/js/app.js - Image analysis → API client: requests analysis
frontend/js/pages/analyze.js - Case views → API client: requests case data
- Traceability views → API client: requests trace data
frontend/js/pages/blockchain.js - API client → HTTP API: HTTP requests
frontend/js/api.js - HTTP API → Workflow coordinator: invokes workflow
api/main.py - Workflow coordinator → Preprocessing agent: dispatches preprocessing
src/neurotrace/agents/orchestrator.py - Workflow coordinator → Prediction agent: dispatches prediction
src/neurotrace/agents/orchestrator.py - Workflow coordinator → Validation agent: dispatches validation
src/neurotrace/agents/orchestrator.py - Workflow coordinator → Explanation agent: dispatches explanation
src/neurotrace/agents/orchestrator.py - Workflow coordinator → Blockchain agent: dispatches traceability
src/neurotrace/agents/orchestrator.py - Preprocessing agent → Image preprocessing: uses
- Prediction agent → Tumor classifier: calls
src/neurotrace/agents/ai_agent.py - Tumor classifier → Model loader: loads model
src/neurotrace/ai/predictor.py - Validation agent → Confidence rules: calls
src/neurotrace/agents/validation_agent.py - Explanation agent → Grad-CAM: calls
src/neurotrace/agents/explainability_agent.py - Artifact registration → Local artifact files: stores files
src/neurotrace/storage/artifact_service.py - Artifact registration → SHA-256 hashing: hashes files
src/neurotrace/storage/artifact_service.py - Artifact registration → Case database: writes metadata
src/neurotrace/storage/artifact_service.py - Artifact registration → Case metadata: creates records
src/neurotrace/storage/artifact_service.py - Artifact registration → Fabric client: registers artifact
src/neurotrace/storage/artifact_service.py - Blockchain agent → Fabric client: uses
src/neurotrace/agents/blockchain_agent.py - Fabric client → Fabric gateway: HTTP requests
- Fabric gateway → Hyperledger Fabric: submits ledger data