Deployment Infrastructure Overview

Complete guide to GoGrab platform deployment architecture - internal services and user platforms

🚀 Deployment Infrastructure Overview

Two distinct deployment pipelines: Our internal infrastructure vs. User-generated platforms


📋 Table of Contents

  1. Architecture Overview
  2. Internal Infrastructure (Railway)
  3. User Platform Deployment (GitLab + Cloudflare)
  4. Quick Reference
  5. Documentation Index

Architecture Overview

GoGrab operates two completely separate deployment pipelines:

┌─────────────────────────────────────────────────────────────────────────────┐
│                        GoGrab Deployment Architecture                        │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│  ┌──────────────────────────────────┐  ┌──────────────────────────────────┐ │
│  │     INTERNAL INFRASTRUCTURE      │  │     USER PLATFORM PIPELINE       │ │
│  │         (Our Services)           │  │    (Generated Platforms)         │ │
│  ├──────────────────────────────────┤  ├──────────────────────────────────┤ │
│  │                                  │  │                                  │ │
│  │  ┌────────────┐                  │  │  ┌────────────┐                  │ │
│  │  │  GitHub    │                  │  │  │  Backend   │                  │ │
│  │  │ (editor2)  │                  │  │  │  AI API    │                  │ │
│  │  └─────┬──────┘                  │  │  └─────┬──────┘                  │ │
│  │        │                         │  │        │                         │ │
│  │        ▼                         │  │        ▼ generates               │ │
│  │  ┌────────────┐                  │  │  ┌────────────┐                  │ │
│  │  │  Railway   │                  │  │  │  GitLab    │ (gograbspace)    │ │
│  │  │  (deploy/* │                  │  │  │  CI/CD     │                  │ │
│  │  │  branches) │                  │  │  └─────┬──────┘                  │ │
│  │  └─────┬──────┘                  │  │        │                         │ │
│  │        │                         │  │        ▼                         │ │
│  │        ▼                         │  │  ┌────────────┐                  │ │
│  │  ┌────────────┐                  │  │  │ Cloudflare │                  │ │
│  │  │ api.gograb │                  │  │  │   Pages    │                  │ │
│  │  │ .space     │                  │  │  └─────┬──────┘                  │ │
│  │  └────────────┘                  │  │        │                         │ │
│  │                                  │  │        ▼                         │ │
│  │  Services:                       │  │  ┌────────────┐                  │ │
│  │  • backend-api                   │  │  │ {client}   │                  │ │
│  │  • backend-ai-api                │  │  │ .pages.dev │                  │ │
│  │  • backend-docs-api              │  │  └────────────┘                  │ │
│  │  • gograb-space (frontend)       │  │                                  │ │
│  │                                  │  │  Features:                       │ │
│  │                                  │  │  • SSR/Prerendering              │ │
│  │                                  │  │  • ISR Cache                     │ │
│  │                                  │  │  • Edge Functions                │ │
│  └──────────────────────────────────┘  └──────────────────────────────────┘ │
│                                                                              │
└─────────────────────────────────────────────────────────────────────────────┘

Key Differences

Aspect Internal (Railway) User Platforms (GitLab + CF)
Purpose Our backend services Client-generated platforms
Source Control GitHub (editor2 repo) GitLab (gograbspace group)
CI/CD Railway auto-deploy GitLab CI pipelines
Hosting Railway containers Cloudflare Pages
Scaling Railway managed Cloudflare edge network
Cost Railway subscription Cloudflare (per project)

Internal Infrastructure (Railway)

Our internal services are deployed via Railway using GitHub deploy branches:

Services

Service Domain Deploy Branch Health Check
backend-api api.gograb.space deploy/api /api/health
backend-ai-api ai-api.gograb.space deploy/ai-api /ai-api/health
backend-docs-api docs-api.gograb.space deploy/docs-api /docs-api/health
gograb-space gograb.space deploy/frontend /

Quick Deploy

# Deploy backend-api
git checkout deploy/api && git merge main && git push origin deploy/api && git checkout main

# Deploy all services
yarn railway:deploy:all

📖 Full Guide: Railway Deployment


User Platform Deployment (GitLab + Cloudflare)

User platforms are generated by our AI and deployed via GitLab CI to Cloudflare Pages:

Pipeline Flow

User Request → Backend AI API → Generate Code → Push to GitLab → CI Pipeline → Cloudflare Pages
     │              │                │               │              │              │
     │              │                │               │              │              │
     ▼              ▼                ▼               ▼              ▼              ▼
  Platform      Module          Angular App       Project       Build &        Live URL
   Config      Generation      + SSR Config      + CI/CD       Deploy      {name}.pages.dev

Services Involved

  1. Backend AI API (ai-api.gograb.space)

    • Generates Angular platform code
    • Creates GitLab CI configuration
    • Triggers deployment pipeline
  2. GitLab (gitlab.com/gograbspace)

    • Hosts generated platform code
    • Runs CI/CD pipelines
    • Builds Angular SSR apps
  3. Cloudflare Pages

    • Hosts static + SSR content
    • Provides edge caching
    • Handles ISR cache invalidation

Credentials Required

Service Environment Variable Purpose
GitLab GITLAB_API_TOKEN API access for project management
GitLab GITLAB_URL GitLab instance URL
Cloudflare CLOUDFLARE_ACCOUNT_ID Account identifier
Cloudflare CLOUDFLARE_API_TOKEN API access for Pages

📖 Full Guides:


Quick Reference

Verify Connections

# Test GitLab
yarn test:gitlab

# Test Cloudflare
yarn test:cloudflare

# Run full E2E pipeline test
yarn e2e:pipeline

Deploy Commands

# Internal services (Railway)
yarn railway:deploy:backend
yarn railway:deploy:ai
yarn railway:deploy:docs
yarn railway:deploy:frontend

# User platforms (direct to Cloudflare - emergency only)
yarn deploy:wrangler <project-name> <dist-path>

Health Checks

# Internal APIs
curl https://api.gograb.space/api/health
curl https://ai-api.gograb.space/ai-api/health
curl https://docs-api.gograb.space/docs-api/health

# Cloudflare token verification
curl -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  https://api.cloudflare.com/client/v4/user/tokens/verify

Documentation Index

Internal Deployment (Railway)

Document Description
Railway Overview Complete Railway deployment guide
GitHub Branch Strategy Deploy branch workflow
Dockerfiles Container configurations
Troubleshooting Common issues and fixes

User Platform Pipeline (GitLab + Cloudflare)

Document Description
Pipeline Overview End-to-end pipeline flow
GitLab Integration GitLab API and CI/CD
Cloudflare Pages Cloudflare deployment
SSR & Prerendering Server-side rendering setup
CI Generator Auto-generated CI configs

Reference

Document Description
Environment Variables All deployment env vars
Quick Commands Copy-paste commands
E2E Testing Pipeline verification tests

Last Updated: January 24, 2026 (Session 64) Maintained By: GoGrab Platform Team