---
title: "Deploy JXLR Boilerplate"
description: "Turborepo Express Start Boilerplate"
category: "Other"
url: https://railway.com/deploy/jxlr-boilerplate
---

# Deploy JXLR Boilerplate

Turborepo Express Start Boilerplate

**[Deploy JXLR Boilerplate on Railway](https://railway.com/template/jxlr-boilerplate)**

- **Creator:** JXLR Engineering
- **Category:** Other
- **Total deploys:** 2

## Template content

### Caddy Proxy https://raw.githubusercontent.com/caddyserver/website/07c51663ab3cf37c8831eefeb64383a10af3a4a5/src/resources/images/favicon.png

- **Source:** https://github.com/AxelVincent/caddy-reverse-proxy
- **Public domain:** Yes

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2.1
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

### Front

- **Source:** AxelVincent/turbo-express-start-boilerplate
- **Health check:** /

### Loki https://grafana.com/media/docs/loki/logo-grafana-loki.png

- **Source:** https://github.com/AxelVincent/railway-grafana-stack-cost-efficient

### API

- **Source:** AxelVincent/turbo-express-start-boilerplate
- **Health check:** /health

### Grafana https://grafana.com/media/docs/grafana-cloud/infrastructure/grafanalogo.svg

- **Source:** https://github.com/AxelVincent/railway-grafana-stack-cost-efficient

### Prometheus https://icon.icepanel.io/Technology/svg/Prometheus.svg

- **Source:** https://github.com/AxelVincent/railway-grafana-stack-cost-efficient

### Tempo https://grafana.com/static/assets/img/logos/grafana-tempo.svg

- **Source:** https://github.com/AxelVincent/railway-grafana-stack-cost-efficient

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

## Buckets

- **Bucket**

## Documentation

# Deploy and Host JXLR Boilerplate on Railway

JXLR Boilerplate is a production-ready full-stack TypeScript monorepo. It ships an
Express API with type-safe Zod contracts shared with the frontend, React 19 with
TanStack Router and Query, PostgreSQL via Kysely, Redis-backed jobs, S3 object
storage, multi-organisation authentication, and a complete Grafana observability
stack — everything a new product needs on day one.

## About Hosting JXLR Boilerplate

Hosting involves ten services wired together: the API and frontend, each built from
its own Dockerfile inside a shared pnpm monorepo; a Caddy reverse proxy that gives
both a single public domain; PostgreSQL, Redis and an S3-compatible bucket; and
Grafana, Loki, Prometheus and Tempo for logs, metrics and traces. Railway's
reference variables connect everything over private networking, so no credentials
are copied by hand. Database migrations run as a pre-deploy step and abort the
release if they fail, auth secrets are generated per deployment, and volumes
persist your database and observability data. Nothing requires configuration
before the first deploy.

## Common Use Cases

- Launching a new multi-tenant SaaS product without rebuilding auth, organisations, user management and an admin backoffice from scratch
- Standing up an internal tool or client dashboard that needs real authentication, file uploads and audit-quality logging on day one
- Running a reference full-stack architecture with logs, metrics and distributed traces already correlated in Grafana

## Dependencies for JXLR Boilerplate Hosting

- **PostgreSQL** — primary datastore, schema managed by Kysely migrations
- **Redis** — background job queue and distributed rate limiting
- **S3-compatible object storage** — file uploads via presigned URLs
- **Caddy reverse proxy** — single public domain, routing `/api/*` to the backend
- **Grafana + Loki + Prometheus + Tempo** — the observability stack

### Deployment Dependencies

- [JXLR Boilerplate repository](https://github.com/AxelVincent/turbo-express-start-boilerplate)
- [Better Auth](https://www.better-auth.com) — authentication with the organization plugin
- [Kysely](https://kysely.dev) — type-safe SQL and migrations
- [TanStack Start](https://tanstack.com/start) — the React framework powering the frontend
- [Caddy Reverse Proxy template](https://github.com/railwayapp-templates/caddy-reverse-proxy)
- [Grafana Stack (Cost Efficient) template](https://github.com/AxelVincent/railway-grafana-stack-cost-efficient)
- [Resend](https://resend.com) — optional, for transactional email
- [OpenTelemetry](https://opentelemetry.io) — trace export to Tempo

### Implementation Details

**Single domain, path-routed.** Caddy uses `handle_path {$BACKEND_PATH:/api}/*`,
which strips the prefix before proxying. The browser calls
`https:///api/web/users`; the API receives `/web/users`. Frontend and API
are same-origin, so session cookies work without CORS.

```
VITE_API_URL = https://${{Caddy Proxy.RAILWAY_PUBLIC_DOMAIN}}/api
BASE_URL     = https://${{Caddy Proxy.RAILWAY_PUBLIC_DOMAIN}}/api
```

`VITE_API_URL` is inlined by Vite at **build** time, so changing it requires a
rebuild rather than a restart.

**Migrations gate the release.** `apps/api/railway.json` runs them before the new
build takes traffic, so a failed migration leaves the previous version serving:

```json
"deploy": {
  "preDeployCommand": ["pnpm --filter @repo/api db:migrate"],
  "healthcheckPath": "/health",
  "drainingSeconds": 15,
  "overlapSeconds": 20
}
```

**Graceful shutdown.** On SIGTERM the API stops accepting connections, closes idle
keep-alive sockets, closes the database pool and flushes pending traces, with a 5s
backstop — comfortably inside Railway's draining window.

**Secrets are generated, not shared.** `BETTER_AUTH_SECRET`, `INTERNAL_RPC_SECRET`
and the Grafana admin password use `${{ secret(n) }}`, so every deployment of this
template mints its own.

**Optional integrations.** Email (`RESEND_API_KEY`), Slack error alerting
(`SLACK_BOT_TOKEN`) and Google OAuth are unset by default. The app degrades
cleanly without them — email logs to stdout and Slack alerting no-ops.

## Why Deploy JXLR Boilerplate 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 JXLR Boilerplate 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.




## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — [Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/jxlr-boilerplate
