*.apps.poofc.comClass-level workflow for building, deploying, verifying, and operating applications on Alex's shared VPS.
For this user, an approved application build normally continues automatically through PM2, nginx/TLS, launcher/control-plane registration, feature-level smoke, and a verified public URL. Do not stop at “build passed” or introduce a second deployment gate unless the user explicitly requested build-only work.
Keep separate authorization only for materially different effects such as spending money, submitting fulfillment, sending messages, activating ads, or destructive infrastructure changes.
A filesystem build is intermediate state. A PM2 row marked online is also insufficient. Mark an application live only after its HTTPS URL, process, port ownership, nginx route, health check, and representative user flow are verified. Then immediately publish URL/runtime metadata back to Canvas or the relevant control plane.
See references/automatic-build-to-live-deployment.md for the detailed build-to-live contract and the PM2 ESM guard, browser-forbidden-port, scoped-sudo site-install, and feature-smoke pitfalls.
When the user explicitly asks to “finish,” “push it through,” or go faster after a long implementation, treat that as a scope-freeze signal—not a stop signal and not permission for another broad review cycle.
When Alex explicitly says to stay lean and focused, treat that as an execution constraint for the rest of the release: one root-cause trace, one narrow regression, one production build, and one real acceptance probe. Do not add another broad audit, independent review, repeated full suite, or speculative hardening unless a new security/data-integrity blocker requires it. Report built/deployed/blocked first and keep progress commentary short.
For a mixed release spanning ordinary PM2 apps and stateful tenant appliances, compress the finish line by runtime class. For each standalone app: take an online SQLite backup when migrations are involved, build once, restart only its PM2 process, then verify public service identity and one defining read-only endpoint. For the appliance: build an immutable exact-commit image, run one identity-bound disposable boot/runtime canary, clean it completely, then update and re-read the controller's future-image selector. Treat existing tenant containers as a separate rollout axis; never imply selector promotion upgraded them, and never mass-recreate unnamed tenants merely to make the overall release report say “live.”
For signed onboarding that crosses from an app database into a separate agent runtime, visible transcript import is not enough: verify that the first live agent turn receives the imported context. See references/signed-seed-runtime-context-continuity.md.
/home/avalon/apps/<slug>.<slug>.apps.poofc.com.nginx -t before every reload./home/avalon/apps/app-launcher/apps.json and update shared PM2 metadata in /home/avalon/apps/ecosystem.config.js where applicable.Read before writing:
AGENTS.md, CLAUDE.md);pm2 jlist;Confirm the intended slug, hostname, runtime, health path, authentication model, persistent data path, and external service dependencies.
Cross-check PM2, launcher metadata, ecosystem configuration, and live sockets. A numerically free port may still be browser-forbidden; validate candidate ports with Node/browser fetch, not curl alone. Port 4045 is a known WHATWG-forbidden example.
Treat this as a reservation check, not permanent ownership: shared VPS state can change during a long build. Re-run the live socket/owner check immediately before PM2 start. After startup, require the listener PID to belong to the intended app and validate a service-specific health identity—not merely status 200—before continuing to nginx. Only then record the selected port in PM2 and launcher metadata; never reuse another app's port.
command -v node / readlink -f) before writing PM2 metadata; do not hardcode an assumed NVM path even when the version is known..env or approved vault-backed injection path.node_args: '--env-file=.env' is acceptable, but avoid duplicating build-only variables that make tools such as Vite warn.:: or loopback as appropriate and provide a machine-readable health endpoint.For ESM applications imported by tests, do not assume a process.argv[1] direct-execution guard will start under PM2. Use an explicit production start environment flag and verify the socket actually binds.
Start/restart only the intended PM2 app, then verify:
Do not accept a homepage-only smoke when the product's primary feature depends on another API.
Prepare the site config in /tmp. Before activation, check sudo -n -l and directory permissions. Passwordless access to nginx, certbot, and systemctl reload nginx does not imply permission to create a new site file or symlink.
Activation order:
nginx -t;nginx -t again;If site-file installation is blocked, leave the PM2 app healthy, retain the prepared /tmp config, state the one missing privileged action precisely, and never claim the URL is live.
After public verification:
/, internal labs, admin consoles, APIs) rather than projecting only the root app; verify authentication and non-spending workflows for private surfaces;built from live and avoid duplicate records on retry.For provider-backed creative labs, prefill safe adapter/model/schema/cost defaults, validate live read-only provider schemas, and verify through signed contract issuance. Keep the paid generation call as an explicit spending boundary unless the user authorized it. See references/production-design-lab-readiness.md.
Run:
Report the real URL and concrete evidence. Mention genuine remaining integration gaps; do not describe a partial deployment as complete.
PORT value can be stale or shared while the process actually listens on a service-specific variable such as SPAWN_PORT. Re-check immediately before start, attribute the listening socket to the intended PM2 PID, inspect the service-specific runtime port, and require a service-specific health body. A 200 response from an unrelated app is evidence of collision or a bad probe—not successful startup. Stop the restarting PM2 process and move to a newly verified port when ownership is wrong.online can coexist with no listener when an ESM main guard stays false. The inverse is also dangerous: killing a foreground npm start or shell wrapper can leave its child Node process owning the port. PM2 then restart-loops while local health still returns 200 from the stale build. Before PM2 start, inspect the live socket PID; after start, require that PID to equal the intended PM2 process PID and confirm the restart count stabilizes. Terminate only the proven stale child, restart the intended PM2 app, then repeat service-specific health identity checks.nginx -t fails only because the deployment user cannot read an unrelated existing enabled-site file, do not reload nginx and do not convert the failure into a claim that configuration is valid. Report the config test as permission-blocked, record that routing was unchanged, and verify exact local/public service identity plus critical public asset hashes. If this release did change routing, permission-blocked nginx -t remains a hard deployment blocker.-k over hostname-valid HTTPS. In self-service provisioning, never mark a tenant ready by constructing its intended URL; readiness requires the real tunnel/route, exact vhost identity, hostname-valid TLS, and public HTTPS proof. See references/self-service-tenant-route-publishing.md.references/chat-voice-input-managed-transcription.md..env; even a one-line replacement can echo adjacent credentials in the tool's unified diff. Use an atomic key-specific updater (small Python/config-setter script) that reads and rewrites the file without printing contents, then verify only the key name plus a redacted/configured marker or the expected non-secret image/tag value. Restart PM2 with deterministic env loading and --update-env, and verify the effective key from pm2 jlist without dumping the rest of the environment.--update-env when appropriate.origin. Do not push into the template checkout; create or configure the proper remote.references/cross-repository-appliance-release-contract.md.
For dual-runtime releases, track central, immutable image, controller selector, and existing-tenant rollout as separate states. A healthy central commit plus a background image build is partially deployed, not complete. Wait for the tracked build's terminal status, record image ID, run identity health and signed-exchange canaries, then update/restart/health-check the controller selector. Only recreate a named existing tenant when explicitly in scope, preserving mounted state, network, route, labels, identity, and rollback image; never imply a future-image selector updated existing containers.references/signed-handoff-appliance-release-canary.md.Unknown or missing tiers must fail closed on central-passkey tenants; do not synthesize product Admin from a legacy local owner/admin role, configured password, absent durable access row, or old cookie. Disable legacy local login when central identity is authoritative. Fresh restricted-tier bootstrap must skip seeders/planners until signed access arrives and must refuse to adopt arbitrary existing businesses or referenced Portfolio profiles/threads/jobs rather than deleting or hiding them.
Before release, inventory every human route, agent/key-minting route, module router, entity-ID action, null/default scope, and request-body project field. Authorization must derive from signed/durable tier plus persisted entity ownership, never UI hiding or caller-supplied IDs. Inject foreign business/entities and referenced Portfolio state into a disposable database and prove list filtering plus direct-ID denial. Wait for every required asynchronous security review before default-branch integration or release-candidate labeling; a narrow pass does not override a broader pending audit.
Verify each tier through the real server entrypoint plus read-only durable-state assertions, then rerun every gate after post-review hardening. Build the tenant image from an exact reviewed commit archive, retain build logs on failure, and resolve build arguments from the controller-owned secret/config source rather than assuming the current container's baked environment contains the effective value. See references/versioned-entitlement-tenant-rollouts.md and coding-quality-workflow → references/security-sensitive-entitlement-review-gates.md.
Use the supporting files for specialized procedures:
references/automatic-build-to-live-deployment.md — automatic completion policy and session-derived deployment pitfalls.references/production-design-lab-readiness.md — authenticated secondary surfaces, live provider-schema normalization, cost-capped generation, and print-resolution readiness.references/safe-nginx-port-activation.md — safe activation of an existing PM2 port.references/scoped-sudo-nginx-certbot.md — narrowly scoped passwordless sudo.references/nginx-certbot-sudo-and-source-app-smoke.md — source deployments, certbot, and static-asset smoke.references/source-docker-app-pm2-deployment.md — Docker-first apps deployed from source under PM2.references/source-synchronized-react-flow-deployment.md — source-synchronized React Flow/Vite embeds.references/tenant-appliance-control-plane-canaries.md — stateful tenant/control-plane canaries.references/signed-handoff-appliance-release-canary.md — fail-closed verifier-key image builds, controller-owned public-key derivation, real signed-exchange canaries, and state-preserving repair of affected fresh tenants.references/signed-seed-runtime-context-continuity.md — prove imported onboarding state reaches the live agent session, and repair a named tenant without deleting its project or visible transcript.references/chat-voice-input-managed-transcription.md — inventory every chat surface; port the record/stop/transcribing contract across authenticated tenant and pre-passkey onboarding chats; bound each transcription API; provision managed keys; and safely reconcile existing runtimes.references/cross-repository-appliance-release-contract.md — product-image/controller mount parity, exact-commit artifacts, worker rollout, backup/rollback, and fail-closed shadow routing.references/tenant-developer-workspaces-and-hosting-planes.md — managed shared/dedicated/BYO hosting, workspace layout, provider adapters, resource entitlements, and Developer broker acceptance.references/live-sqlite-application-restore-rehearsals.md — live SQLite migration and restore rehearsal.references/tenant-route-cutover-behind-scoped-nginx.md — tenant hostname activation when nginx test/reload/Certbot are authorized but site-file install is not; detects default-vhost HTTP 200s and TLS -k false positives and preserves rollback authority.references/self-service-tenant-route-publishing.md — fail-closed readiness for automatic per-tenant tunnels, nginx routes, TLS, exact identity probes, managed passkey handoffs/recovery, and rollback-safe appliance image rollout.references/provisioning-readiness-and-latency.md — separate brief/stack/public readiness, keep waiting chat truthful, diagnose dynamic-route failures, safely reuse full-stack observations across declarative effects, and time a real zero-residual production canary.references/versioned-entitlement-tenant-rollouts.md — staged product-tier/access-contract migrations across a central identity service and stateful tenant appliances, including signed protocol evolution and real-process tier canaries.references/versioned-seed-handoff-and-dual-runtime-release.md — encrypted project-seed continuity, exact-origin form POST, atomic tenant import, repeated React Flow expansion QA, mobile geometry checks, generated-asset hash verification, legacy SQLite rehearsal/rollback, and coordinated central/appliance release gates.references/app-retirement-cleanup.md — safe retirement and cleanup ordering.references/vps-process-attribution-and-service-retirement.md — secret-safe high-memory process attribution, coherent PM2 stack pauses, duplicate launcher/control-plane updates, swap interpretation, and stale nginx route detection after port reuse.When a referenced file and this umbrella differ, use the narrower procedure for its scenario while preserving the completion and verification contract above.