# Payfrit Infrastructure — Full Server Survey *Last updated: 2026-03-17 by @raj* ## Dev Server (dev.payfrit.com) - **Provider:** VPS (232GB disk, 7.7GB RAM) - **OS:** Ubuntu - **SSH:** ssh dev.payfrit.com (user: john, key-based auth, port 38291) - **VPN:** WireGuard (wg0) — 10.10.0.0/24, peer at 74.208.234.8:51820 - **Disk:** 13GB used / 232GB total (6%) - **RAM:** 1.5GB used / 7.7GB total - **Uptime:** stable (3+ days as of survey) ### Domains & Routing (nginx) | Domain | Backend | Root/Proxy | SSL | Notes | |--------|---------|-----------|-----|-------| | dev.payfrit.com | PHP-FPM + Lucee | /var/www/payfrit-api/ (PHP), proxy 8888 (CFML fallback) | Let's Encrypt | PHP for /api/, /cron/, /food/; Lucee for everything else | | dev.payfrit.com/food/ | PHP-FPM | /var/www/payfrit-food/ | (same cert) | Payfrit Food project | | god.payfrit.com | Lucee + PHP-FPM | /opt/lucee/.../god.payfrit.com/ | Let's Encrypt | VPN-only (10.10.0.0/24). PHP for .php files, Lucee for rest | | git.payfrit.com | Forgejo | proxy localhost:3000 | Let's Encrypt | Forgejo git hosting | | code.payfrit.com | **DELETED** | — | Cert still exists | Removed 2026-03-17 (stale project) | | status.payfrit.com | Uptime Kuma | proxy localhost:3001 | Let's Encrypt | Monitoring dashboard | | mm.payfrit.com | Mattermost | (separate server or config) | — | Team chat | | llm.payfrit.com | **DELETED** | — | Cert still exists | Removed 2026-03-17 | ### Listening Ports | Port | Service | Notes | |------|---------|-------| | 80 | nginx | HTTP (redirects to 443) | | 443 | nginx | HTTPS for all domains | | 38291 | sshd | SSH access | | 3000 | Forgejo | Git hosting | | 3001 | Uptime Kuma (node) | Status monitoring | | 8080 | **FREED** | Was code-server — removed 2026-03-17 | | 8888 | Lucee/Tomcat (java) | CFML engine — being phased out | | 8005 | Tomcat shutdown | Internal only | | 8009 | Tomcat AJP | Internal only | ### Services | Service | Status | Purpose | |---------|--------|---------| | nginx | running | Reverse proxy for all sites | | php8.3-fpm | running | PHP processing | | lucee_ctl (Tomcat) | running | CFML engine — only god mode + legacy endpoints | | forgejo | running | Git hosting (git.payfrit.com) | | code-server@john | **REMOVED** | Deleted 2026-03-17 | | uptime-kuma | running | Monitoring (status.payfrit.com) | | payfrit-bot-poller | running | Polls MM for bot messages, responds via Claude API | | payfrit-bot-worker | running | Picks BotTasks from DB, runs Claude Code CLI | | docker | running | Container runtime (no containers currently active) | | fail2ban | running | SSH brute-force protection | | WireGuard (wg0) | running | VPN tunnel to prod/office | ### Web Roots | Path | Contents | |------|----------| | /var/www/payfrit-api/ | Main Payfrit PHP API | | /var/www/payfrit-food/ | Payfrit Food (PHP API + portals + bot scripts) | | /var/www/bots/ | Central bot memory repo | | /var/www/dev.payfrit.com/ | (may be unused — check) | | /var/www/html/ | Default nginx root | | /opt/lucee/tomcat/webapps/ROOT/ | Lucee webapps (main CFML app, god, legacy) | ### Lucee Webapps (in /opt/lucee/tomcat/webapps/ROOT/) Main CFML ordering platform directories: admin, api, cfpayment, config, cron, css, downloads, fonts, hud, images, includes, js, kds, library, migrations, modules, php-api, playwright, portal, qa, receipt, styles, temp, twilio, uploads, verticals, _webhook Sub-sites: god.payfrit.com/ (admin panel) ### Cron Jobs (john's crontab) | Schedule | Command | Purpose | |----------|---------|---------| | * * * * * | /home/john/check-deploy.sh | Auto-deploy on git push (main site) | | * * * * * | /home/john/check-deploy-api.sh | Auto-deploy on git push (API) | | */5 * * * * | curl .../cron/expireTabs.php | Expire stale tabs every 5 min | | * * * * * | curl .../cron/expireStaleChats.php | Expire stale chats every 1 min | ### Databases (MySQL at 10.10.0.1) | Database | Purpose | |----------|---------| | payfrit | Main Payfrit (prod) — ordering, businesses, users, menus | | payfrit_dev | Main Payfrit (dev/staging) | | payfrit_food | Payfrit Food — products, sponsors, health scores, bot tasks | | gvoice | **DROPPED** — was legacy Google Voice, removed 2026-03-17 | - **Credentials:** payfrit_app / Bv9#hLs4Wq@zK8nR - **Access:** Via WireGuard VPN or from dev server localhost ## Prod Server (biz.payfrit.com) - **IP:** 74.208.234.8 (WireGuard peer) - **Purpose:** Production Payfrit ordering platform - **Stack:** Lucee/CFML + nginx (assumed same as dev pattern) - **Deploys:** scp files to dev, then copy into place ### Sites on Prod | Domain | Purpose | |--------|---------| | biz.payfrit.com | Payfrit ordering platform (businesses, menus, KDS, HUD) | | food.payfrit.com | Payfrit Food marketing site (WordPress) | ## Git Repos (git.payfrit.com/payfrit/) | Repo | Purpose | Local Path | Server Path | |------|---------|------------|-------------| | payfrit-food | Food: PHP API + portals + bot scripts | C:\dev\payfrit-food\ | /var/www/payfrit-food/ | | payfrit-api | Main PHP API | C:\dev\payfrit-api\ | /var/www/payfrit-api/ | | payfrit-biz | Biz portal frontend | C:\dev\payfrit-biz\ | — | | bots | Bot memory + infra docs | C:\dev\bots\ | /var/www/bots/ | | payfrit-user-android | Android customer app (Kotlin) | C:\dev\payfrit-android\ | — | | payfrit-works-android | Android worker app (Kotlin) | C:\dev\payfrit-works-android\ | — | | payfrit-beacon-android | Android beacon tool (Kotlin) | C:\dev\payfrit-beacon-android\ | — | | payfrit-food-ios | iOS food scanner (Swift) | — (Mac) | — | | payfrit-user-ios | iOS customer app (Swift) | — (Mac) | — | | payfrit-works-ios | iOS worker app (Swift) | — (Mac) | — | | payfrit-beacon-ios | iOS beacon tool (Swift) | — (Mac) | — | | payfrit-brand | Brand assets | C:\dev\payfrit-brand\ | — | | payfrit-theme | Main WP theme | C:\dev\payfrit-theme\ | — | | payfrit-pads-theme | Pads WP theme | C:\dev\payfrit-pads-theme\ | — | | payfrit-god | God mode admin panel | — | /opt/lucee/.../god.payfrit.com/ | | payfrit-help | Help desk | — | — | | payfrit-wp | WordPress config | — | — | | payfrit-work | Work/tasks module | — | — | | addmonths/app | Add Months Flutter app | C:\dev\add_months\ | — | ## Deploy Commands ```bash # Payfrit Food git push origin main && ssh dev.payfrit.com "sudo git -C /var/www/payfrit-food pull origin main" # Payfrit API git push origin main && ssh dev.payfrit.com "sudo git -C /var/www/payfrit-api pull origin main" # Biz frontend (prod) scp file dev.payfrit.com:/tmp/ && ssh dev.payfrit.com "sudo cp /tmp/file /var/www/biz.payfrit.com/file" # Bots repo git push origin main && ssh dev.payfrit.com "sudo git -C /var/www/bots pull origin main" ``` ## Key URLs | URL | Purpose | |-----|---------| | https://dev.payfrit.com | Dev main site (CFML + PHP) | | https://dev.payfrit.com/food/ | Dev food portal (PHP) | | https://biz.payfrit.com | Prod ordering platform | | https://food.payfrit.com | Food marketing (WordPress) | | https://god.payfrit.com | Admin dashboard (VPN-only) | | https://git.payfrit.com | Forgejo git hosting | | https://mm.payfrit.com | Mattermost team chat | | https://code.payfrit.com | Web VS Code (not actively used) | | https://status.payfrit.com | Uptime Kuma monitoring | ## Migration Status (2026-03-17) - [x] llm.payfrit.com: DELETED - [x] nginx duplicate configs cleaned up (dev.payfrit.com.bak, god.payfrit.com.bak) - [ ] 6 CFM API endpoints: being migrated to PHP by @mike (almost done) - [ ] god.payfrit.com: staying on Lucee for now (VPN-only, ~30 CFM endpoints) - [x] code-server: stopped, disabled, nginx config removed (2026-03-17) - [x] gvoice database: dropped (was legacy, confirmed by John) - **Goal:** shut down Lucee once all CFM endpoints are migrated