Complete implementation of the Goa Government e-Licensing platform with: Backend: - NestJS API with JWT authentication - PostgreSQL database with Knex ORM - Redis caching and session management - MinIO document storage - Hyperledger Besu blockchain integration - Multi-department workflow system - Comprehensive API tests (266/282 passing) Frontend: - Angular 21 with standalone components - Angular Material + TailwindCSS UI - Visual workflow builder - Document upload with progress tracking - Blockchain explorer integration - Role-based dashboards (Admin, Department, Citizen) - E2E tests with Playwright (37 tests) Infrastructure: - Docker Compose orchestration - Blockscout blockchain explorer - Development and production configurations
11 KiB
Goa GEL - Quick Start Guide
🚀 5-Minute Overview
The Goa Government E-License (GEL) Platform is a blockchain-based document verification system that enables multi-department approval workflows for government licenses using:
- Hyperledger Besu (blockchain)
- NestJS (backend API)
- Next.js (frontend)
- PostgreSQL + MinIO (data storage)
- QBFT Consensus (4 validators)
- ERC-721 Soulbound NFTs (license certificates)
📂 What's in This Directory?
/sessions/cool-elegant-faraday/mnt/Goa-GEL/
├── 6 Mermaid Diagrams (.mermaid files)
├── 6 HTML Preview Files (.html files)
├── 3 Documentation Files (.md files)
└── 3 Utility Scripts (.js files)
🎯 Start Here (Choose Your Role)
I'm a Project Manager / Non-Technical Stakeholder
- Open
system-context.htmlin your browser - Read
INDEX.md- Section "Diagram Descriptions" - Reference
ARCHITECTURE_GUIDE.md- Sections 1, 7, 8
Time: 15 minutes
I'm a Backend Developer
- Open
container-architecture.html - Read
ARCHITECTURE_GUIDE.md- Sections 2, 3, 5, 6 - Study the smart contract details in Section 3
- Review data flow in Section 5
Time: 45 minutes
I'm a Frontend Developer
- Open
system-context.html - Read
ARCHITECTURE_GUIDE.md- Section 2 (Frontend Layer only) - Review
container-architecture.html - Check deployment in Section 6
Time: 20 minutes
I'm a DevOps / Infrastructure Engineer
- Open
deployment-architecture.html - Read
ARCHITECTURE_GUIDE.md- Section 6 (Deployment) - Review Docker Compose configuration details
- Check Section 3 for blockchain node setup
Time: 30 minutes
I'm a Blockchain / Smart Contract Developer
- Open
blockchain-architecture.html - Read
ARCHITECTURE_GUIDE.md- Section 3 (Blockchain Deep Dive) - Study the 4 smart contracts section
- Review on-chain vs off-chain data split
Time: 40 minutes
I'm a QA / Tester
- Open
workflow-state-machine.html - Open
data-flow.html - Read
ARCHITECTURE_GUIDE.md- Sections 4 (Workflows) and 5 (Data Flow) - Create test cases based on the 11-step process
Time: 35 minutes
📊 View Diagrams
Browser Preview (Easiest)
Open any .html file in your web browser:
# Linux/Mac
firefox system-context.html
# Or
google-chrome container-architecture.html
# Or (macOS)
open workflow-state-machine.html
Mermaid Live (Online, Interactive)
- Go to https://mermaid.live
- Copy content from any .mermaid file
- Paste into editor
- View instant diagram
- Download as PNG/SVG
Export to PNG (if needed)
See README.md for 5 different methods:
- Method 1: Mermaid Live (easiest)
- Method 2: NPM CLI
- Method 3: Docker
- Method 4: Browser screenshot
- Method 5: Kroki.io API
🏗️ Architecture at a Glance
┌─────────────────────────────────────────────────────┐
│ USERS / STAKEHOLDERS │
│ Citizens • Departments • Approvers • Admins │
└──────────────────┬──────────────────────────────────┘
│
┌──────────────────▼──────────────────────────────────┐
│ FRONTEND (Next.js) │
│ Port 3000 • shadcn/ui • Tailwind │
└──────────────────┬──────────────────────────────────┘
│
┌──────────────────▼──────────────────────────────────┐
│ API GATEWAY (NestJS) │
│ Port 3001 • Auth • Workflow • Approvals │
└──────────────────┬──────────────────────────────────┘
│
┌──────────────┼──────────────┬──────────────┐
│ │ │ │
┌───▼────┐ ┌────▼────┐ ┌────▼────┐ ┌────▼────┐
│PostgreSQL │ Redis │ │ MinIO │ │ Besu │
│(5432) │ (6379) │ │ (9000) │ │(8545+) │
│Database │ Cache │ │ Storage │ │Blockchain
└──────────┘ └────────┘ └────────┘ └────────┘
Key Components:
- Frontend: React UI for users
- Backend: NestJS for business logic
- Database: PostgreSQL for structured data
- Cache: Redis for real-time state
- Storage: MinIO for documents
- Blockchain: Besu for immutable records
🔄 License Approval Flow (11 Steps)
1. Citizen Creates License Request
└─> Upload documents (PDF, images, etc.)
2. Documents Hashed
└─> SHA-256 hash of each document
3. Blockchain Recording
└─> Hash recorded on Besu (QBFT consensus)
4. Route to Departments
└─> Tourism + Fire Safety (parallel)
5-6. Departments Receive Notifications
└─> Ready for review
7-8. Departments Approve (Parallel)
└─> Record approvals on blockchain
9. NFT Minting
└─> ERC-721 Soulbound license certificate
10. Notifications Sent
└─> Citizen receives approval
11. Verification
└─> Anyone can verify on blockchain
⛓️ Blockchain Details
Consensus
- Type: QBFT (Quorum Byzantine Fault Tolerant)
- Validators: 4 nodes
- Requirement: 3/4 (75%) agreement
- Block Time: ~12 seconds
- Network: Private permissioned
Smart Contracts (4)
| Contract | Purpose | Key Functions |
|---|---|---|
| LicenseRequestNFT | Issue licenses as NFTs | mint(), burn(), ownerOf() |
| ApprovalManager | Record approvals | recordApproval(), getApprovalChain() |
| DepartmentRegistry | Manage departments | registerDept(), setApprovers() |
| WorkflowRegistry | Define workflows | defineWorkflow(), getWorkflow() |
Data Strategy
On-Chain (Immutable & Verifiable):
- License hashes
- Approval signatures
- Department registry
- NFT ownership
Off-Chain (Searchable & Scalable):
- Full document details
- Applicant information
- Actual document files
- Workflow state
Link: SHA-256 hash bridges both worlds
🚀 Get Started
Step 1: View a Diagram
# Open system-context.html in your browser
open /sessions/cool-elegant-faraday/mnt/Goa-GEL/system-context.html
Step 2: Read Documentation
- Start:
INDEX.md(this is your navigation guide) - Quick overview:
README.md - Deep dive:
ARCHITECTURE_GUIDE.md(sections based on your role)
Step 3: Understand Your Domain
- Frontend Dev: See container-architecture.html (Frontend section)
- Backend Dev: See container-architecture.html (API section)
- Blockchain Dev: See blockchain-architecture.html
- DevOps: See deployment-architecture.html
Step 4: Plan Implementation
Use the detailed architecture guide to plan your specific implementation.
📚 Documentation Files Explained
| File | Best For | Read Time |
|---|---|---|
INDEX.md |
Navigation & overview | 10 min |
README.md |
Quick reference | 8 min |
ARCHITECTURE_GUIDE.md |
Deep technical details | 30 min |
QUICK_START.md |
This file - getting oriented | 5 min |
🎓 Learning Path (Recommended)
For Everyone (Required)
- ✓ Read this file (QUICK_START.md)
- ✓ Open system-context.html in browser
- ✓ Read INDEX.md
Time: 20 minutes
Role-Specific (Choose One)
Backend Developers:
- container-architecture.html
- ARCHITECTURE_GUIDE.md - Sections 2, 3, 5, 6
- Database schema in Section 3
Frontend Developers:
- container-architecture.html (Frontend section)
- deployment-architecture.html
- ARCHITECTURE_GUIDE.md - Section 2
Blockchain Developers:
- blockchain-architecture.html
- ARCHITECTURE_GUIDE.md - Section 3
- Smart contracts overview
DevOps Engineers:
- deployment-architecture.html
- ARCHITECTURE_GUIDE.md - Section 6
- Docker Compose details
❓ Common Questions
Q: Where do I start?
A: Open system-context.html in your browser for a visual overview.
Q: How do I convert diagrams to PNG?
A: See README.md - 5 different methods listed (Mermaid Live is easiest).
Q: What's the technology stack? A: See section "Technology Stack Summary" in INDEX.md or ARCHITECTURE_GUIDE.md appendix.
Q: How does blockchain integration work? A: See data-flow.html (Steps 3, 9) and ARCHITECTURE_GUIDE.md Section 3.
Q: What's the deployment process? A: See deployment-architecture.html and ARCHITECTURE_GUIDE.md Section 6.
Q: How many smart contracts are there? A: 4 contracts: LicenseRequestNFT, ApprovalManager, DepartmentRegistry, WorkflowRegistry.
Q: Can I run this locally? A: Yes, see deployment-architecture.html for Docker Compose setup.
Q: How does multi-department approval work? A: See workflow-state-machine.html and data-flow.html (Steps 5-8).
📞 File Manifest
Core Diagrams (6 files):
├── system-context.mermaid (40 lines)
├── container-architecture.mermaid (64 lines)
├── blockchain-architecture.mermaid (75 lines)
├── workflow-state-machine.mermaid (65 lines)
├── data-flow.mermaid (105 lines)
└── deployment-architecture.mermaid (102 lines)
HTML Previews (6 files):
├── system-context.html
├── container-architecture.html
├── blockchain-architecture.html
├── workflow-state-machine.html
├── data-flow.html
└── deployment-architecture.html
Documentation (3 files):
├── INDEX.md (comprehensive index and navigation)
├── README.md (overview and PNG conversion)
└── ARCHITECTURE_GUIDE.md (1000+ line technical guide)
Utilities (3 files):
├── convert.js
├── convert-to-png.js
└── screenshot-diagrams.js
Total: 18 files, 140 KB, 2,800+ lines of diagrams & docs
✅ Next Steps
- Now: Open any .html file in your browser
- Next: Read
INDEX.mdfor detailed navigation - Then: Read role-specific sections in
ARCHITECTURE_GUIDE.md - Finally: Use diagrams as reference during implementation
Version: 1.0 Created: 2026-02-03 Platform: Goa GEL (Government E-License) Status: POC Phase 1
Ready to dive in? Open system-context.html now!