AlpacApps Architecture

A zero-server property management system. Five services, one property, no backend code.

Claude Code
Supabase
GitHub Pages
Alpaca Mac
Hostinger
Residents / Admins / Public HTTPS GH GitHub Pages Static HTML/JS/CSS hosting alpacaplayhouse.com /spaces/ /residents/ /admin/ /auth/ API calls SB Supabase Backend-as-a-Service (database, auth, storage, edge functions) PostgreSQL Auth Storage Edge Functions CC Claude Code AI dev agent: writes code, fixes bugs, deploys, runs SQL Oracle Cloud (free tier) git push migrations Mac Alpaca Mac On-prem home server. Bridges LAN-only smart home devices Sonos go2rtc HomeA MusicA Tailscale VPN HG Hostinger VPS Reverse proxy + tunneling. Routes cloud traffic to LAN Caddy Tailscale PAI-Claw Edge Fn proxy Tailscale mesh External APIs Stripe Resend Tesla Telnyx SignWell Govee Gemini Vapi Nest Brave LG ThinQ Anova webhooks + API calls ZERO SERVER ARCHITECTURE Browser talks directly to Supabase RLS enforces security at DB level
CC

Claude Code

AI Developer

Autonomous AI agent that writes code, fixes bugs, runs database migrations, and deploys changes directly to production. Runs on Oracle Cloud free tier as a systemd service.

Bug Scout Feature Builder SQL migrations git push to main
SB

Supabase

Backend

The entire backend. PostgreSQL database with row-level security, auth, file storage, and 38+ edge functions that handle payments, webhooks, device control, and the PAI chatbot.

PostgreSQL Auth / RLS Storage Edge Functions Realtime
GH

GitHub Pages

Frontend

Serves the static HTML/JS/CSS website. No build step needed. Push to main branch and it's live at alpacaplayhouse.com within seconds. CI auto-bumps version on each deploy.

Vanilla HTML/JS Tailwind v4 Capacitor 8 Auto-deploy
Mac

Alpaca Mac

LAN Bridge

Always-on Mac at the property. Bridges cloud requests to LAN-only devices (Sonos speakers, security cameras, smart lights). Connected via Tailscale private mesh network.

Sonos HTTP API go2rtc (cameras) Home Assistant Music Assistant
HG

Hostinger VPS

Proxy

Cloud-side endpoint with a static IP. Runs Caddy as a reverse proxy, routing requests through Tailscale to reach Alpaca Mac's LAN services. Also hosts the PAI Discord bridge.

Caddy proxy Tailscale node PAI-Claw (Discord)

How a request flows

01
Browser
User loads page from GitHub Pages
02
Supabase
JS calls Supabase API (auth + data)
03
Edge Function
Sensitive ops run server-side
04
Hostinger
Proxies to LAN via Tailscale
05
Alpaca Mac
Controls Sonos, cameras, lights