How ssky66/clarity-platform works
Clarity is an industrial-vision model acceptance and fulfillment platform: manufacturers define an audit task and provide a test set, suppliers join and provide an inference package, and the platform audits the model before staged on-site acceptance and settlement. The Vue role dashboards call a FastAPI backend whose routers handle task preparation, audit outcomes, disputes, evidence, and reports; the backend also integrates with blockchain services and persistent storage. The README describes private off-chain audit and IPFS storage, but the supplied excerpts do not establish their runtime wiring or audit algorithm implementation.
Main entry points: main.py FastAPI application · models.py Domain records · tasks.js Task API client · ManufacturerDashboard.vue Manufacturer dashboard
Components 28
Role-based frontend
- Manufacturer dashboard
frontend/src/views/ManufacturerDashboard.vue - Supplier dashboard
frontend/src/views/SupplierDashboard.vue - Audit dashboards
frontend/src/views/AuditorDashboard.vue - Task API client
frontend/src/api/tasks.js - Account API client
frontend/src/api/auth.js - HTTP request layer
frontend/src/api/request.js
API and task workflow
- FastAPI application
backend/main.py - Identity and access
backend/routers/auth.py - Task creation and uploads
backend/routers/tasks_core.py - Preparation and staking
backend/routers/prepare.py
Audit and resolution
- Online audit
backend/routers/audit.py - On-site acceptance
backend/routers/onsite.py - Settlement
backend/routers/settlement.py - Appeals and arbitration
backend/routers/appeals.py - Arbitration handling
backend/routers/arbitration.py - Rectification
backend/routers/rectification.py - Evidence and reports
backend/routers/evidence.py
Persistence and integrations
- Chain event queries
backend/routers/chain_events.py - Domain records
backend/models.py - Blockchain client
backend/blockchain_client.py - Audit worker
backend/scripts/audit_worker.py
Other components
- Manufacturer
- Supplier
- Auditor / admin
- Relational database
- WeBASE / FISCO BCOS
- IPFS storage
- Audit and fulfillment outcome
Connections 40
- Manufacturer → Manufacturer dashboard: uses
- Supplier → Supplier dashboard: uses
- Auditor / admin → Audit dashboards: uses
- Manufacturer dashboard → Task API client: requests tasks
- Supplier dashboard → Task API client: requests tasks
- Audit dashboards → Task API client: requests reports
- Manufacturer dashboard → Account API client: requests account
- Supplier dashboard → Account API client: requests account
- Task API client → HTTP request layer: sends requests
- Account API client → HTTP request layer: sends requests
- HTTP request layer → FastAPI application: calls API
- FastAPI application → Identity and access: registers routes
- FastAPI application → Task creation and uploads: registers routes
- FastAPI application → Preparation and staking: registers routes
- FastAPI application → Online audit: registers routes
- FastAPI application → On-site acceptance: registers routes
- FastAPI application → Settlement: registers routes
- FastAPI application → Appeals and arbitration: registers routes
- FastAPI application → Arbitration handling: registers routes
- FastAPI application → Rectification: registers routes
- FastAPI application → Evidence and reports: registers routes
- FastAPI application → Chain event queries: registers routes
- Identity and access → Blockchain client: creates wallets
- Task creation and uploads → Domain records: reads and writes
- Preparation and staking → Domain records: reads and writes
- Online audit → Domain records: reads and writes
- On-site acceptance → Domain records: reads and writes
- Settlement → Domain records: reads and writes
- Appeals and arbitration → Domain records: reads and writes
- Arbitration handling → Domain records: reads and writes
- Rectification → Domain records: reads and writes
- Evidence and reports → Domain records: reads evidence
- Chain event queries → Domain records: reads events
- Domain records → Relational database: persists records
- Blockchain client → WeBASE / FISCO BCOS: queries and submits
- Audit worker → Audit and fulfillment outcome: produces audit
- Audit and fulfillment outcome → Online audit: audit outcome
- Task creation and uploads → IPFS storage: stores encrypted files
- Evidence and reports → Audit and fulfillment outcome: serves evidence
- Settlement → Audit and fulfillment outcome: determines outcome