DEPLOY NOW

Documentation management API with real-time MongoDB sync

🚀 Deploy Backend Docs API Now

All Code is Ready ✅

Everything is implemented and working. Just 2 commands to deploy:

Command 1: Deploy API to Railway

./deployment/deploy-docs-api.sh

This uses your RAILWAY_DOCS_TOKEN to deploy directly (no GitHub needed).

After deployment:

  1. Go to Railway dashboard

  2. Click the new "backend-docs-api" service

  3. Add environment variables:

    NODE_ENV=production
    JWT_SECRET=<copy-from-backend-api-variables>
    SYSTEM_TOKEN=<from-your-env-local>
    MONGODB_CONNECTION_STRING_TEST_MODULES=<from-your-env-local>
    ALLOWED_ORIGINS=https://gograb.space,http://localhost:5010
    
  4. Generate domain (Settings → Networking)

  5. Test: curl https://your-domain.railway.app/docs-api/health

Command 2: Initial Data Sync

export DOCS_API_URL=https://your-domain.railway.app/docs-api
export SYSTEM_TOKEN=<your-token>
yarn docs:sync

This uploads all your docs to MongoDB (~450 files, takes 10-15 minutes).

Command 3: Build Frontend (Later)

After API is working:

# Update environment.prod.ts with your Railway domain first
nx build docs-angular --configuration=production
# Then copy dist/apps/docs-angular/browser/ to gograb.space/docs

Quick Troubleshooting

If deploy script fails: Check .env.local has RAILWAY_DOCS_TOKEN

If build fails in Railway: Add environment variables in Railway dashboard

If sync fails: Make sure API is healthy first


Start here: Run ./deployment/deploy-docs-api.sh 🚀