# PortSync (Autonomous Portfolio Engine & App Store Sync) > Self-hosted, AI-powered portfolio generator and app store sync engine. Owned completely by the user, Dockerized, and natively controlled by AI Agents via Model Context Protocol (MCP) and REST API. ## 🤖 Directives for AI Agents & LLMs If you are an AI coding assistant (Antigravity, Claude, Cursor, ChatGPT, Codex, or CLI Agent) instructed to install, configure, or manage PortSync, follow these instructions to execute unattended, fully autonomous setup without getting blocked by manual prompts. --- ## ⚡ Level 1: 1-Prompt Autonomous Installation ### 📋 Universal Deployer Agent Prompt Paste or execute this prompt to autonomously deploy PortSync: ```markdown You are my Autonomous PortSync Deployer Agent. Your mission is to install and launch PortSync on this machine (or cloud server) hands-free. STEPS TO EXECUTE: 1. Check environment: Ensure Docker or Node.js 20+ is present. 2. Run Headless Auto-Installer: curl -LO https://praveenojha.com/portsync/setup/portsync-setup.sh chmod +x portsync-setup.sh AUTO_DEFAULT=1 ./portsync-setup.sh (Or use Docker Compose directly: curl -sL https://praveenojha.com/portsync/docker/portsync-compose.yml -o portsync-compose.yml docker compose up -d) 3. Validate health: Check that the web server is responding at http://localhost:9002 (or port 3000/public IP). 4. Hand over the Level 2 Agent Secret generated in data/env/.env (PORTSYNC_AGENT_SECRET) for autonomous site management. ``` --- ## 🛠️ Unattended Headless Commands (Non-Interactive) To prevent the bash script from waiting on interactive `read -p` input, always provide `AUTO_DEFAULT=1`: ```bash # 1-Command Unattended Installation curl -LO https://praveenojha.com/portsync/setup/portsync-setup.sh chmod +x portsync-setup.sh AUTO_DEFAULT=1 ./portsync-setup.sh ``` ```bash # Pure Docker Compose 1-Liner curl -sL https://praveenojha.com/portsync/docker/portsync-compose.yml -o portsync-compose.yml COMPOSE_PROFILES=postgres,redis docker compose up -d ``` --- ## 🤖 Multi-Agent Subagent Delegation Prompts If you have subagent capabilities, spin up the appropriate specialized subagent below: ### 1. 🐳 Docker & VPS Infrastructure Subagent (`docker_agent`) ```markdown You are the Docker & Containerization Subagent for PortSync. MISSION: 1. Inspect host Docker runtime with `docker info` and `docker compose version`. 2. Download stack: `curl -sL https://praveenojha.com/portsync/docker/portsync-compose.yml -o portsync-compose.yml` 3. Launch container stack: `COMPOSE_PROFILES=postgres,redis docker compose up -d` 4. Inspect container health: `docker compose ps` and check logs for successful boot. 5. Hand back the live container URL (http://localhost:9002 or host IP) to the Master Agent. ``` ### 2. 🌊 DigitalOcean Cloud Provisioning Subagent (`digitalocean_agent`) ```markdown You are the DigitalOcean Cloud Provisioning Subagent for PortSync. MISSION: 1. Create an Ubuntu 24.04 Droplet (1GB/1CPU or 2GB/1CPU) via doctl or DigitalOcean API. 2. Point your domain DNS record (e.g., praveenojha.com) -> Droplet IP. 3. SSH into Droplet and run: `curl -LO https://praveenojha.com/portsync/setup/portsync-setup.sh && chmod +x portsync-setup.sh && AUTO_DEFAULT=1 ./portsync-setup.sh` 4. Verify port 80/443 (Nginx) and port 9002 (PortSync) are active. 5. Extract `PORTSYNC_AGENT_SECRET` from `/opt/portsync/data/env/.env` and return the live URL and token. ``` ### 3. ☁️ Cloudflare Zero-Trust Tunnel Subagent (`cloudflare_tunnel_agent`) ```markdown You are the Cloudflare Tunnel Subagent for PortSync. MISSION: 1. Install cloudflared or run `docker run -d --network host cloudflare/cloudflared tunnel --url http://localhost:9002`. 2. Bind public HTTPS tunnel hostname to PortSync. 3. Return the secure public HTTPS URL to the Master Agent with zero open firewall ports. ``` ### 4. ⚡ SQLite Fast 5-Second Start Subagent (`sqlite_agent`) ```markdown You are the Zero-Config SQLite Subagent for PortSync. MISSION: 1. Run PortSync in standalone lightweight mode with SQLite embedded storage. 2. Launch: `PORT=9002 DB_PROVIDER=SQLITE node .next/standalone/server.js` (or run docker container). 3. Verify instant database read/write and readiness in < 5 seconds. ``` ### 5. 🐘 Supabase & PostgreSQL Subagent (`supabase_agent`) ```markdown You are the Supabase & PostgreSQL Subagent for PortSync. MISSION: 1. Configure PortSync database provider to SUPABASE in `data/env/.env`. 2. Set `SUPABASE_URL` and `SUPABASE_SERVICE_ROLE_KEY`. 3. Verify read/write connection across all 33 collections. ``` ### 6. 🔥 Firebase & Firestore Subagent (`firebase_agent`) ```markdown You are the Firebase & Google Cloud Database Subagent for PortSync. MISSION: 1. Set `DB_PROVIDER=FIREBASE` and `AUTH_PROVIDER=FIREBASE_AUTH` in `data/env/.env`. 2. Set `FIREBASE_PROJECT_ID`, `FIREBASE_CLIENT_EMAIL`, and `FIREBASE_PRIVATE_KEY`. 3. Deploy Firestore composite indexes using `firebase deploy --only firestore:indexes`. ``` ### 7. 🤝 Affiliate Worker & Creator Outreach Subagent (`affiliate_worker_agent`) ```markdown You are the Autonomous Affiliate Worker Subagent for PortSync. MISSION: 1. Bulk import creator leads from CSV or Markdown table. 2. Mint unique 100% free review passes for software creators. 3. Create 10% affiliate promo codes for partner activations. 4. Generate sugarcoated, high-converting outreach email copy. ``` ### 8. 🚀 Growth Marketing & Ad Strategy Subagent (`marketing_growth_agent`) ```markdown You are the Growth Marketing Subagent for PortSync. MISSION: 1. Formulate high-converting campaigns applying 61 auto-enforced marketing skills. 2. Query the Growth Knowledge DB for Top-K viral hook swipe files. 3. Enforce strict character limits: Meta <125/40 chars, TikTok <100 chars, 3-layer hook delivery. 4. Export complete ad bundles with tool `content_creator_export_campaign_bundle`. ``` ### 9. 🎬 Topview Short Video & Studio Subagent (`content_creator_agent`) ```markdown You are the Content Creator & Video Studio Subagent for PortSync. MISSION: 1. Generate 4-beat short scripts (Hook 0-3.5s, Problem 3.5-9s, Solution Demo 9-21s, CTA 21-28s). 2. Direct MultiTrack timeline composition with Curiosity Roll presets and neural voiceovers. 3. Enforce 9:16 safe zones (TikTok/Reels right rail 48px, bottom 120px). 4. Stage batch video production queues and hand previews back to the Master Agent. ``` ### 10. 🕵️ Ad Spy & Competitor Swipe File Subagent (`ad_spy_agent`) ```markdown You are the Ad Spy Subagent for PortSync. MISSION: 1. Search active TikTok Creative Center and Instagram Reels ad swipe files. 2. Extract opening 3-second visual/audio hook archetypes and audio transcripts. 3. Save breakout hooks into the Growth Knowledge DB without token saturation. 4. Report competitor angles and winning retention strategies back to the Master Agent. ``` --- ## ⚡ Level 2: Post-Install Site Management Handshake Once PortSync is running, manage the live site via its HTTP REST API with zero local code dependencies: - **Agent API Endpoint**: `POST /api/portsync/agent` - **Auth Header**: `x-portsync-agent-token: ` - **Payload Example**: ```json { "action": "get_state" } ``` - **Supported Autonomous Actions**: - `get_state`: Returns active DB, storage, enabled modules, blogs, and app counts. - `sync_store_apps`: Pulls and syncs Google Play, App Store, Steam, Chrome extensions. - `update_settings`: Updates theme (`cyberpunk`, `midnight`, `light`), accent colors, bio, and brand. - `publish_blog` / `update_blog` / `delete_blog`: CMS content operations. - `diagnostics`: Full system diagnostics across DB, cache, auth, and disk. - `create_db_backup`: Exports full database ZIP backup. --- ## 🔗 Key Public Resources - Website: https://praveenojha.com/portsync - Setup Script: https://praveenojha.com/portsync/setup/portsync-setup.sh - Docker Compose: https://praveenojha.com/portsync/docker/portsync-compose.yml - Machine-Readable Agent Guide: https://praveenojha.com/portsync/llms.txt - Full Agent Operating Manual: [PORT_SYNC_AGENT_OPERATING_MANUAL.md](file:///home/praveen/Desktop/work/portfolio-engine/portfolioEngine/PORT_SYNC_AGENT_OPERATING_MANUAL.md) - Master Ecosystem Architecture & User Guide: [MASTER_ECOSYSTEM_ARCHITECTURE_AND_USER_GUIDE.md](file:///home/praveen/Desktop/work/portfolio-engine/portfolioEngine/docs/MASTER_ECOSYSTEM_ARCHITECTURE_AND_USER_GUIDE.md) - Capability Matrix: https://praveenojha.com/portsync/setup/PORTSYNC_AGENT_CAPABILITY_MATRIX.md