{"id":33609365,"url":"https://github.com/codila125/foedus-blockchain","last_synced_at":"2026-03-08T00:31:29.273Z","repository":{"id":314726650,"uuid":"1056532019","full_name":"codila125/foedus-blockchain","owner":"codila125","description":"Foedus is a complete blockchain implementation featuring Proof-of-Work consensus, UTXO transaction model, smart contracts with milestone tracking, and both CLI and REST API interfaces. Built in Go for performance and simplicity.","archived":false,"fork":false,"pushed_at":"2026-02-03T10:58:06.000Z","size":1462,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"foedus","last_synced_at":"2026-02-03T23:48:46.759Z","etag":null,"topics":["bitcoin","blockchain","blockchain-technology","ethereum","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codila125.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-14T09:45:05.000Z","updated_at":"2026-02-03T10:58:10.000Z","dependencies_parsed_at":"2025-09-14T12:24:44.803Z","dependency_job_id":"3a3a393a-d774-422e-9ef2-1d259c8a7bf2","html_url":"https://github.com/codila125/foedus-blockchain","commit_stats":null,"previous_names":["codila125/go_blockchain","codila125/foedus-blockchain"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/codila125/foedus-blockchain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codila125%2Ffoedus-blockchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codila125%2Ffoedus-blockchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codila125%2Ffoedus-blockchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codila125%2Ffoedus-blockchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codila125","download_url":"https://codeload.github.com/codila125/foedus-blockchain/tar.gz/refs/heads/foedus","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codila125%2Ffoedus-blockchain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30238853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T00:30:53.000Z","status":"ssl_error","status_checked_at":"2026-03-08T00:30:44.061Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","blockchain","blockchain-technology","ethereum","go","golang"],"created_at":"2025-11-30T19:02:38.072Z","updated_at":"2026-03-08T00:31:29.264Z","avatar_url":"https://github.com/codila125.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Foedus Blockchain\n\n![Cover](images/cover-template.png)\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eImmutable Contract Infrastructure\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e •\n  \u003ca href=\"#quick-start\"\u003eQuick Start\u003c/a\u003e •\n  \u003ca href=\"#api-reference\"\u003eAPI\u003c/a\u003e •\n  \u003ca href=\"#smart-contracts\"\u003eContracts\u003c/a\u003e •\n  \u003ca href=\"#deployment\"\u003eDeploy\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/version-0.4.0-blue.svg\" alt=\"Version 0.4.0\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/status-production--ready-brightgreen.svg\" alt=\"Production Ready\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/go-1.25+-00ADD8.svg\" alt=\"Go 1.25+\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/license-MIT-yellow.svg\" alt=\"MIT License\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/docker-ready-2496ED.svg\" alt=\"Docker Ready\"\u003e\n\u003c/p\u003e\n\n---\n\n## Overview\n\nFoedus is a **production-ready blockchain platform** enabling governments and enterprises to create, manage, and enforce immutable contracts. Built for legislative compliance and corporate accountability, it provides tamper-proof records with full audit trails.\n\n**Built for:**\n- 🏛️ **Government Bodies** enforcing legislative contracts and public agreements\n- 🏢 **Enterprises** requiring legally binding, immutable contract records\n- ⚖️ **Regulatory Compliance** with transparent, auditable contract histories\n- 🤝 **Public-Private Partnerships** coordinating multi-party agreements\n\n---\n\n## Features\n\n### 📜 Immutable Contract Records\nEvery contract, amendment, and approval is permanently recorded on the blockchain. Once committed, records cannot be altered or deleted—ensuring absolute integrity for legal and regulatory purposes.\n\n### 🏛️ Multi-Party Governance\nSupport for multiple signatories including government agencies, corporate entities, and authorized representatives. All parties must cryptographically approve before contracts become active.\n\n### 📋 Milestone-Based Execution\nTrack contract fulfillment through defined milestones. Each completion requires evidence submission and multi-party approval, creating a verifiable chain of accountability.\n\n### 🔐 Cryptographic Security\nEd25519 digital signatures and SHA-256 hashing ensure non-repudiation. Every action is cryptographically signed, providing legally defensible proof of authorization.\n\n### 📊 Complete Audit Trail\nFull transaction history accessible for regulatory audits, legal discovery, and compliance verification. Export complete blockchain records on demand.\n\n### 🚀 Enterprise Deployment\nProduction-ready Docker deployment with health monitoring, graceful shutdown, and persistent storage. Integrates with existing government and enterprise infrastructure via RESTful API.\n\n---\n\n## Quick Start\n\n### Docker (Recommended)\n\n```bash\n# Pull and run\ndocker pull codila125/foedus-blockchain:latest\ndocker run -d -p 3008:3008 --name foedus codila125/foedus-blockchain:latest\n\n# Verify it's running\ncurl http://localhost:3008/health\n# {\"status\":\"ok\"}\n```\n\n### With Persistent Storage\n\n```bash\ndocker volume create foedus-data\ndocker volume create foedus-logs\n\ndocker run -d \\\n  --name foedus \\\n  -p 3008:3008 \\\n  -p 3009:3009 \\\n  -p 3010:3010 \\\n  -v foedus-data:/app/data \\\n  -v foedus-logs:/var/log/foedus \\\n  codila125/foedus-blockchain:0.4.0\n```\n\n### Build from Source\n\n```bash\ngit clone https://github.com/codila125/foedus-blockchain.git\ncd foedus-blockchain\ndocker build -t foedus-blockchain .\ndocker run -d -p 3008:3008 --name foedus foedus-blockchain\n```\n\n---\n\n## API Reference\n\nBase URL: `http://localhost:3008`\n\n### Health Check\n```\nGET /health\n```\nReturns `{\"status\":\"ok\"}` when service is operational.\n\n### Wallet Operations\n\n| Endpoint | Method | Description |\n|----------|--------|-------------|\n| `/blockchain/createwallet` | GET | Generate new wallet |\n| `/blockchain/listaddresses` | GET | List all wallet addresses |\n| `/blockchain/getbalance/{address}` | GET | Get wallet balance |\n\n### Smart Contract Operations\n\n| Endpoint | Method | Description |\n|----------|--------|-------------|\n| `/blockchain/createcontract/{address}` | POST | Create new contract |\n| `/blockchain/getcontract/{contractID}` | GET | Get contract details |\n| `/blockchain/approvecontract` | POST | Approve contract |\n| `/blockchain/approvemilestone` | POST | Complete milestone |\n| `/blockchain/cancelcontract` | POST | Cancel contract |\n\n### Blockchain Queries\n\n| Endpoint | Method | Description |\n|----------|--------|-------------|\n| `/blockchain/printchain` | GET | Export full blockchain |\n\n---\n\n## Smart Contracts\n\n### Create a Contract\n\n```bash\ncurl -X POST http://localhost:3008/blockchain/createcontract/{creator_address} \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"title\": \"Infrastructure Development Agreement\",\n    \"description\": \"Public-private partnership for highway construction\",\n    \"milestones\": [\n      {\n        \"title\": \"Phase 1: Land Acquisition\",\n        \"description\": \"Complete land acquisition and permits\",\n        \"value\": 5000000,\n        \"due_date\": 1762329600\n      },\n      {\n        \"title\": \"Phase 2: Construction\",\n        \"description\": \"Complete primary construction\",\n        \"value\": 25000000,\n        \"due_date\": 1793865600\n      }\n    ],\n    \"parties\": [\n      {\"address\": \"{government_agency}\", \"role\": \"REGULATOR\"},\n      {\"address\": \"{contractor}\", \"role\": \"CONTRACTOR\"},\n      {\"address\": \"{oversight_body}\", \"role\": \"ARBITRATOR\"}\n    ],\n    \"terms\": \"Funds released upon milestone approval by all parties\"\n  }'\n```\n\n### Contract Lifecycle\n\n```\nDRAFT → ACTIVE → COMPLETED\n   ↓       ↓\n   └───────┴──→ CANCELLED\n```\n\n1. **DRAFT**: Contract proposed, awaiting party approvals\n2. **ACTIVE**: All authorized signatories approved, milestones in progress\n3. **COMPLETED**: All milestones fulfilled and verified\n4. **CANCELLED**: Contract terminated with full audit record\n\n### Use Cases\n\n| Sector | Application |\n|--------|-------------|\n| **Government** | Legislative contracts, procurement agreements, inter-agency MOUs |\n| **Infrastructure** | Public-private partnerships, construction milestones |\n| **Healthcare** | Pharmaceutical supply contracts, compliance agreements |\n| **Finance** | Regulatory filings, audit trails, cross-border agreements |\n| **Energy** | Power purchase agreements, environmental compliance |\n\n---\n\n## Deployment\n\n### Environment Variables\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `NODE_ID` | `3008` | API server port |\n| `SOURCE_NODE_ID` | `3008` | Source node identifier |\n| `MINER_NODE_ID` | `3011` | Miner node identifier |\n\n### Ports\n\n| Port | Service |\n|------|---------|\n| `3008` | HTTP API |\n| `3009` | P2P Source Node |\n| `3010` | P2P Miner Node |\n\n### Health Checks\n\nDocker health checks are built-in:\n```bash\n# Check container health\ndocker inspect --format='{{.State.Health.Status}}' foedus\n```\n\n### Logs\n\n```bash\n# View logs\ndocker logs -f foedus\n\n# Access log files (if using volumes)\ndocker exec foedus cat /var/log/foedus/source.log\n```\n\n---\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────┐\n│                      HTTP API (Chi)                     │\n│              GET/POST /blockchain/*                     │\n└───────────────────────┬─────────────────────────────────┘\n                        │\n┌───────────────────────┴─────────────────────────────────┐\n│                   Blockchain Core                       │\n│     UTXO Model • Proof-of-Work • Smart Contracts        │\n└───────────────────────┬─────────────────────────────────┘\n                        │\n┌───────────────────────┴─────────────────────────────────┐\n│                   Infrastructure                        │\n│       libp2p Network • PebbleDB • Ed25519 Crypto        │\n└─────────────────────────────────────────────────────────┘\n```\n\n---\n\n## Technical Specifications\n\n| Component | Technology |\n|-----------|------------|\n| Consensus | Proof-of-Work (SHA-256) |\n| Signatures | Ed25519 |\n| Storage | PebbleDB (LSM-tree) |\n| Networking | libp2p (TCP) |\n| Serialization | Protocol Buffers v3 |\n| API Framework | Chi Router |\n\n---\n\n## Module Documentation\n\n| Module | Description |\n|--------|-------------|\n| [api/](api/) | RESTful HTTP server |\n| [blockchain/](blockchain/) | Core consensus engine |\n| [network/](network/) | P2P communication |\n| [wallet/](wallet/) | Key management |\n| [database/](database/) | Storage layer |\n| [merkle/](merkle/) | Transaction verification |\n| [cli/](cli/) | Command-line interface |\n\n---\n\n## Support\n\n- **Documentation**: [GitHub Wiki](https://github.com/codila125/foedus-blockchain/wiki)\n- **Issues**: [GitHub Issues](https://github.com/codila125/foedus-blockchain/issues)\n- **Docker Hub**: [codila125/foedus-blockchain](https://hub.docker.com/r/codila125/foedus-blockchain)\n- **Enterprise Inquiries**: Contact for dedicated support and custom deployments\n\n---\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eFoedus v0.4.0\u003c/strong\u003e — Immutable Contract Infrastructure for Government \u0026 Enterprise\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodila125%2Ffoedus-blockchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodila125%2Ffoedus-blockchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodila125%2Ffoedus-blockchain/lists"}