A blockchain-based direct democracy platform for Mars colonists. Every citizen gets a wallet, every vote is on-chain, every decision is transparent. Built on Marscoin, stored on IPFS, designed to run without Earth.
Live at martianrepublic.org
| Module | Description |
|---|---|
| The Forge | HD wallet creation with BIP39 mnemonic, BIP32 key derivation, civic identity binding |
| Citizen Registry | Decentralized identity: photo + liveness video on IPFS, endorsement-based citizenship |
| Congress | 4-tier governance (Signal / Operational / Legislative / Constitutional) with on-chain proposals |
| The Ballot Box | CoinShuffle-based anonymous voting with encrypted ballot backup |
| The Forum | Native governance discussion linked to proposals |
| Instrument Registry | BADS (Blockchain Attested Data Streams) for IoT device certification chain-of-trust |
| The Academy | 20+ educational articles on governance, cryptography, Mars timekeeping |
| Inventory | Personal asset tracking with blockchain notarization |
| Logbook | IPFS-anchored publications and research logs |
- Backend: Laravel 11, PHP 8.2, MySQL
- Frontend: Blade templates, custom CSS design system (Orbitron/JetBrains Mono), Livewire, Alpine.js
- Blockchain: Marscoin (Litecoin fork), marscoind JSON-RPC, Electrum via Pebas
- Storage: IPFS for decentralized file storage
- Testing: Pest PHP (79 tests), PHPStan (level 1), Puppeteer visual tests
- CI/CD: GitHub Actions (PHPStan + Pest + Coveralls + Gitleaks + security audit)
- Monitoring: Sentry (backend + frontend JS), AI error triage via OpenRouter
- PHP 8.2+ with extensions:
bcmath,gmp,mbstring,openssl,pdo_mysql - MySQL 8.0+
- Composer 2.x
- Node.js 20+ (for frontend build and Puppeteer tests)
- A running Marscoin node (marscoind)
- An IPFS node (kubo) on port 5001
- Pebas API bridge on port 3001
git clone https://github.com/marscoin/martianrepublic.git
cd martianrepublic
composer install
cp .env.example .env
php artisan key:generateEdit .env with your database credentials, Marscoin RPC settings, and IPFS endpoint.
php artisan migrate
npm install && npm run prod# Static analysis
./vendor/bin/phpstan analyse --memory-limit=2G
# Unit + feature tests (79 tests)
./vendor/bin/pest --exclude-group wip
# With coverage
./vendor/bin/pest --coverage --exclude-group wip
# Visual smoke tests (requires running app)
node tests/visual/visual-smoke-test.mjsThe blockchain scanner watches for on-chain transactions (citizen applications, endorsements, proposals) and syncs them to the database:
# Add to crontab
0 1 * * * cd /path/to/martianrepublic/scripts && python3 applicant_detector.py >> /var/log/applicant_detector.log 2>&1martianrepublic/
app/
Http/Controllers/
Wallet/ # Dashboard, 2FA, HD wallet, transactions
Citizen/ # Registry, onboarding, identity
Congress/ # Proposals, voting, ballots
Inventory/ # Asset management
Logbook/ # Publications
Planet/ # Mars map
Models/
Bads/ # BADS instrument chain-of-trust models
Livewire/ # Real-time components (block display, feeds)
Includes/ # Blockchain helpers, ECDSA, governance tiers
Jobs/ # Background jobs (error triage)
resources/views/
academy/ # Educational content (20+ articles)
congress/ # Voting UI, proposal detail, ballot wizard
forum/ # Governance discussion
wallet/ # Dashboard, vault, bridge, forge
livewire/ # Real-time component views
tests/
Feature/ # Pest feature tests
visual/ # Puppeteer smoke + integration tests
The Martian Republic implements a 4-tier direct democracy:
- Signal — Non-binding opinion polls (24h, simple majority)
- Operational — Day-to-day decisions (72h, >50% of active citizens)
- Legislative — Laws and policies (168h, >60% of active citizens)
- Constitutional — Foundational changes (336h, >75% of active citizens)
Every proposal gets a git branch. Every amendment is a commit. Every enactment is a merge. The git history is the legislative record.
Voting uses CoinShuffle for cryptographic ballot anonymity — no one (not even the system) can trace a vote back to a citizen.
We welcome contributions! Here's how:
- Fork the repo and create a feature branch
- Make your changes — follow the existing code style
- Run
./vendor/bin/phpstan analyse --memory-limit=2G(must pass with 0 errors) - Run
./vendor/bin/pest --exclude-group wip(all tests must pass) - Submit a pull request with a clear description
- Test coverage expansion (currently ~30% route coverage)
- Accessibility audit (alt text, ARIA labels, semantic HTML)
- Internationalization (i18n) — the app is English-only
- Mobile responsiveness improvements
- Documentation for API endpoints
Copy this project onto a USB stick along with a copy of the Marscoin ledger, a Marscoin node, and an IPFS node. Take a SpaceX Starship to Mars. Upon arrival, bootstrap an entire economic and governance system from the cargo bay.
No Earth required.
If you discover a security vulnerability, please email info@marscoin.org. All vulnerabilities will be addressed promptly. Do not open a public issue for security reports.
The Martian Republic is open-source software licensed under the MIT License.