Fedow (Federated & Open Wallet Engine) is an open-source federation engine, blockchain, and digital wallet designed to connect cashless payment systems, local currencies, and memberships across multiple venues, festivals, and cooperative networks. This document outlines the technical stack and development methods used in the Fedow project.
- Programming Language: Python 3.10+
- Web Framework: Django 4.2
- API Framework: Django REST Framework
- Database: SQLite (development), PostgreSQL (production)
- Caching: Memcached
- Authentication:
- API Key-based authentication (djangorestframework-api-key)
- RSA signature-based authentication
- Payment Processing: Stripe API
- Cryptography:
- RSA for asymmetric encryption and signatures
- Fernet for symmetric encryption
- Task Queue: None identified (potential future addition)
- Dashboard: HTML/CSS/JavaScript with Bootstrap 5
- Interactive UI: HTMX for dynamic content without full page reloads
- CSS Framework: Bootstrap 5.2.3
- Containerization: Docker
- Orchestration: Docker Compose
- Web Server: Nginx
- Application Server: Gunicorn
- CI/CD: GitHub Actions
- Monitoring: Sentry
- Version Control: Git
- django-solo: For singleton models
- django-extensions: For additional Django utilities
- django-stdimage: For image handling
- cryptography: For encryption and signature operations
- channels: For WebSocket support
- faker: For generating test data
- python-dotenv: For environment variable management
-
Blockchain System:
- Uses Proof of Authority (PoA) for consensus
- Transaction validation with hash verification
- Non-speculative design focused on traceability
-
Wallet Management:
- Multi-asset wallets (currencies, time, memberships)
- RSA key pairs for wallet security
- Support for ephemeral wallets
-
Federation System:
- Connects multiple venues and networks
- Shared assets across federated places
- Centralized configuration with distributed operation
-
Card Management:
- Support for NFC/RFID/QRCode cards
- Card linking to wallets
- Primary cards for venues
-
Payment Processing:
- Stripe integration for fiat currency handling
- Support for local currencies
- Refund capabilities
The core data model revolves around:
- Wallet: Container for tokens, linked to users or places
- Asset: Represents a currency, membership, or time unit
- Token: Represents a specific amount of an asset in a wallet
- Transaction: Records transfers between wallets
- Federation: Groups places and assets for interoperability
- Place: Represents a venue or organization
- Card: Physical or virtual card linked to a wallet
- MVC Pattern: Following Django's Model-View-Template pattern
- API-First Design: RESTful API with comprehensive serializers
- Permission-Based Access Control: Fine-grained permissions for API endpoints
- Cryptographic Signatures: For API request authentication
- API Key Management: For service-to-service authentication
- Secure Data Storage: Encryption for sensitive data
- Input Validation: Comprehensive validation in serializers
- Unit Tests: Using Django's testing framework
- Coverage Tracking: Using the coverage package
- Test Data Generation: Using Faker for realistic test data
- Environment Isolation: Using Docker for consistent development environments
- Dependency Management: Using Poetry for Python package management
- Configuration Management: Using environment variables and .env files
- Stripe: For payment processing
- Sentry: For error tracking
Fedow is part of a suite of interoperable tools:
- Lespass: Ticketing, memberships, landing pages
- LaBoutik: Cash register, cashless, order management