Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A foundational blockchain platform designed to store and manage government datasets with complete transparency.

License

Notifications You must be signed in to change notification settings

bettergovph/govchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

62 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

OpenGovChain: Decentralized Government Transparency Platform

Status

A base blockchain platform for government transparency - tokenless by default, extensible with custom modules for tokenomics, governance, and blockchain utilities.

🎯 Mission

OpenGovChain is a foundational blockchain platform designed to store and manage government datasets with complete transparency. Built on Cosmos SDK, it provides a base layer that agencies can extend with custom modules for tokenomics, governance, financial transactions, and other blockchain utilities based on their specific needs.

🌟 Key Features

Flexible & Extensible Architecture

  • Tokenless by Default: No economic barriers to start - anyone can participate
  • Optional Tokenomics: Easily add custom tokens, staking, or economic models when needed
  • Modular Design: Built on Cosmos SDK for easy extension and customization
  • Public Good Focus: Core platform designed for transparency, not profit

Government Data Management

  • Immutable Records: Government datasets stored permanently on blockchain
  • IPFS Integration: Efficient file storage with content addressing
  • Rich Metadata: Comprehensive dataset information and categorization
  • Query Capabilities: Search by agency, category, and file type

Decentralized & Extensible Network

  • Cosmos SDK: Built on proven, modular blockchain technology
  • Validator Network: Volunteer nodes secure the network (can be extended with staking)
  • IBC Compatible: Connect to other Cosmos chains and ecosystems
  • Open Source: Fully transparent and auditable code
  • Extensible: Add governance, smart contracts, DeFi, or custom modules

πŸ—οΈ Architecture

OpenGovChain combines three powerful technologies:

  1. Cosmos Blockchain - Immutable registry of dataset metadata and provenance
  2. IPFS - Distributed file storage with content addressing
  3. ChromaDB Vector DB - AI-powered semantic search

System Components

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚             │────▢│   Indexer    │────▢│  Blockchain β”‚
β”‚  (Web UI)   β”‚     β”‚ (REST API)   β”‚     β”‚ (Metadata)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚                    β”‚                    β”‚
       β–Ό                    β–Ό                    β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚    IPFS     β”‚     β”‚   ChromaDB   β”‚     β”‚    IPFS     β”‚
β”‚  (Storage)  │◀───│  (Vectors)   β”‚     β”‚  (Storage)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start

This repository only includes the setup script for creating a new chain and a sample web application to browse and interact with the chain.

For running a node, please check https://github.com/bettergovph/govchaind

Prerequisites

  • Ubuntu 20.04+ / macOS / WSL2
  • 8 GB RAM minimum
  • 50 GB free disk space

Installation

# Clone the repository
git clone https://github.com/bettergovph/govchain.git
cd govchain

# Install prerequisites
chmod +x scripts/install-prerequisites.sh
./scripts/install-prerequisites.sh

# Restart terminal or reload shell
source ~/.bashrc

Run Local Development Environment

# Terminal 1: Start blockchain
cd ~/govchain-blockchain

ignite chain build # Build/rebuild the blockchain binary
ignite chain serve

# Terminal 2: Start IPFS
ipfs init
ipfs daemon

Run Web Application Manually

# Terminal 3: Start indexer (optional)
cd indexer-node
npm install
npm start

# Terminal 4: Start web application
cd web
npm install
npm run dev

Run Web Application using Docker

docker compose up -d

Visit http://localhost:3000 to access the web interface.

πŸ“š Documentation

πŸ› οΈ Development

Project Structure

govchain/
β”œβ”€β”€ indexer-node/          # Vector search service
β”‚   └── src/               # Node.js application
β”œβ”€β”€ web/                   # Next.js frontend
β”‚   β”œβ”€β”€ src/app/           # Next.js app router
β”‚   └── src/components/    # React components
β”œβ”€β”€ scripts/               # Helper scripts
└── docs/                  # Documentation
govchain-blockchain/   # Cosmos blockchain (created by init script)
β”œβ”€β”€ x/datasets/        # Custom datasets module
β”œβ”€β”€ proto/             # Protocol buffers
└── cmd/               # CLI binaries

Key Technologies

  • Blockchain: Cosmos SDK with entry-based storage
  • Storage: IPFS (Kubo)
  • Search: ChromaDB vector database, OpenAI embeddings
  • Backend: Node.js, Next.js API routes
  • Frontend: Next.js with React and TypeScript

