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:
Go to Railway dashboard
Click the new "backend-docs-api" service
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:5010Generate domain (Settings → Networking)
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 🚀