Skip to content

Subway-Builder-Modded/monorepo

Repository files navigation

Railyard

Subway Builder Modded Monorepo

Welcome to the Subway Builder Modded monorepo! This monorepo includes all of the shared code for our projects and tools.




Workspace

This repository is managed as a pnpm workspace. A single pnpm install from the repo root installs dependencies for all projects — you never need to cd into a sub-package just to install.

Workspace packages

Package Path Description
@subway-builder-modded/config packages/config Shared workspace constants
@subway-builder-modded/shared-ui packages/shared-ui Shared React UI components
@subway-builder-modded/asset-listings-ui packages/asset-listings-ui Asset listing UI components
@subway-builder-modded/stores-core packages/stores-core Core Zustand store definitions
@subway-builder-modded/asset-listings-state packages/asset-listings-state Asset listing state and store extensions
@subway-builder-modded/lifecycle-core packages/lifecycle-core Shared lifecycle hooks
@subway-builder-modded/lifecycle-web packages/lifecycle-web Web-specific lifecycle hooks
@subway-builder-modded/lifecycle-wails packages/lifecycle-wails Wails-specific lifecycle hooks
@subway-builder-modded/special-demand-schemas foundry/schemas Published special demand JSON schemas and validators

Root scripts

# Install all workspace dependencies (lockfile-enforced)
pnpm run install:workspace

# Run package tests
pnpm run test:packages
pnpm run check:packages

# Run app checks
pnpm run check:website
pnpm run check:railyard

# Apply lint and format across the monorepo
pnpm run lint
pnpm run format

# Run CI quality commands across apps
pnpm run ci

train-track globe anvil anvil




train-track Railyard

Features

  • Custom Cities: Browse community-made maps of cities from around the world and install them at the press of a button.
  • Mod Browser: Discover and install gameplay mods to enhance your Subway Builder experience.
  • Intuitive Interface: A clean, friendly UI designed to make managing your Subway Builder content effortless.
  • Content Management: Manage your installed content and keep everything organized.
  • Fully Configurable: Fully configure every aspect of Railyard to your liking.

Development Prerequisites

Getting Started

# From the repo root — installs all workspace packages in one step
pnpm install

# Run in development mode (hot reload) — from the railyard/ directory
cd railyard
wails dev

# Build for production
wails build

Quality Checks

# Run full pre-push checks manually (backend + frontend) — from railyard/
cd railyard
pwsh -File ./scripts/pre-push-check.ps1

# Optional: enforce checks automatically before every git push
git config core.hooksPath .githooks

The pre-push check includes:

  • gofmt -w auto-apply for all tracked Go files (then validation)
  • go test ./...
  • go test coverage gate (scripts/check-go-coverage.ps1, default minimum: 60%)
  • frontend pnpm run format, pnpm run lint:fix, then pnpm run check (lint, format:check, test, test:coverage)

How It Works

  1. Registry — Railyard clones a Git-based registry of available maps and mods.
  2. Installation — Maps are downloaded as zip archives containing PMTiles, config, and GeoJSON data files. These are extracted to the Railyard data directory.
  3. Mod Generation — At game launch, Railyard generates a Subway Builder mod (com.railyard.maploader) that registers all installed maps with the game's modding API.
  4. Tile Serving — A local PMTiles server starts on a random port to serve vector tiles to the game at runtime.
  5. Thumbnails — SVG thumbnails are generated from water layer features in the map's vector tiles and cached for display in the UI.



globe Website

Development Prerequisites

Getting Started

# From the repo root — installs all workspace packages in one step
pnpm install

# Start the development server
cd website
pnpm run dev

Quality Checks

# Run lint, formatting check, unit tests, and coverage
cd website
pnpm run check

Branches

  • website: production website source branch
  • website-dev: development website source branch



Website | License | Credits | Contribute

About

The monorepo including all of the shared code for the Subway Builder Modded projects and tools.

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Contributors