Automated Filecoin PDP deal creation and performance monitoring system
An intelligent automation system for creating and monitoring PDP deals on the Filecoin network. Features automated deal creation, CDN performance testing, comprehensive metrics tracking, and a modern web dashboard.
- Automated Deal Creation - Scheduled storage deals across multiple providers
- Performance Monitoring - Real-time metrics for deals and retrievals
- Add-ons Testing - FWSS add-ons testing and comparison with provider performance
- Analytics Dashboard - Modern React UI with charts and statistics
- Synapse SDK - Seamless Filecoin storage operations
- Smart Contracts - Automated wallet management and service approvals
- Node.js 18+
- PostgreSQL
- pnpm
- Filecoin wallet with tokens
# Clone repository
git clone https://github.com/FilOzone/dealbot.git
cd dealbot
# Install dependencies
pnpm install
# Configure environment
cp .env.example .env
# Edit .env with your wallet and database credentials# Development
pnpm start
# Production
pnpm start:prodThe project includes a React dashboard for visualizing metrics and monitoring performance.
# Terminal 1: Backend
pnpm start
# Terminal 2: Frontend
pnpm dev:webVisit http://localhost:5173 to view the dashboard.
# Build frontend
pnpm build:web
# Start server (serves both API and UI)
pnpm start:prodComplete API documentation is available via Swagger UI:
Production: https://dealbot.fwss.io/api
Local: http://localhost:3000/api (when running locally)
Key environment variables:
| Variable | Description | Default |
|---|---|---|
WALLET_ADDRESS |
Filecoin wallet address | - |
WALLET_PRIVATE_KEY |
Wallet private key | - |
DATABASE_HOST |
PostgreSQL host | - |
DATABASE_PORT |
PostgreSQL port | - |
DATABASE_USER |
PostgreSQL user | - |
DATABASE_PASSWORD |
PostgreSQL password | - |
DATABASE_NAME |
PostgreSQL database name | - |
DEALBOT_PORT |
Application port | 3000 |
DEAL_INTERVAL_SECONDS |
Deal creation interval | 1800 |
RETRIEVAL_INTERVAL_SECONDS |
Retrieval test interval | 3600 |
See .env.example for complete configuration options.
src/
├── deal/ # Deal creation and management
├── retrieval/ # Storage retrieval testing
├── metrics/ # Performance metrics and analytics
├── scheduler/ # Automated task scheduling
├── wallet-sdk/ # Wallet and contract operations
└── web/ # React dashboard
The system tracks comprehensive metrics:
- Deal Performance - Success rates, latencies
- Retrieval Performance - TTFB, latency, success rates by service type (cdn)
- Provider Statistics - Per-provider performance metrics
- Network Health - Overall system health and trends
Access metrics via the web dashboard or API endpoints.
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run formatting and linting checks
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project uses Biome for formatting and linting. Before submitting a PR:
# Format code
pnpm format
# Check formatting (CI mode)
pnpm format:check
# Lint code
pnpm lint
# Check linting (CI mode)
pnpm lint:check
# Run both format and lint checks
pnpm check
# Run CI checks (same as CI pipeline)
pnpm check:ciBiome is configured to handle TypeScript, React/JSX, and Tailwind CSS with project-specific rules for NestJS decorators and testing files.
Dual-licensed: MIT, Apache Software License v2 by way of the Permissive License Stack.