How nicasiomarques/railway works
This repository appears to implement a Railway-like deployment platform: users manage projects and services through a web dashboard or CLI, the API persists and queues work, and workers reconcile runtime state and handle platform operations. The README provides no capability overview, so the map follows the product domains visible in the source tree. Several route and worker subsystems are unsampled; their inclusion reflects the tree, while their connections are shown only where the excerpts or source index establish them.
Main entry points: index.ts Worker bootstrap · app.ts API application · worker.ts Deployment reconciler · api.ts Web API client
Components 27
User interfaces
- Dashboard app
web/src/App.tsx - Dashboard views
web/src/components/Dashboard.tsx - Web API client
web/src/api.ts - Service canvas
web/src/components/ServiceCanvas.tsx - Service wizard
web/src/components/NewServiceWizard.tsx - CLI commands
cli/src/index.ts - CLI HTTP client
cli/src/http.ts
API and domain
- API application
api/src/app.ts - Authentication
api/src/auth.ts - Service management
api/src/routes/services.ts - Deployment management
api/src/routes/deployments.ts - Domains and integrations
api/src/routes/domains.ts - API database access
api/src/db/client.ts
Deployment operations
- Worker bootstrap
workers/src/index.ts - Deployment reconciler
workers/src/reconciler/worker.ts - Kubernetes runtime
workers/src/runtime/k8s.ts - Environment provisioning
workers/src/provisioning/saga.ts - Scheduled deploys
workers/src/cron/worker.ts - Domain and TLS worker
workers/src/domain/worker.ts - Volume backups
workers/src/backup/worker.ts - Usage sampling
workers/src/usage/worker.ts - Billing worker
workers/src/billing/worker.ts - Webhook delivery
workers/src/webhooks/worker.ts
Platform services
- Platform database
db/src/schema.ts - Job contracts
shared/src/jobs.ts - Job queue
api/src/queue.ts
Other components
- Platform user
Connections 29
- Platform user → Dashboard app: uses dashboard
web/src/App.tsx - Platform user → CLI commands: runs commands
cli/src/index.ts - Dashboard app → Dashboard views: renders
web/src/App.tsx - Dashboard views → Web API client: uses API
- Service canvas → Web API client: uses API
web/src/components/ServiceCanvas.tsx - Service wizard → Web API client: uses API
web/src/components/NewServiceWizard.tsx - CLI commands → CLI HTTP client: dispatches commands
cli/src/index.ts - CLI HTTP client → API application: sends requests
- Web API client → API application: sends requests
- API application → Authentication: authenticates requests
api/src/app.ts - API application → Service management: registers routes
api/src/app.ts - API application → Deployment management: registers routes
api/src/app.ts - API application → Domains and integrations: registers routes
api/src/app.ts - Service management → API database access: reads and writes
api/src/routes/services.ts - Service management → Job queue: enqueues jobs
- API database access → Platform database: uses shared schema
- Worker bootstrap → Deployment reconciler: starts worker
workers/src/index.ts - Worker bootstrap → Kubernetes runtime: configures runtime
workers/src/index.ts - Worker bootstrap → Environment provisioning: configures provisioning
workers/src/index.ts - Worker bootstrap → Scheduled deploys: starts schedules
workers/src/index.ts - Worker bootstrap → Domain and TLS worker: starts worker
workers/src/index.ts - Worker bootstrap → Volume backups: starts worker
workers/src/index.ts - Worker bootstrap → Usage sampling: configures worker
workers/src/index.ts - Worker bootstrap → Billing worker: configures worker
workers/src/index.ts - Worker bootstrap → Webhook delivery: configures worker
workers/src/index.ts - Deployment reconciler → Environment provisioning: dispatches jobs
workers/src/reconciler/worker.ts - Deployment reconciler → Scheduled deploys: dispatches jobs
workers/src/reconciler/worker.ts - Deployment reconciler → Kubernetes runtime: reconciles runtime
- Job queue → Deployment reconciler: delivers jobs