Skip to content

rafath/railsmaker

 
 

Repository files navigation

Gem Version Support Live Demo Live Demo Repo Guide

📦 Railsmaker

Ship your MVP in hours, not weeks • Zero config needed • Save $120+/month and 20+ dev hours

⚡ Why Railsmaker?

  • Ship Faster: From zero to production in 15 minutes
  • Growth Ready: Built-in analytics, SEO, and monitoring
  • Own Your Data: Fully self-hosted, full control, full flexibility
  • Cost Efficient: You decide how much you want to spend
  • DX Focused: Modern stack, zero configuration

✨ Features

Growth & Analytics

  • Privacy-focused: Self-hosted Plausible and Signoz
  • SEO: Auto-optimized meta-tags & sitemaps
  • Performance: Lightning-fast ~50ms page loads
  • Mobile First: Instant responsive layouts

Developer Experience

  • UI: Latest TailwindCSS 4 + DaisyUI 5
  • Auth: Battle-tested Clearance + OmniAuth
  • Storage: SQLite + Litestream
  • Email: Production-ready Mailjet integration
  • Modern Stack: Rails 8, Ruby 3.2, Hotwire magic

Infrastructure

  • Monitoring: Full SigNoz & Sentry integration
  • Deploy: One-command Kamal deployments
  • Observability: Enterprise-grade OpenTelemetry + Lograge
  • Scale-ready: Global CDN support, multi-environment

🚀 Setup

Prerequisites

  • Ruby 3.x (rbenv or rvm recommended)
  • Bundler: gem install bundler
  • Bun: Install guide
  • Git
  • Dev tools:
    • Ubuntu/Debian: sudo apt install build-essential libyaml-dev
    • macOS: xcode-select --install
  • Docker (for analytics & monitoring)

1. Bootstrapping your app

A. Set Required Environment Variables

# Docker registry access (required)
export KAMAL_REGISTRY_PASSWORD="docker-registry-password"

# Litestream backup configuration (optional)
export LITESTREAM_ACCESS_KEY_ID="access-key"
export LITESTREAM_SECRET_ACCESS_KEY="secret-access-key"
export LITESTREAM_BUCKET="https://eu2.yourbucketendpoint.com/"
export LITESTREAM_REGION="eu2"

B. Install and Deploy

gem install railsmaker-core

# Interactive wizard (2 minutes)
railsmaker new:wizard

# Deploy to any cloud
kamal setup

If you have chosen to include litestream keep in mind that the corresponding kamal accessory will also be deployed.

2. Setting up Monitoring (Optional)

A. Install SigNoz Server

railsmaker remote signoz \
  --ssh-host=monitor.example.com \
  --ssh-user=deploy

B. Add OpenTelemetry Collector to apps server

railsmaker remote signoz:opentelemetry \
  --ssh-host=app.example.com \
  --ssh-user=deploy \
  --signoz-host=monitor.example.com \
  --hostname=my-production-apps

3. Setting up Analytics (Optional)

railsmaker remote plausible \
  --ssh-host=analytics.example.com \
  --ssh-user=deploy \
  --analytics-host=plausible.example.com

Verification

  • SigNoz Dashboard: https://monitor.example.com:3301
  • Plausible Analytics: https://analytics.example.com
  • Your App: https://app.example.com

Note: All services are tested on Ubuntu 24.04 and macOS 15.2.

For a more detailed guide, check out 10 Steps To Prod.

Environment Requirements

  • SigNoz Server: 2 CPU, 4GB RAM minimum
  • Plausible: 1 CPU, 2GB RAM minimum
  • App Server: 1 CPU, 2GB RAM minimum

You can decide how to split the services between your servers (e.g. SigNoz & Plausible on a separate server from the app or apps).

Database Recovery

In case of DB failure, follow these steps to recover your data:

  1. Stop the application:
kamal app stop
  1. Remove existing database files:
kamal app exec /bin/sh -i
rm -rf ./storage/*
exit
  1. Recover files and set proper ownership to files:
kamal restore-db-app
kamal restore-db-cache
kamal restore-db-queue
kamal restore-db-cable
kamal restore-db-ownership
  1. Restart Litestream to initiate recovery:
kamal accessory reboot litestream
  1. Start the application:
kamal app boot

Managing Docker Services

After deploying services with railsmaker remote commands, you can manage them using standard Docker commands:

# Navigate to the service directory
cd ~/SERVICE_DIRECTORY

# Common commands for all services
docker compose ps          # List containers
docker compose logs -f     # View logs
docker compose restart     # Restart all containers
docker compose down        # Stop all containers
docker compose up -d       # Start all containers

Service directories:

  • Plausible Analytics: ~/plausible-ce
  • SigNoz Server: ~/signoz/deploy/docker
  • SigNoz Server Collector: ~/signoz/deploy/docker/generator/infra
  • OpenTelemetry Collector (other servers): ~/signoz-opentelemetry/deploy/docker/generator/infra

Note: Replace ~ with the absolute path if using sudo or running commands as another user.

Cloudflare DNS

If you are relying on Cloudflare, make sure you set-up SSL/TLS to Full for your application.

Support

This project is pay-what-you-want. If it helps you ship faster:

Support

Give it a try at railsmaker.com

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 51.9%
  • Ruby 44.1%
  • Shell 3.2%
  • JavaScript 0.8%