No description
- TypeScript 97.6%
- Dockerfile 2.4%
| src | ||
| .env.example | ||
| .gitignore | ||
| Dockerfile | ||
| package-lock.json | ||
| package.json | ||
| railway.json | ||
| README.md | ||
| tsconfig.json | ||
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 infoGET /health- Health check with internal service status
Authentication
POST /api/auth/login- Login with AeThex PassportPOST /api/auth/register- Register new accountGET /api/auth/profile- Get user profile (requires auth)
Cloud Saves
GET /api/cloud/saves- List user's cloud savesPOST /api/cloud/saves- Create/update cloud saveGET /api/cloud/saves/:id- Get specific saveDELETE /api/cloud/saves/:id- Delete savePOST /api/cloud/projects/sync- Sync engine project to cloud
Asset Library
GET /api/assets- Browse assetsGET /api/assets/:id- Get asset detailsGET /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 eventPOST /api/telemetry/crash- Send crash report
Game Servers
GET /api/servers- List available game serversPOST /api/servers- Create new server instance
Engine Updates
GET /api/engine/latest- Get latest engine version infoGET /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
- Push to GitHub
- Connect repo to Railway
- Add to the same project as other AeThex services
- Set environment variables
- 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