RootChain is a next-generation blockchain platform with its native cryptocurrency ROOT. It features a secure wallet system, blockchain explorer, ICO platform, and a comprehensive developer portal.
- Native ROOT token with initial supply of 1,000,000 tokens
- Secure wallet system with 24-word mnemonic phrases
- Comprehensive blockchain explorer
- ICO platform with Stripe integration
- Smart contract support
- Decentralized architecture
- Multi-network support (Mainnet and Testnet)
- Advanced monitoring and metrics
- High-performance caching system
- Rate limiting and API security
- Modern developer portal with API management
- Interactive testnet faucet
- Code examples and documentation
rootchain/
├── blockchain/ # Core blockchain implementation
│ ├── core/ # Core blockchain components
│ ├── wallet/ # Wallet implementation
│ └── contracts/ # Smart contract system
├── wallet-frontend/ # Wallet web interface
├── wallet-backend/ # Wallet API server
│ ├── tests/ # Unit and integration tests
│ ├── logs/ # Application logs
│ └── API.md # API documentation
├── explorer/ # Blockchain explorer
├── landing-page/ # Landing page with ICO system
└── developer-portal/ # Developer portal and documentation
├── app/ # Next.js application
└── docs/ # API documentation and guides
- Python 3.8+
- Node.js 14+
- Stripe account for payment processing
- Redis (optional, for enhanced caching)
- Prometheus (optional, for metrics collection)
- Clone the repository:
git clone https://github.com/Bronzontech-Cloud/rootchain.git
cd rootchain
- Install Python dependencies:
# Create and activate a virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
Key package versions used in this project:
fastapi==0.104.1
uvicorn==0.24.0
python-dotenv==1.0.0
stripe==7.6.0
pydantic==2.5.2
prometheus-client==0.19.0
sentry-sdk[fastapi]==1.39.1
pytest==7.4.3
pytest-asyncio==0.21.1
httpx==0.25.2
python-multipart==0.0.6
requests==2.31.0
python-jose[cryptography]==3.3.0
redis==5.0.1
locust==2.19.1
mnemonic==0.20
hdwallet==2.2.1
If you encounter dependency conflicts:
- Use a fresh virtual environment:
python -m venv fresh_venv
source fresh_venv/bin/activate # On Windows use: fresh_venv\Scripts\activate
pip install --upgrade pip
- Install dependencies in order:
# Core dependencies first
pip install fastapi==0.68.1 uvicorn==0.15.0 pydantic==1.8.2
# Then install the rest
pip install -r requirements.txt
- If conflicts persist, you can force specific versions:
pip install --no-deps -r requirements.txt
pip install httpx==0.19.0 requests==2.26.0 --no-deps
- Set up environment variables:
Create a
.env
file in the root directory with the following:
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
API_KEY=your_api_key
SENTRY_DSN=your_sentry_dsn
ENVIRONMENT=development
CACHE_TYPE=redis # or memory
REDIS_HOST=localhost
REDIS_PORT=6379
- Start the blockchain node:
python blockchain/core/blockchain.py
- Start the wallet service:
cd wallet-backend
python app.py
- Start the explorer:
cd explorer
python app.py
- Start the landing page and ICO platform:
cd landing-page
python app.py
- Start the developer portal:
cd developer-portal
npm run dev
The services will be available at:
- Wallet: http://localhost:8000
- Explorer: http://localhost:8001
- Landing Page & ICO: http://localhost:8002
- Developer Portal: http://localhost:3000
- API Documentation: http://localhost:8000/api/docs
- Metrics: http://localhost:8001/metrics
- Create new wallets with 24-word mnemonic phrases
- Recover existing wallets
- Send and receive ROOT tokens
- View transaction history
- Purchase ROOT tokens with credit card
- Support for both mainnet and testnet
- Real-time balance updates
- Transaction fee estimation
- Gas price optimization
- Cross-network transfer prevention
RootChain supports various types of smart contracts:
- Token contracts (ERC-20 compatible)
- ICO contracts
- Custom contracts through the smart contract system
- Secure wallet generation with BIP39 mnemonic phrases
- Cryptographic transaction signing
- Decentralized consensus mechanism
- Secure smart contract execution
- API key authentication
- Rate limiting protection
- Input validation and sanitization
- Network-specific address validation
- Prometheus metrics integration
- Request latency tracking
- Error tracking with Sentry
- Structured JSON logging
- Log rotation and management
- Cache performance metrics
- Network health monitoring
- Gas price tracking
The wallet backend includes comprehensive testing:
# Run unit tests
pytest tests/test_wallet.py
# Run edge case tests
pytest tests/test_edge_cases.py
# Run load tests
locust -f tests/locustfile.py --host=http://localhost:8000
The RootChain Developer Portal provides a comprehensive suite of tools and resources for developers:
- API Key Management: Create and manage API keys for both mainnet and testnet
- Testnet Faucet: Request test tokens for development (up to 100 tROOT)
- Documentation: Comprehensive API reference and integration guides
- Code Examples: Ready-to-use code snippets in multiple languages
- Real-time Updates: Toast notifications and transaction status tracking
- Next.js 14
- React with TypeScript
- Tailwind CSS
- HeadlessUI components
- Real-time notifications
- Node.js 18.x or later
- npm or yarn
For detailed information about the developer portal, see the developer portal README.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Charles Bronzon - [email protected] Project Link: https://github.com/Bronzontech-Cloud/rootchain