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
This is a monorepo containing two separate applications:
dealbot/
├── backend/ # NestJS API server (Port 8080)
│ ├── 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
│ └── README.md # Backend-specific documentation
└── web/ # React + Vite dashboard (Port 5173)
├── src/
└── README.md # Frontend-specific documentation
- Node.js 20+
- pnpm (package manager)
- PostgreSQL database
- Filecoin wallet with tokens (for Calibration or Mainnet)
git clone https://github.com/FilOzone/dealbot.git
cd dealbot# Install dependencies
pnpm installcd apps/backend
cp .env.example .env
# Edit .env with your database credentials, wallet info, etc.Key variables to configure:
DATABASE_*- PostgreSQL connection detailsWALLET_ADDRESS&WALLET_PRIVATE_KEY- Your Filecoin walletNETWORK-calibrationormainnetDEALBOT_PORT- Backend server port (default:8080)
See backend/.env.example for all options.
cd ../web
cp .env.example .env
# Update VITE_API_BASE_URL if you changed DEALBOT_PORTDefault: VITE_API_BASE_URL=http://localhost:8080
pnpm start:devBackend runs at: http://localhost:8080 ( or at DEALBOT_PORT environment variable)
Frontend runs at: http://localhost:5173
Open two terminal windows:
cd apps/backend
pnpm start:dev # Development with hot-reloadBackend runs at: http://localhost:8080
API Docs (Swagger): http://localhost:8080/api
cd apps/web
pnpm dev # Development serverFrontend runs at: http://localhost:5173
# Build
pnpm buildpnpm start:prodOpen two terminal windows:
# Terminal 1: Backend (API Server)
cd apps/backend
pnpm start:prod
# Terminal 2: Frontend (preview)
cd apps/web
pnpm previewComplete API documentation is available via Swagger UI:
- Production: https://dealbot.fwss.io/api
- Local:
http://localhost:8080/api(when running locally)
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
Both backend/ and web/ use Biome for formatting and linting. Before submitting a PR, run checks in both directories:
# In backend/ or web/ directory
pnpm format # Format code
pnpm format:check # Check formatting (CI mode)
pnpm lint # Lint code
pnpm lint:check # Check linting (CI mode)
pnpm check # Run both format and lint checks
pnpm check:ci # Run CI checks (same as CI pipeline)Biome 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.