- Phoenix API Railing: proxy to PHOENIX_RAILING_URL, tenant me routes - Tenant-auth: X-API-Key support for /api/v1/* (api_keys table) - Migration 026: api_keys table; 025 sovereign stack marketplace - GET /graphql/schema, GET /graphql-playground, api/docs OpenAPI - Integration tests: phoenix-railing.test.ts - docs/api/API_VERSIONING: /api/v1/ railing alignment - docs/phoenix/PORTAL_RAILING_WIRING Made-with: Cursor
2.8 KiB
2.8 KiB
Setup Instructions - Sovereign Stack Marketplace
Prerequisites
- PostgreSQL Database running and accessible
- Node.js 18+ and pnpm installed
- Environment Variables configured
Quick Setup
Option 1: Automated (Recommended)
cd /home/intlc/projects/Sankofa/api
./scripts/setup-sovereign-stack.sh
The script will:
- Check for
.envfile and help create it if missing - Run database migrations
- Seed all 9 Sovereign Stack services
- Verify the setup
Option 2: Manual Steps
cd /home/intlc/projects/Sankofa/api
# 1. Create .env file
pnpm create-env
# Then edit .env and set DB_PASSWORD
# 2. Run migrations
pnpm db:migrate:up
# 3. Seed services
pnpm db:seed:sovereign-stack
# 4. Verify
pnpm verify:sovereign-stack
Environment Configuration
Create .env File
# Use helper script
pnpm create-env
# Or copy manually
cp .env.example .env
Required Variables
Edit .env and set:
# Database (REQUIRED)
DB_HOST=localhost
DB_PORT=5432
DB_NAME=sankofa
DB_USER=postgres
DB_PASSWORD=your_secure_password_here # ⚠ REQUIRED
# Application
NODE_ENV=development # Set to 'development' for relaxed password requirements
PORT=4000
Password Requirements
Development Mode (NODE_ENV=development):
- Minimum 8 characters
- Not in insecure secrets list
Production Mode (NODE_ENV=production):
- Minimum 32 characters
- Must contain: uppercase, lowercase, numbers, special characters
Example Development Password: dev_sankofa_2024
Example Production Password: MySecureP@ssw0rd123!WithSpecialChars
Troubleshooting
Error: "DB_PASSWORD is required but not provided"
Fix: Create .env file and set DB_PASSWORD:
pnpm create-env
# Edit .env and set DB_PASSWORD
Error: "Secret uses an insecure default value"
Fix: Use a different password (not: password, admin, root, etc.)
Error: "Secret must be at least 32 characters"
Fix: Either:
- Set
NODE_ENV=developmentin.env(relaxes to 8 chars) - Use a longer password (32+ chars with all requirements)
See TROUBLESHOOTING.md for more help.
Verification
After setup, verify services:
pnpm verify:sovereign-stack
Expected output:
✅ Phoenix publisher found: Phoenix Cloud Services
✅ Found 9 Phoenix services
✅ All 9 expected services found!
Next Steps
- ✅ Services are now registered in marketplace
- ⏳ Access via GraphQL API or portal
- ⏳ Subscribe to services as needed
- ⏳ Implement full service logic (stubs are ready)
Documentation
- Quick Start:
QUICK_START_SOVEREIGN_STACK.md - Setup Guide:
docs/marketplace/sovereign-stack/SETUP.md - Troubleshooting:
docs/marketplace/sovereign-stack/TROUBLESHOOTING.md - Service Docs:
docs/marketplace/sovereign-stack/*.md