# 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