How krishnakeshab-banik/honeychain works
HoneyChain is a role-scoped KVIC honey traceability and intelligence platform. Its central workflow records hive signals and beekeeper harvests, groups harvests into batches, requires lab approval and a weight-oracle check, seals passing batches in a local hash-chain, issues package QR identities, and lets the public verify them without an account. Separate capabilities support CloneWatch, colony insights, market linkage, analytics, and an optional grounded assistant. The README documents these stages; unsampled router and service internals limit certainty about some call wiring.
Main entry points: routers Domain routers · database.py SQLite database · App.jsx React application · main.py FastAPI application
Components 26
User interfaces
- React application
web/src/App.jsx - Browser API client
web/src/api.js - Streamlit dashboard
frontend/app.py
API routing
- FastAPI application
backend/main.py - Domain routers
backend/routers - Authentication
backend/services/auth_service.py
Traceability workflow
- Hive telemetry
backend/services/sensor_service.py - Harvest records
backend/services/harvest_service.py - Batch workflow
backend/services/batch_service.py - Lab inspection
backend/services/lab_service.py - Weight oracle
backend/services/oracle_service.py - Hash-chain ledger
backend/services/ledger_service.py - Package and QR
backend/services/package_service.py - Public verification
backend/services/public_service.py
Intelligence and linkage
- CloneWatch
backend/services/clonewatch_service.py - Colony insights
backend/services/ml_service.py - Market linkage
backend/services/market_service.py - Cluster analytics
backend/services/analytics_service.py - Grounded assistant
backend/services/assistant_service.py
Persistence
- SQLite database
backend/database.py
Other components
- Beekeeper
- KVIC officer
- Lab inspector
- Citizen or buyer
- Hive simulator
simulator/hive_simulator.py - Gemini API
Connections 41
- Beekeeper → React application: uses
- KVIC officer → React application: uses
- Lab inspector → React application: uses
- Citizen or buyer → React application: verifies via
- Hive simulator → FastAPI application: sends readings
- React application → Browser API client: requests
- Browser API client → FastAPI application: calls API
- Streamlit dashboard → FastAPI application: calls API
- FastAPI application → Domain routers: mounts routes
- Domain routers → Authentication: delegates auth
- Domain routers → Hive telemetry: delegates telemetry
- Domain routers → Harvest records: delegates harvests
- Domain routers → Batch workflow: delegates batches
- Domain routers → Lab inspection: delegates tests
- Domain routers → Weight oracle: runs checks
- Domain routers → Hash-chain ledger: seals records
- Domain routers → Package and QR: issues packages
- Domain routers → Public verification: serves verification
- Domain routers → CloneWatch: serves scan monitoring
- Domain routers → Colony insights: requests predictions
- Domain routers → Market linkage: serves listings
- Domain routers → Cluster analytics: serves analytics
- Domain routers → Grounded assistant: dispatches questions
- Grounded assistant → Gemini API: requests language
- React application → Public verification: presents passport
- React application → CloneWatch: presents alerts
- React application → Colony insights: presents insights
- React application → Market linkage: presents market
- Hive telemetry → SQLite database: stores readings
- Harvest records → SQLite database: stores harvests
- Batch workflow → SQLite database: stores batches
- Lab inspection → SQLite database: stores results
- Weight oracle → SQLite database: reads scale data
- Hash-chain ledger → SQLite database: stores chain
- Package and QR → SQLite database: stores package IDs
- Public verification → SQLite database: checks ledger rows
- CloneWatch → SQLite database: reads scan records
- Colony insights → SQLite database: reads sensor history
- Market linkage → SQLite database: stores listings
- Cluster analytics → SQLite database: reads cluster data
- Authentication → SQLite database: reads and writes users