A secure, open-source ledger system combining FastAPI backend with Next.js frontend for reflection tracking and GIC rewards.
- π Civic Onboarding Portal - Complete .gic domain creation with companion-guided setup
- π Secure Ledger System - Immutable daily records with Merkle tree integrity
- π€ AI-Powered Reflections - Intelligent companion system for personal growth
- π° GIC Rewards - Gamified incentive system for engagement
- π Auto-Merge Workflows - Automated PR management and deployment
- π‘οΈ Public-Safe - No hardcoded secrets, environment-based configuration
- π Admin Dashboard - Real-time monitoring and analytics
- π .gic Domain System - Sovereign digital identity with integrity scoring
hive-paw/
βββ backend/ # Backend API (Python/FastAPI)
β βββ api/ # API routes and main application
β β βββ main.py # FastAPI application entry point
β β βββ routers/ # API route modules
β βββ core/ # Core business logic
β β βββ models.py # Pydantic models
β β βββ storage.py # Data storage utilities
β β βββ hashing.py # Cryptographic functions
β β βββ auth.py # Authentication logic
β β βββ ...
β βββ utils/ # Utility functions
βββ frontend/ # Frontend (Next.js/React)
β βββ components/ # React components
β βββ pages/ # Next.js pages
β βββ ...
βββ docs/ # Documentation
β βββ api/ # API documentation
β βββ guides/ # User guides
β βββ deployment/ # Deployment guides
βββ scripts/ # Automation scripts
β βββ powershell/ # PowerShell scripts
β βββ bash/ # Bash scripts
β βββ automation/ # CI/CD scripts
βββ tests/ # Test suite
β βββ unit/ # Unit tests
β βββ integration/ # Integration tests
β βββ fixtures/ # Test fixtures
βββ config/ # Configuration files
βββ data/ # Data storage (gitignored)
βββ examples/ # Example files and patches
- Python 3.11+
- Node.js 18+
- Git
git clone https://github.com/yourusername/hive-paw.git
cd hive-paw# Install dependencies
pip install -r requirements.txt
# Configure environment
cp config/.env.example .env
# Edit .env with your configuration
# Run development server
python main.py# Install dependencies
cd frontend
npm install
# Run development server
npm run dev- API: http://localhost:8000
- Frontend: http://localhost:3000
- API Docs: http://localhost:8000/docs
The HIVE-PAW system now includes a complete civic onboarding portal for creating .gic domains:
- Civic Oath - Accept terms and create identity
- Companion Selection - Choose JADE, EVE, ZEUS, or HERMES
- Domain Customization - Select template, theme, and sections
- Domain Sealing - Cryptographic attestation to Civic Ledger
- First Reflection - Genesis block creation
- Dashboard - Ongoing portal for reflection management
- JADE - The Builder (Rationality: 0.95) - Precision and clarity
- EVE - The Reflector (Empathy: 0.95) - Deep understanding
- ZEUS - The Arbiter (Balance: 0.88) - Fair judgment
- HERMES - The Messenger (Communication: 0.82) - Clear expression
The system calculates GI (Governance Integrity) scores based on:
- M (Memory): Completeness of reflection history
- H (Human): User engagement and participation
- I (Integrity): Ledger compliance and attestations
- E (Ethics): Adherence to Civic Oath principles
Copy config/.env.example to .env and configure:
# Required
ADMIN_TOKEN=your_secure_admin_token
ADMIN_KEY=your_secure_admin_key
LEDGER_HMAC_KEY=your_secure_hmac_key
# Optional
DEMO_MODE=false
OPENAI_API_KEY=your_openai_key- β All secrets use environment variables
- β No hardcoded credentials
- β CORS protection enabled
- β Admin endpoints protected
- β Data sanitization implemented
| Endpoint | Method | Description |
|---|---|---|
/health |
GET | Health check |
/seed |
POST | Create daily seed |
/sweep |
POST | Add reflection sweep |
/seal |
POST | Seal daily ledger |
/verify/{date} |
GET | Verify ledger integrity |
/export/{date} |
GET | Export daily data |
| Endpoint | Method | Description |
|---|---|---|
/admin/metrics |
GET | System metrics |
/admin/agents |
GET | Agent status |
/bonus/run |
POST | Run bonus calculations |
This repository is public-safe with:
- No hardcoded secrets or API keys
- Comprehensive
.gitignorefor sensitive files - Environment-based configuration
- Security audit checklist in
SECURITY.md
See SECURITY.md for detailed security information.
# Run all tests
pytest
# Run specific test categories
pytest tests/unit/
pytest tests/integration/
# Run with coverage
pytest --cov=backend- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
pytest - Submit a pull request
This project is open source. See LICENSE file for details.
- π Documentation
- π Issues
- π¬ Discussions
Made with β€οΈ for the HIVE ecosystem