Documentation

DawaTrace Developer Guide

Overview

DawaTrace is a blockchain platform for India's pharmaceutical supply chain, built for the CDAC Blockchain India Challenge 2026. Every batch of medicine is tracked and publicly verifiable on Sui.

Architecture

All supply chain logic runs in Move smart contracts on Sui with capability-based access control. Only authorized addresses (manufacturers, distributors, chemists, regulators) can perform actions. Anyone can verify batch authenticity via the public Sui RPC.

Stakeholders

Org IDRolePrimary actions
CDSCO-REG-*RegulatorissueRecall, flagChemist, analytics
MFG-*ManufacturermintBatch
DIST-*DistributortransferBatch
CHEM-*ChemistdispenseMedicine (offline-capable)
PatientverifyBatch, report suspicious batch

Sui Smart Contracts

ModuleFileDescription
dawa_trace::batchbatch.moveBatchObject, mint_batch, mark_recalled, verify_batch
dawa_trace::custodycustody.moveCustodyRecord (frozen), transfer_custody
dawa_trace::dawa_pointsdawa_points.moveNon-transferable loyalty points
dawa_trace::bridge_capbridge_cap.moveCapability-based access control

Public verification

Anyone can call verify_batch against the public Sui RPC — no API key, no login required.

Recall SLA

Regulator issues recall via dashboard
  → Sui mark_recalled tx submitted            (~5s)
  → BatchObject.recalled = true on-chain       (~10s)
  → Dashboard polls and reflects recall
───────────────────────────────────────────────
Total: typically 10–15s, hard limit 60s

Getting Started

# Publish Sui contracts to devnet
make sui-deploy

# Start the web app (Next.js)
npm run dev

Environment Variables

Copy .env.example to .env. Critical variables:

VariableDescription
SUI_RPC_URLSui fullnode RPC (default: devnet)
SUI_PACKAGE_IDPublished Sui package ID
API_JWT_SECRETJWT signing secret (min 32 chars)