🌟 Features

βœ… Dataset Management

  • Upload datasets to IPFS
  • Register metadata on blockchain
  • Automatic checksum verification (SHA-256)
  • Immutable audit trail

βœ… Data Discovery

  • Semantic search with natural language
  • Filter by agency, category, date
  • Find similar datasets
  • Browse by category

βœ… Data Retrieval

  • Download from any IPFS gateway
  • Verify file integrity via blockchain
  • Multiple redundant copies
  • No single point of failure

βœ… Transparency & Trust

  • Immutable dataset history
  • Public verification
  • Track data replication
  • Open-source codebase

🀝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

πŸ”’ Security

  • Blockchain: Tendermint BFT consensus, 2/3+ validator agreement
  • Data Integrity: SHA-256 checksums, content-addressed storage
  • Access: Public read access, verified agency uploads
  • Privacy: No personal data on-chain

Report security issues to: [email protected]

🌐 Community

πŸ”§ Extensibility

OpenGovChain is a base platform that agencies can extend with additional modules:

βœ… Native Extensions (Built-in to Cosmos SDK)

  • Governance Module (x/gov): On-chain voting, proposals, and democratic decision-making
  • Token Economics (x/bank, x/staking, x/mint): Custom tokens, staking, rewards
  • IBC Integration: Cross-chain communication with 50+ Cosmos chains
  • Financial Transactions (x/bank, x/feegrant): Payments, transfers, fee grants
  • Custom Modules: Build agency-specific features using Cosmos SDK framework

πŸ”§ Available Integrations (Require Setup)

  • Smart Contracts (CosmWasm): Deploy Rust-based contracts (widely adopted, battle-tested)
  • Advanced DeFi: Integrate third-party modules (e.g., Umee lending, Osmosis DEX)

βš™οΈ Requires Custom Development

  • Escrow Services: Custom module development
  • Complex Loan Management: Build or integrate third-party modules
  • Agency-Specific Features: Custom module development

Cosmos SDK Ecosystem

Leverage the modular Cosmos SDK:

  • x/gov - On-chain governance βœ…
  • x/staking - Proof of Stake consensus βœ…
  • x/bank - Token transfers βœ…
  • x/distribution - Reward distribution βœ…
  • x/authz - Authorization grants βœ…
  • x/feegrant - Fee allowances βœ…
  • CosmWasm - Smart contract platform (integration required)
  • IBC - Inter-blockchain communication βœ…

πŸ’‘ Why OpenGovChain?

Traditional Government Data Portals:

  • ❌ Can be censored or taken offline
  • ❌ Can be tampered with
  • ❌ Have single points of failure
  • ❌ Require trust in centralized operators
  • ❌ Limited to basic data storage

OpenGovChain:

  • βœ… Cannot be censored (distributed worldwide)
  • βœ… Cannot be tampered with (cryptographic verification)
  • βœ… Cannot go offline (redundant copies)
  • βœ… Requires no trust (open-source, verifiable)
  • βœ… Extensible with governance, tokens, and custom features
  • βœ… Built on proven Cosmos SDK technology

πŸš€ For Agencies

Start Simple, Extend as Needed

  1. Deploy Base Platform: Start with tokenless data transparency
  2. Add Governance: Enable community voting and proposals
  3. Introduce Tokens: Add economic incentives when ready
  4. Build Custom Features: Extend with agency-specific modules
  5. Connect to Ecosystem: Use IBC to interact with other chains

Example Use Cases

Basic Deployment:

  • Government dataset transparency
  • Immutable record keeping
  • Public data access

With Governance:

  • Citizen voting on budget allocations
  • Proposal-based policy changes
  • Democratic decision-making

With Tokenomics:

  • Incentivize data contributions
  • Reward validators and participants
  • Enable marketplace features

With Financial Modules:

  • Government disbursements
  • Transparent fund tracking
  • Loan and grant management
  • Procurement and payments

Built with ❀️ for democratic accountability in the digital age

πŸ“œ License

This project is open source and available under the MIT License. See LICENSE file for details.


OpenGovChain by BetterGov.ph: A foundational blockchain platform for government transparency - extend it to meet your needs.

About

A foundational blockchain platform designed to store and manage government datasets with complete transparency.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published