React frontend and predictive modeling backend for the DeFi Rug Pull Detection System.
- Node.js 16+ and npm/yarn
- Docker Engine 20.10+ and Docker Compose v2+
- Python 3.10+ (for local non-containerized backend testing)
Before running containers locally, copy .env.example to .env:
cp .env.example .envEnsure UID and GID match your local host user to prevent permission conflicts on bind mounts:
echo "UID=$(id -u)" >> .env
echo "GID=$(id -g)" >> .envTo ensure seamless execution without root workarounds (sudo), follow these setup steps for native Linux distributions (specifically Fedora Workstation):
-
Enable and Start Docker Daemon:
sudo systemctl enable --now docker -
Configure Non-Root Docker Socket Access: Add your host user account to the
dockergroup so daemon operations do not requiresudo:sudo usermod -aG docker $USER newgrp docker -
Verify Daemon Socket Permissions: Ensure
/var/run/docker.sockhas appropriate read/write permissions for thedockergroup:ls -la /var/run/docker.sock
If required on certain runner environments, set socket permissions explicitly:
sudo chmod 666 /var/run/docker.sock
-
SELinux Bind Mount Permissions (Fedora Workstation): Fedora Workstation runs SELinux in enforcing mode by default. Volumes mounted in
docker-compose.ymlinclude the:zflag (e.g.,./backend:/app/backend:z) to automatically configure shared SELinux labels (svirt_sandbox_file_t), allowing containers read/write access without requiringsetenforce 0or elevated privileges.
Start all services in detached or interactive mode:
docker compose upTo run test suites via Docker Compose:
docker compose run --rm backend
docker compose run --rm frontendcd frontend
npm installnpm startThe app will open at http://localhost:3000
npm run build- Token Analyzer: Input token metrics and get instant risk analysis
- Risk Dashboard: View analysis history with visual risk indicators
- Real-time Updates: Connects to backend API
- Modern UI: Built with TailwindCSS and Lucide icons
POST /api/analyze- Analyze a single tokenPOST /api/batch-analyze- Analyze multiple tokensGET /health- Health check
- React 18
- TailwindCSS
- Lucide React (icons)
- Axios (HTTP client)
- Recharts (charts)