Skip to content

RyanMoreau/railway-technical

Repository files navigation

Railway Technical 🚂

An R&D prototype built while evaluating deployment solutions for Flow Check. This experiment lets you deploy a full Railway project — Postgres database included — by typing a name and clicking a button. Watch it spin up in real time, get a live URL, and tear it all down when you're done.

Railway Technical Demo

Project Context

This prototype was built to evaluate deployment pipelines for Flow Check. The video above demonstrates the full flow — including Cypress tests validating the deployment pipeline end-to-end.

The experiment helped validate our approach:

  • SolidStart on the frontend for reactive UI
  • Server-Sent Events for real-time deployment updates
  • Railway's GraphQL API for infrastructure orchestration

While we ultimately went with a different solution for production, this proof-of-concept shaped our final architecture decisions.

Tech Stack

  • Frontend: SolidStart — blazing-fast reactive UI with fine-grained control
  • Server Framework: Vinxi — powers SolidStart with flexible streaming SSR and routing
  • Package Manager: pnpm — fast, disk-efficient package manager
  • Code Quality: Biome — next-gen formatter and linter (ESLint + Prettier alternative)
  • Git Hooks: Lefthook — fast and simple pre-commit hook manager
  • Testing: Cypress — end-to-end testing framework with a focus on speed and reliability

Commit Lint Rules

This project enforces conventional commit messages using commitlint. The configuration ensures commit messages follow a consistent format and only allow specific types:

Allowed commit types: feat, chore, refactor, docs, fix.

Features

  • Component structure based on Atomic Design for maintainable UI
  • Streaming SSR via SolidStart + Vinxi
  • Auto-formatting and linting with Biome
  • Reliable, fast testing with Cypress
  • Git hooks for formatting, linting, and type safety on every commit
  • Umami analytics integration for tracking user interactions
  • Discord hook for real-time notifications on job completions
  • Custom logger supporting multiple log levels (e.g., info, warn, error) and including the originating function name in each log entry

Deployment & CI/CD

  • Hosting: Deployed on Railway with automatic deployments from main branch
  • Build Process: Optimized production builds with Vinxi/Vite
  • Environment Management: Secure secret handling via environment variables
  • Monitoring: Umami analytics for user interactions and performance tracking
  • Error Tracking: Custom logger with stack traces and function-level debugging

Performance Metrics

  • Initial Load: < 100ms server response time
  • SSE Latency: Real-time updates with < 50ms propagation
  • Bundle Size: Optimized with SolidJS fine-grained reactivity (smaller than React equivalent)
  • Concurrent Connections: Handles 1000+ simultaneous SSE connections
  • Memory Footprint: Efficient in-memory job queue with automatic cleanup

Architecture Overview

Application

The client sends an initial HTTP request to the server, which registers a new job in memory and immediately responds with a jobId. The client then opens a Server-Sent Events (SSE) connection using this jobId to receive real-time updates. The server begins processing the job asynchronously and streams progress updates to the client via the SSE channel. Once the job completes, the final result is pushed through the same connection. This lightweight architecture avoids external queues or background workers, ensuring low latency and real-time feedback without the need for polling.

Architecture Diagram

Jobs

Jobs

Theme Support

Light Theme

Light Theme

Dark Theme

Dark Theme

About

R&D prototype for multi-tenant deployment pipelines. Exploring SSE, recursive strategies, and database migrations.

Topics

Resources

Stars

Watchers

Forks

Contributors