How chretien527/rwanda-drive works
Rwanda Drive is a digital driving-credentials platform: drivers and officers use a web application backed by a Go HTTP API and MongoDB. The user-facing flow includes account registration and email verification, then role-specific dashboard use for managing credentials and vehicles or checking credentials at a checkpoint. The repository also contains blockchain anchoring and a standalone zero-knowledge proof toolchain. The README documents the service boundaries; source evidence is partial, so internal API routing and some backend relationships are not inferred.
Main entry points: page.tsx Role dashboard · service.go Credential chain service · main.go Proof CLI · DriverDashboard.tsx Driver credentials
Components 27
Web application
- Public information site
src/app/page.tsx - Site content sections
src/app/(site) - API client
src/lib/api.ts - Role dashboard
src/app/(main)/dashboard/page.tsx - Driver credentials
src/components/DriverDashboard.tsx - Digital wallet
src/components/DigitalWallet.tsx - Officer verification
src/components/PoliceDashboard.tsx - QR credential display
src/components/QrModal.tsx - Demo credential data
src/lib/mockData.ts
Identity
- Registration and verification
src/app/(auth)/register/page.tsx - Login
src/app/(auth)/login/page.tsx - Authentication services
backend/internal/auth
Backend API
- Go HTTP API
backend/cmd/api/main.go - Vehicle services
backend/internal/vehicle - MongoDB
backend/pkg/database/mongo.go
Blockchain credentials
- Credential chain service
backend/internal/chain/service.go - Chain RPC client
backend/internal/chain/client.go - Contract bindings
backend/pkg/bindings
Zero-knowledge proofs
- Proof CLI
zk/cmd/zkcli/main.go - Proof setup
zk/setup/setup.go - Proof generation
zk/prover/prover.go - License proof circuit
zk/circuits/licenseproof/circuit.go - Merkle gadget
zk/gadgets/merkle/merkle.go - Proof verification
zk/verifier/verifier.go
Other components
- Driver
- Officer
- Go API service
Connections 29
- Driver → Public information site: views information
src/app/page.tsx - Officer → Public information site: views information
src/app/page.tsx - Public information site → Site content sections: renders sections
src/app/page.tsx - Driver → Registration and verification: registers
- Officer → Registration and verification: registers
- Registration and verification → API client: calls
src/app/(auth)/register/page.tsx - Driver → Login: signs in
- Officer → Login: signs in
- Login → API client: calls
src/app/(auth)/login/page.tsx - API client → Go API service: sends HTTP requests
src/lib/api.ts - Go API service → Go HTTP API: is implemented by
README.md - Role dashboard → Driver credentials: renders
src/app/(main)/dashboard/page.tsx - Role dashboard → Officer verification: renders
src/app/(main)/dashboard/page.tsx - Role dashboard → QR credential display: renders
src/app/(main)/dashboard/page.tsx - Driver credentials → Digital wallet: uses
src/components/DriverDashboard.tsx - Driver credentials → Demo credential data: reads
src/components/DriverDashboard.tsx - Officer verification → Demo credential data: reads
src/components/PoliceDashboard.tsx - QR credential display → Demo credential data: reads
src/components/QrModal.tsx - Go HTTP API → MongoDB: uses database integration
README.md - Credential chain service → Chain RPC client: creates and calls
backend/internal/chain/service.go - Credential chain service → MongoDB: reads and writes
backend/internal/chain/service.go - Credential chain service → Contract bindings: uses bindings
backend/internal/chain/service.go - Proof CLI → Proof setup: runs setup
zk/cmd/zkcli/main.go - Proof CLI → Proof generation: generates proofs
zk/cmd/zkcli/main.go - Proof CLI → Proof verification: verifies and exports
zk/cmd/zkcli/main.go - Proof setup → License proof circuit: sets up
zk/setup/setup.go - Proof generation → License proof circuit: builds witness for
zk/prover/prover.go - Proof generation → Merkle gadget: uses path structure
zk/prover/prover.go - License proof circuit → Merkle gadget: uses gadget
zk/circuits/licenseproof/circuit.go