Deploy perceptive-benevolence
Deploy Woki-lite in Railway
woki-lite
serugeneris/woki-lite
Just deployed
Deploy and Host WokiLite on Railway
WokiLite is a production-ready restaurant reservation system demonstrating Clean Architecture principles. It features automatic table assignment, concurrency-safe booking, timezone-aware scheduling, and a modern React frontend for day-view reservation management. Perfect for showcasing full-stack TypeScript development with enterprise-grade patterns.
About Hosting WokiLite
Deploying WokiLite involves running a Node.js backend (Express.js API) and serving a React frontend (Vite-built static assets). The backend uses in-memory storage for the core version, making it stateless and easy to deploy without external databases. The system handles restaurant table reservations with automatic assignment algorithms, supports multiple sectors/shifts, and prevents double-booking through concurrency locks. The frontend provides an interactive day-view interface for creating, filtering, and managing reservations with timezone-aware scheduling using IANA timezones (e.g., America/Argentina/Buenos_Aires
).
Common Use Cases
- Restaurant reservation management - Table assignment and scheduling for restaurants with multiple service sectors
- Clean Architecture demonstration - Showcase enterprise patterns with strict layered separation and dependency inversion
- Full-stack TypeScript evaluation - Complete example with Express.js backend, React frontend, and shared type safety
- Timezone-aware scheduling - Handle reservations across different timezones with 15-minute slot granularity
- Concurrency testing - Demonstrate idempotency and race condition prevention in booking systems
Dependencies for WokiLite Hosting
- Node.js 20+ - Runtime environment with ES modules support
- Environment Variables -
PORT
,NODE_ENV
,RESTAURANT_TIMEZONE
,CORS_ORIGIN
Deployment Dependencies
- Express.js Documentation - Web framework for the API
- Vite Deployment Guide - Frontend build tool
- date-fns-tz - Timezone handling
- Pino Logger - Structured logging
Implementation Details
Build Command:
npm run start:railway
This executes:
npm run build:frontend
- Builds React app into distnpm run build
- Compiles TypeScript backend to distnpm start
- Runsnode dist/infrastructure/web/server.js
Required Environment Variables:
# Backend Configuration
PORT=3000
NODE_ENV=production
LOG_LEVEL=info
RESTAURANT_TIMEZONE=America/Argentina/Buenos_Aires
# Frontend CORS (Railway will provide domain)
CORS_ORIGIN=https://your-railway-app.railway.app
Static File Serving: The backend serves the built frontend from dist at the root path:
// In server.ts
app.use(express.static(path.join(__dirname, '../../../frontend/dist')));
Key Features:
- Automatic table assignment - "Find First Fit" algorithm per sector
- Concurrency locks - Prevents double-booking with in-memory locks
- Idempotency - Safe retries using
Idempotency-Key
headers - Type safety - Zod validation for all API endpoints
- Structured logging - Pino with request IDs for tracing
Why Deploy WokiLite on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying WokiLite on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Specific Benefits for WokiLite:
- Zero-config deployment - Railway auto-detects Node.js and runs
npm run start:railway
- Automatic HTTPS - Secure endpoints for production use
- Environment management - Easy configuration of timezones and CORS settings
- Horizontal scaling ready - Stateless design allows multiple instances (with future database upgrade)
- Built-in monitoring - Track API performance and reservation patterns
Template Content
woki-lite
serugeneris/woki-lite