AI-powered supply chain risk detection and monitoring system with blockchain verification on Algorand.
SentinelChain AI is an enterprise-grade platform that combines:
- AI Risk Detection - Machine learning + rule-based risk analysis
- Agentic AI - Three specialized agents (Delay, Escalation, Recovery)
- Trust Scoring - Dynamic actor reputation system
- Blockchain Verification - Immutable audit trail on Algorand
- Role-Based Dashboards - Tailored views for each stakeholder
Frontend (React + Vite)
โ
Backend API (FastAPI)
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Monitoring Engine โ
โ โ โ
โ Risk Engine (Rules + ML) โ
โ โ โ
โ Agent Coordinator โ
โ โโ Delay Agent โ
โ โโ Escalation Agent โ
โ โโ Recovery Agent โ
โ โ โ
โ Trust Engine โ
โ โ โ
โ Blockchain (if HIGH risk) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- Python 3.11+
- Node.js 18+
- npm or yarn
cd backend
pip install -r requirements.txt
uvicorn main:app --reload --port 8000Backend will start at: http://localhost:8000
cd frontend
npm install
npm run devFrontend will start at: http://localhost:5173
Supplier Dashboard
- View shipments created by supplier
- Monitor carrier trust scores
- Create new shipments
- Track risk alerts
Carrier Dashboard
- View assigned shipments
- Monitor own trust score
- Track performance metrics
- View route information
Distributor Dashboard
- View incoming shipments
- Monitor supplier trust scores
- Track delivery status
- Quality issue alerts
Admin Dashboard
- System-wide overview
- All shipments and actors
- Network health metrics
- Blockchain logs
Three specialized AI agents analyze each shipment:
Delay Agent
- Predicts future delays
- Analyzes historical patterns
- Provides ETA estimates
Escalation Agent
- Monitors trust score trends
- Flags high-risk actors
- Recommends alternative carriers
Recovery Agent
- Suggests mitigation strategies
- Provides action items
- Risk recovery plans
Dynamic reputation system for all actors:
- Reliable (85-100): Green status
- Monitor (70-84): Blue status
- High Risk (50-69): Amber status
- Critical (0-49): Red status
Trust scores update based on:
- Risk events (LOW/MEDIUM/HIGH)
- Delivery performance
- Quality issues
- Historical behavior
Only HIGH-risk events are logged to blockchain:
- Immutable audit trail
- Algorand network integration
- Transaction ID tracking
- Transparent verification
| Role | Actor ID | Trust Score | Shipments |
|---|---|---|---|
| Supplier | SUP01 | 55.8 | 3 shipments |
| Carrier | CAR01 | 69.6 | 4 shipments |
| Distributor | DIS01 | 90.2 | 3 shipments |
| Admin | ADMIN01 | N/A | All shipments |
GET /shipments- All shipmentsGET /actors- All actors with trust scoresGET /shipment/{id}- Shipment detailsGET /shipment/{id}/recommendations- AI recommendationsGET /blockchain- Blockchain logs
GET /supplier/{id}/shipments- Supplier's shipmentsGET /carrier/{id}/shipments- Carrier's shipmentsGET /distributor/{id}/shipments- Distributor's shipmentsGET /actor/{id}/trust- Actor's trust scoreGET /stats/system- System statistics
POST /shipments/booking-analysis- Pre-booking risk analysis
-
Login as Supplier
- Go to http://localhost:5173/login
- Select "Supplier"
- See only your 3 shipments
- Trust score: 55.8
-
Login as Carrier
- Select "Carrier"
- See only your 4 assigned shipments
- Trust score: 69.6
-
Login as Distributor
- Select "Distributor"
- See only your 3 incoming shipments
- Trust score: 90.2
-
Login as Admin
- Select "Admin"
- See all 10 shipments
- View system statistics
- Login as any role
- Click "View" on a HIGH-risk shipment
- Scroll to "AI Agent Recommendations"
- See 3 agent cards with:
- Confidence scores
- Severity levels
- Action items
ai-supply-chain-risk-passport/
โโโ backend/ # Backend API and services
โ โโโ agents/ # AI agent modules
โ โ โโโ delay_agent.py
โ โ โโโ escalation_agent.py
โ โ โโโ recovery_agent.py
โ โโโ data/
โ โ โโโ shipments.csv
โ โโโ agent_coordinator.py
โ โโโ blockchain_service.py
โ โโโ main.py
โ โโโ ml_model.py
โ โโโ models.py
โ โโโ monitoring_engine.py
โ โโโ risk_engine.py
โ โโโ trust_engine.py
โ โโโ requirements.txt
โโโ frontend/ # React frontend application
โ โโโ src/
โ โ โโโ components/
โ โ โ โโโ common/
โ โ โ โโโ layout/
โ โ โโโ context/
โ โ โ โโโ AuthContext.jsx
โ โ โโโ pages/
โ โ โ โโโ dashboards/
โ โ โ โโโ BlockchainPage.jsx
โ โ โ โโโ LandingPage.jsx
โ โ โ โโโ LoginPage.jsx
โ โ โ โโโ ShipmentDetailPage.jsx
โ โ โ โโโ ShipmentsPage.jsx
โ โ โ โโโ TrustOverviewPage.jsx
โ โ โโโ services/
โ โ โ โโโ api.js
โ โ โโโ utils/
โ โ โ โโโ helpers.js
โ โ โโโ App.jsx
โ โ โโโ main.jsx
โ โโโ package.json
โ โโโ vite.config.js
โโโ README.md # This file
โโโ HOW_TO_RUN.md # Setup and run instructions
โโโ PROJECT_STRUCTURE.md # Detailed project structure
โโโ EXAMINER_GUIDE_COMPLETE.md # Complete examiner guide
โโโ FINAL_SYSTEM_SPECIFICATION.md # System design specification
โโโ ROLE_BASED_ARCHITECTURE.md # Role-based architecture
โโโ SYSTEM_ARCHITECTURE.md # Technical architecture
โโโ FIXES_COMPLETED.md # Latest fixes documentation
See PROJECT_STRUCTURE.md for detailed file organization.
- FastAPI - Modern Python web framework
- Scikit-learn - Machine learning (Isolation Forest)
- Pandas - Data processing
- Pydantic - Data validation
- React 18 - UI framework
- Vite - Build tool
- TailwindCSS - Styling
- React Router - Navigation
- Axios - API calls
- Lucide React - Icons
- Algorand - Blockchain network (integration ready)
- 10 Shipments processed
- 10 Actors tracked (4 suppliers, 3 carriers, 3 distributors)
- 3 AI Agents providing recommendations
- 2 HIGH-risk events logged to blockchain
- 72.5 average network trust score
-
Landing Page (30s)
- Show value proposition
- Click "Login"
-
Dashboard (30s)
- Login as Supplier
- Show KPIs and shipments
- Explain color-coded risk badges
-
AI Recommendations (90s) โญ
- Click "View" on HIGH-risk shipment
- Show 3 AI agent cards
- Explain predictions and action items
- Highlight confidence scores
-
Blockchain Verification (30s)
- Show blockchain badge
- Navigate to Blockchain page
- Show transaction logs
- Authentication context manages user sessions
- Role-based access control
- Data filtering by actor ID
- Blockchain for immutable audit trail
This project is for demonstration purposes.
This is a hackathon project. For production use, additional features needed:
- Real authentication (JWT)
- Database integration (PostgreSQL)
- Real-time monitoring (WebSocket)
- Production blockchain integration
- Enhanced security measures
Essential documentation files:
- HOW_TO_RUN.md - Complete setup and run instructions
- EXAMINER_GUIDE_COMPLETE.md - Comprehensive guide for examiners
- FINAL_SYSTEM_SPECIFICATION.md - Official system design
- ROLE_BASED_ARCHITECTURE.md - Role-based business logic
- SYSTEM_ARCHITECTURE.md - Technical architecture
- PROJECT_STRUCTURE.md - Detailed file organization
- FIXES_COMPLETED.md - Latest improvements and fixes
For questions or issues, please refer to the documentation files above.
Built with โค๏ธ for supply chain transparency and risk intelligence