Repositories
DigiFIR's source code is in seven repositories. The chaincode is kept apart from everything else because every institution must approve the same package hash, so it gets its own review, version tags and audit. The network is infrastructure each institution runs for its own nodes. The backend, its SDKs and the console share a third repository, and each app has its own.
| Repository | Holds | Language and stack | Guide |
|---|---|---|---|
digifir-chaincode | The four smart contracts and their shared library, CouchDB indexes, collection definitions, cross-language test vectors, static analysers, integration scenarios | Go 1.27.3, fabric-contract-api-go v2, chaincode as a service | Chaincode |
digifir-network | The Fabric network as code: CAs, peers, orderers, channel, policies, monitoring, Kubernetes manifests for the pilot, HSM image builds, operations runbooks, the administrators' signing tool | Bash, Docker Compose, Kustomize, Prometheus, Grafana, Go (tools) | Network and nodes, Operations runbooks |
digifir-backend | The common backend (api, projector, worker), the OpenAPI contract, the Dart and TypeScript SDKs, the officials' console, Helm charts | TypeScript on Node 22, Fastify 5, PostgreSQL 16, Redis 7; Dart; React | Backend |
digiFIR-citizen-app | The citizen app and the citizen web portal | Flutter (Dart); React 19 with Vite for the portal | Apps and portal |
digifir-police-app | The police app, with the registrar section | Flutter | Apps and portal |
digifir-forensics-app | The lab app, with the registrar section | Flutter | Apps and portal |
digifir-magistrate-app | The court app, with the registrar section | Flutter | Apps and portal |
An eighth repository, digiFIR, holds the Blockchain India Challenge proof of concept. It is frozen and kept for the record.
The code described in this documentation is on the branch claude/inspiring-brown-pjgm0l of every repository, where the apps run on the common backend.
How they depend on each other
- The chaincode repository builds images that the network repository's
deployCCinstalls.make deploy-devandmake integrationexpect the network repository next to it. - The backend checks its canonical-encoding test vectors against the chaincode repository's, and runs its network tests against the network repository's development network.
- The apps depend on the Dart SDK from the backend repository by git tag. To work on both at once, a
pubspec_overrides.yamlpoints the app at a local checkout of the backend.
Keep the repositories side by side in one folder:
projects/
digifir-chaincode/
digifir-network/
digifir-backend/
digiFIR-citizen-app/
digifir-police-app/
digifir-forensics-app/
digifir-magistrate-app/Where the design lives
| Topic | File |
|---|---|
| Architecture and principles | digifir-backend docs/architecture/ARCHITECTURE.md |
| Binding decisions (ADR-01 to ADR-21) | digifir-backend docs/architecture/DECISIONS.md |
| Backend design | digifir-backend docs/architecture/BACKEND.md |
| The API contract | digifir-backend openapi/digifir.yaml |
| Chaincode specification | digifir-chaincode docs/SPEC.md, and docs/IMPLEMENTATION_NOTES.md for the readings the code takes |
| Every change of design or contract | digifir-backend docs/architecture/CHANGES.md; the review log in the chaincode docs/SPEC.md |
| Requests between workstreams | digifir-backend docs/api-requests/ |
| Status | digifir-backend docs/PROJECT-STATUS.md |
Sources: digifir-backend docs/architecture/DECISIONS.md ADR-02 and ADR-19, docs/PROJECT-STATUS.md; each repository's README.md.