DCCExpressNext is a modern web-based model railway control and automation application.
It combines:
- a visual railway layout editor,
- live locomotive, turnout, signal, block and sensor control,
- route graph generation and route reservation,
- train task handling and basic automation,
- server-side scripting,
- support for simulator mode and external command centers.
The project is built with:
- React + TypeScript + Vite on the client,
- Node.js + Express + WebSocket on the server,
- shared TypeScript models in the
commonfolder.
DCCExpressNext can run on any system where Node.js is available. This makes it suitable for desktop PCs, small home servers, Raspberry Pi style devices, and even Android tablets or phones running Termux.
- Visual track layout editing
- Turnouts, signals, sensors, blocks and route elements
- Route graph generation from the layout
- Route reservation and release
- Train task manager
- Runtime route and transit visualization
- Fast clock support
- Server-side automation scripts
- Command center support:
- Simulator
- Z21
- DCC-EX TCP
- DCC-EX Serial
Before running the project, install a recent version of Node.js.
The npm command used below is normally included with Node.js installations.
Because the application is Node.js-based, it is not tied to a specific operating system. It can be installed on Windows, Linux, macOS, small server machines, and Android/Termux environments, as long as Node.js is available.
Clone the repository, then install dependencies from the repository root:
npm installDevelopment mode starts the backend and frontend separately.
npm run dev:serverThe server listens on:
http://localhost:3000
The WebSocket endpoint is:
ws://localhost:3000/ws
Open another terminal and run:
npm run dev:clientThe Vite development server listens on:
http://localhost:5173
Open the application in the browser:
http://localhost:5173
The frontend development server proxies the WebSocket connection and health check requests to the backend server automatically.
Build both the frontend and backend:
npm run buildAfter a successful build, start the production server:
npm startThen open:
http://localhost:3000
In production mode, the Express server serves the built frontend, exposes /api/health, and hosts the /ws WebSocket endpoint.
The easiest way to try DCCExpressNext is the built-in Simulator command center.
Use either:
http://localhost:5173
in development mode, or:
http://localhost:3000
after a production build.
Open the command center configuration dialog from the UI.
Choose:
Simulator
as the command center type.
The simulator is useful for:
- testing layouts,
- trying route reservations,
- checking task execution,
- experimenting without real railway hardware.
Save the command center settings.
You can now:
- draw or load a layout,
- generate the route graph,
- reserve and release routes,
- create train tasks,
- test runtime block and transit visualization,
- try automation scripts.
A common usage flow is:
- Create or load a railway layout.
- Add track sections, blocks, turnouts, sensors and signals.
- Generate the route graph.
- Configure a command center.
- Use the Controller panel to reserve routes.
- Create and start train tasks.
- Watch runtime state changes directly on the layout.
- Layout, locomotive, task, script and command center data are stored by the server in local project data files.
- The application uses WebSocket-based communication between the browser client and the Node.js server.
- Simulator mode is recommended for initial testing before connecting real hardware.
- The project is under active development, so some workflows and file formats may still evolve.
npm installnpm run dev:servernpm run dev:clientnpm run buildnpm start