airmicrodrip / DEPLOY.md
josephrw's picture
Upload folder using huggingface_hub
e9d4f6a verified
|
Raw
History Blame Contribute Delete
3.28 kB
# AirMicroDrip Deployment Guide
## Prerequisites
- Hugging Face account
- HF_TOKEN environment variable set
## Quick Deploy
```bash
cd airmicrodrip
export HF_TOKEN=your_hf_token_here
bash deploy.sh
```
## Manual Deploy (Git Push)
```bash
cd airmicrodrip
export HF_TOKEN=your_hf_token_here
export HF_SPACE_ID=josephrw/membra-airmicrodrip
# Initialize git
git init
git config user.email "deploy@membra.ai"
git config user.name "MEMBRA Deploy"
git add -A
git commit -m "Deploy AirMicroDrip"
# Push to Hugging Face
git push "https://$HF_TOKEN@huggingface.co/spaces/$HF_SPACE_ID" main --force
```
## Runtime Configuration
The app does not require API keys or Space secrets at runtime. Optional overrides can be added in HF Space Settings:
| Variable | Description | Example |
|----------|-------------|---------|
| `TOKEN_MINT` | Override the default public token mint | `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` |
| `INFERENCE_API_URL` | Optional no-key local/Ollama-compatible LLM endpoint for live benchmarking | `http://localhost:11434` |
| `SOLANA_RPC_URL` | Override the public Solana RPC endpoint | `https://api.mainnet-beta.solana.com` |
## Data Sources
All data is fetched from real APIs β€” no mocks, no simulations:
- **Trading**: Gate.io Futures API (real-time prices, funding rates)
- **Slippage**: DexScreener API (real DEX volume/liquidity data)
- **Holders**: Solana RPC `getTokenLargestAccounts` (real on-chain holder data)
- **LLM Liquidity**: Real HTTP inference benchmark (Ollama or OpenAI-compatible)
- **Liquidation**: Gate.io prices + local position DB
## Architecture
```
HF Space (Docker)
└── Flask API
β”œβ”€β”€ /api/slippage/stats β†’ DexScreener API
β”œβ”€β”€ /api/holders/stats β†’ Solana RPC
β”œβ”€β”€ /api/liquidity/stats β†’ Inference benchmark
β”œβ”€β”€ /api/trading/stats β†’ Gate.io API
β”œβ”€β”€ /api/funding/stats β†’ Gate.io API
β”œβ”€β”€ /api/liquidation/stats β†’ Gate.io + local DB
β”œβ”€β”€ /api/token-launch/status β†’ Merkle launch manifest
β”œβ”€β”€ /api/token-launch/prepare β†’ Rebuild unsigned launch tree
β”œβ”€β”€ /api/token-launch/pool-setup β†’ Unsigned mint/pool setup plan
β”œβ”€β”€ /api/collateral/scan β†’ Background HF account file/LOC collateral scan
β”œβ”€β”€ /api/collateral/status β†’ Latest collateral root and evidence
└── / β†’ Dashboard UI
```
## Verification
After deployment:
1. Visit `https://huggingface.co/spaces/YOUR_SPACE`
2. Check System Status shows real backend states for trading, funding, liquidation, holders, and slippage
3. Confirm the header says "No-key backend"
4. Confirm "One Merkle Tree Token Launch" shows `unsigned_ready`
5. LLM liquidity should show `local_only` until a real local endpoint is connected
## Troubleshooting
- **Holder/slippage waiting**: Public Solana or DexScreener data has not returned yet; no key is required
- **LLM liquidity local-only**: This is expected without a real local inference endpoint
- **Merkle launch unsigned_ready**: The root and proofs are prepared; SPL mint/pool creation still requires a real wallet signature
- **"Gate.io API unreachable"**: Check network connectivity; app uses fallback only if API fails