# AgenticPlace Live — Deployment Guide ## What This Is ERC-8004 Agent Registry browser — 115k+ agents from 8004scan.io + 2,510 chains. PHP + MariaDB (MySQL) backend, client-side virtual-scroll frontend. Designed for shared hosting with Apache + PHP + MariaDB. ## File Structure ``` live/ browse.html — Agent browser UI (virtual scroll, 115k+) register.html — Agent registration + NFT minting minter.html — aORC NFT minter (chain/agent/custom) agents.html — Agent explorer (alternate view) style.css — Stylesheet (Inter + Fira Code, glass panels, green accent) app.js — Client logic (virtual scroll, pagination, scan control, feed) .htaccess — Apache clean URLs, gzip, caching, config protection DEPLOY.md — This file api/ config.php — MariaDB connection + CORS + helpers (EDIT THIS) setup.php — Creates schema (run once) import.php — Bulk import from CSV exports (115k agents + 2,510 chains) stats.php — Local counts + live 8004scan stats (cached 5min) agents.php — Paginated agent query (search, chain filter, sort) scan.php — Fetches N pages from 8004scan per call, upserts to DB download.php — Streams full agentslist as JSON download export.php — Export agents/chains as CSV/JSON/MD data/ agents-export.csv — 115,498 agents exported (25MB) allchains-export.csv — 2,510 chains with market data (444KB) ``` ## Pre-loaded Data - **agents**: 115,498 ERC-8004 agents across 15+ chains - **allchains**: 2,510 chains with native prices, market caps, RPCs, explorers --- ## Deploy — Step by Step ### 1. Create MariaDB Database In your hosting panel (e.g. cPanel, Plesk, hPanel): - Create a new MySQL/MariaDB database - Create a database user with full privileges on that database Example values: ``` Host: localhost Port: 3306 Database: yourusername_agenticplace User: yourusername_liveadmin Password: YourSecurePassword123! ``` ### 2. Edit config.php Open `api/config.php` and update the credentials: ```php define('DB_HOST', 'localhost'); define('DB_PORT', '3306'); define('DB_NAME', 'yourusername_agenticplace'); define('DB_USER', 'yourusername_liveadmin'); define('DB_PASS', 'YourSecurePassword123!'); ``` Or set environment variables on your hosting panel: ``` DB_HOST=localhost DB_PORT=3306 DB_NAME=yourusername_agenticplace DB_USER=yourusername_liveadmin DB_PASS=YourSecurePassword123! ``` ### 3. Upload Files Upload entire folder contents to your hosting via File Manager or FTP. If deploying to **root domain** (e.g. `agenticplace.pythai.net`): ``` public_html/ browse.html register.html minter.html style.css app.js .htaccess api/ config.php setup.php ... data/ agents-export.csv allchains-export.csv modules/ parsec-connect.js allchainft.ts ``` The existing `index.html` on the server will NOT be overwritten — the agent browser lives at `/browse`. ### 4. Create Database Schema Visit in browser: ``` https://yourdomain.com/api/setup?key=setup-agenticplace-2026 ``` Expected response: ```json { "success": true, "message": "Schema created successfully", "tables": ["agents", "allchains", "scan_status"] } ``` ### 5. Import Pre-loaded Data Import the 115,498 agents + 2,510 chains from the CSV exports. ``` https://yourdomain.com/api/import?key=setup-agenticplace-2026 ``` Expected response: ```json { "success": true, "imported_agents": 115498, "imported_chains": 2510, "errors": 0 } ``` This may take 1-5 minutes depending on server performance. ### 6. Verify Visit `https://yourdomain.com/browse` — you should see: - Header showing "115,498 agents indexed across all chains" - Sidebar stats: Local DB count, 8004scan remote count, chain count - Scan engine ring at 100% (complete) - Chain filter pills with per-chain counts - Paginated agent list with search ### 7. Auto-Sync The agent browser auto-syncs from 8004scan.io on an adaptive timer: - **Default:** every 60 seconds - **High activity:** every 15 seconds (when new agents are detected) - **Low activity:** every 2 minutes - **Catching up:** every 3 seconds (burst mode until synced) No manual action needed. The scan engine starts automatically when any visitor loads `/browse`. --- ## API Endpoints | Endpoint | Method | Purpose | |----------|--------|---------| | `/api/stats` | GET | Agent count, chain stats, scan status | | `/api/agents?page=1&limit=200&q=search&chain=8453` | GET | Paginated agents | | `/api/scan` | POST | Fetch batch from 8004scan into DB | | `/api/download` | GET | Stream full agent list as JSON | | `/api/export?table=agents&format=json` | GET | Export as CSV/JSON/MD | | `/api/setup?key=...` | GET | Create database schema (once) | | `/api/import?key=...` | GET | Bulk import from CSV (once) | ## Pages | URL | Page | |-----|------| | `/` | Landing page (WebGL, live stats, protocol overview) | | `/browse` | Agent registry browser (virtual scroll, 126k+) | | `/register` | Register agent as Algorand NFT (aNFT/dNFT/iNFT/THOT) | | `/minter` | aORC verification NFT minter | | `/agents` | Algorand agent explorer | | `/deploy` | Browser-based contract autodeployer | | `/docs` | Documentation hub | ## Requirements - Apache with `mod_rewrite` enabled - PHP 7.4+ with `pdo_mysql` extension (built-in on most hosting) - MariaDB 10.3+ or MySQL 5.7+ - No additional PHP modules needed ## Source Data - **8004scan API**: `https://www.8004scan.io/api/v1/public` - **Export date**: 2026-03-21 - **Agent count at export**: 115,498 - **Chain count at export**: 2,510