No description
  • TypeScript 97.6%
  • Dockerfile 2.4%
Find a file
2026-03-06 16:13:22 -07:00
src Initial engine gateway - Railway integration 2026-03-06 15:49:29 -07:00
.env.example Initial engine gateway - Railway integration 2026-03-06 15:49:29 -07:00
.gitignore Initial engine gateway - Railway integration 2026-03-06 15:49:29 -07:00
Dockerfile Fix Dockerfile - install devDeps for build 2026-03-06 16:13:22 -07:00
package-lock.json Initial engine gateway - Railway integration 2026-03-06 15:49:29 -07:00
package.json Initial engine gateway - Railway integration 2026-03-06 15:49:29 -07:00
railway.json Initial engine gateway - Railway integration 2026-03-06 15:49:29 -07:00
README.md Initial engine gateway - Railway integration 2026-03-06 15:49:29 -07:00
tsconfig.json Initial engine gateway - Railway integration 2026-03-06 15:49:29 -07:00

AeThex Engine Gateway

API gateway service that bridges the AeThex Engine (desktop app) to Railway backend services.

Architecture

┌──────────────────┐           ┌─────────────────────────────────┐
│   AeThex Engine  │  HTTPS    │    Engine Gateway (Railway)     │
│    (Desktop)     │ ────────► │    engine.aethex.dev            │
└──────────────────┘           └───────────────┬─────────────────┘
                                               │ internal
                      ┌────────────────────────┼────────────────────────┐
                      ▼                        ▼                        ▼
             aethex-passport          aethex-backend            aethex-forge
              .railway.internal        .railway.internal         .railway.internal
                   (Auth)               (Cloud Saves)            (Asset Library)

API Endpoints

Health

  • GET / - Service info
  • GET /health - Health check with internal service status

Authentication

  • POST /api/auth/login - Login with AeThex Passport
  • POST /api/auth/register - Register new account
  • GET /api/auth/profile - Get user profile (requires auth)

Cloud Saves

  • GET /api/cloud/saves - List user's cloud saves
  • POST /api/cloud/saves - Create/update cloud save
  • GET /api/cloud/saves/:id - Get specific save
  • DELETE /api/cloud/saves/:id - Delete save
  • POST /api/cloud/projects/sync - Sync engine project to cloud

Asset Library

  • GET /api/assets - Browse assets
  • GET /api/assets/:id - Get asset details
  • GET /api/assets/:id/download - Download asset (requires auth)
  • POST /api/assets/publish - Publish asset from engine (requires auth)

Telemetry

  • POST /api/telemetry/event - Send usage event
  • POST /api/telemetry/crash - Send crash report

Game Servers

  • GET /api/servers - List available game servers
  • POST /api/servers - Create new server instance

Engine Updates

  • GET /api/engine/latest - Get latest engine version info
  • GET /api/engine/templates - Get export templates

WebSocket

  • ws://engine.aethex.dev/ws - Real-time connection for notifications

Environment Variables

PORT=3000
JWT_SECRET=your-jwt-secret

# Railway internal URLs (auto-configured)
PASSPORT_URL=http://aethex-passport.railway.internal:3000
BACKEND_URL=http://aethex-backend.railway.internal:3000
STUDIO_URL=http://aethex-studio.railway.internal:3000
MISSION_CONTROL_URL=http://aethex-mission-control.railway.internal:3000
FORGE_URL=http://aethex-forge.railway.internal:3000

Deploy to Railway

  1. Push to GitHub
  2. Connect repo to Railway
  3. Add to the same project as other AeThex services
  4. Set environment variables
  5. Add custom domain: engine.aethex.dev

Engine Integration

In the C++ engine, configure the gateway URL:

// modules/aethex_cloud/aethex_cloud.cpp
void AethexCloud::initialize() {
    gateway_url = "https://engine.aethex.dev";
    // Uses internal routing when called from Railway
}

Local Development

npm install
cp .env.example .env
# Edit .env with public URLs for local testing
npm run dev

License

Proprietary - AeThex Corporation