Unified Deployment Guide¶
Last Updated: 2026-07-17 This guide covers the deployment process for the unified Archetiq application, which now includes all StartupOS features. For access rules and live gates, see access-control.md.
1. Environment Overview¶
| Environment | URL | Database | Server Path | PM2 Process |
|---|---|---|---|---|
| Production | https://www.archetiq.com |
personality_db |
/opt/personality-app |
personality-app |
| Demo | https://demo.archetiq.com |
personality_db (with a dedicated demo organisation) |
/opt/personality-app-demo |
personality-app-demo |
Note: startup.archetiq.com and demo-startup.archetiq.com are now deprecated and should be configured in Nginx to 301 redirect to the new URLs.
2. Deployment Process¶
Current live deploys use the dual environment script in hostinger/deploy-personality-both.ps1. Use the manual steps below only when you need to debug an individual stage.
Step 1: Build the Client Application¶
Run this command from your local Personality-Test/client directory:
dist directory with the static production assets.
Step 2: Deploy Frontend Assets¶
Securely copy the contents of the dist folder to the server's public directory.
# For Production
ssh root@76.13.211.100 "rm -rf /opt/personality-app/public/assets"
scp -r c:\MyApps\Personality-Test\client\dist\* root@76.13.211.100:/opt/personality-app/public/
Step 3: Deploy Backend Code¶
Securely copy the server codebase to the application directory on the VPS.
# For Production
scp -r c:\MyApps\Personality-Test\server\src\* root@76.13.211.100:/opt/personality-app/src/
Step 4: Restart the Server¶
Log into the VPS and run the following commands to install dependencies and restart the application using PM2.
# For Production
ssh root@76.13.211.100 "cd /opt/personality-app && npm install --production && pm2 restart personality-app --update-env"
3. Seeding the Demo Environment¶
To populate the demo environment with the unified archetiq_demo account and the fully completed "MindBridge" startup, run the following command on the VPS. This script connects to the main personality_db and seeds the specific demo data within it.
# Execute from within the /opt/personality-app-demo/ directory on the server
DEMO_PASSWORD='<your-secure-password>' node scripts/seed-demo-unified.js
4. Post-Deployment Checklist¶
- [ ] Verify
https://archetiq.com/healthreturns{"status":"ok"} - [ ] Verify
https://demo.archetiq.com/healthreturns{"status":"ok"} - [ ] Confirm asset count: after deploy, run
ssh root@76.13.211.100 "find /opt/personality-app/public/assets -type f | wc -l"— expect ~100 files; thousands means the old-asset cleanup was skipped - [ ] Confirm demo asset count too:
ssh root@76.13.211.100 "find /opt/personality-app-demo/public/assets -type f | wc -l" - [ ] Set all
STRIPE_*env vars in/opt/personality-app/.env(replace any placeholder values) - [ ] Set
INTERNAL_API_KEYto the same value as in/opt/agents-service/.env(enables agent commissions) - [ ] Register Stripe webhook endpoint in the Stripe Dashboard:
https://archetiq.com/api/stripe/webhook - Subscribe to:
checkout.session.completed,invoice.payment_succeeded,customer.subscription.deleted - Copy the signing secret into
STRIPE_WEBHOOK_SECRETin VPS.env - [ ] Test Explorer payment flow end-to-end on the live URL
- [ ] Test Coach payment flow: pre-approve → pay → confirm
payment_receivedstate in portal → admin activate - [ ] Test PDF export on the deployed URL
- [ ] Test promo code creation in AdminDashboard and redemption on Pricing page
- [ ] Confirm annual renewal banner appears correctly in Coach Portal