{"id":25685655,"url":"https://github.com/sgerov/railsmaker","last_synced_at":"2025-09-09T23:22:57.341Z","repository":{"id":277085856,"uuid":"922125020","full_name":"sgerov/railsmaker","owner":"sgerov","description":"Rails generator to quickly spin up a Rails 8 app ready to be self-hosted. Sensible defaults thought for quick iteration: DaisyUI, Signoz, Plausible, Sentry, Mailjet, Clearance, Omniauth, Bun among others.","archived":false,"fork":false,"pushed_at":"2025-03-08T04:24:54.000Z","size":705,"stargazers_count":37,"open_issues_count":3,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-29T17:51:18.713Z","etag":null,"topics":["daisyui","rails","self-hosted","template"],"latest_commit_sha":null,"homepage":"https://railsmaker.com","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sgerov.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-25T11:38:41.000Z","updated_at":"2025-06-25T05:08:50.000Z","dependencies_parsed_at":"2025-02-12T03:34:24.886Z","dependency_job_id":"088bbfd0-81f4-46a1-880a-c57fa6466c94","html_url":"https://github.com/sgerov/railsmaker","commit_stats":null,"previous_names":["sgerov/railsmaker"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sgerov/railsmaker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgerov%2Frailsmaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgerov%2Frailsmaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgerov%2Frailsmaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgerov%2Frailsmaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sgerov","download_url":"https://codeload.github.com/sgerov/railsmaker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgerov%2Frailsmaker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264926041,"owners_count":23684266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["daisyui","rails","self-hosted","template"],"created_at":"2025-02-24T18:01:19.934Z","updated_at":"2025-07-12T02:35:00.482Z","avatar_url":"https://github.com/sgerov.png","language":"HTML","funding_links":["https://buymeacoffee.com/sgerov"],"categories":["HTML"],"sub_categories":[],"readme":"[![Gem Version](https://img.shields.io/gem/v/railsmaker-core?color=blue\u0026logo=rubygems)](https://rubygems.org/gems/railsmaker-core)\n[![Support](https://img.shields.io/badge/Support-%F0%9F%8D%B8-yellow)](https://buymeacoffee.com/sgerov)\n[![Live Demo](https://img.shields.io/badge/Live_Demo-Try_Now_-brightgreen?logo=rocket\u0026color=00cc99)](https://railsmaker.com)\n[![Live Demo Repo](https://img.shields.io/badge/Live_Demo_Repo-View_Code-blue?logo=github)](https://github.com/sgerov/railsmaker-sample)\n[![Guide](https://img.shields.io/badge/Guide-10_Steps_To_Prod-orange?logo=book)](./10-STEPS-TO-PROD.md)\n[![DaisyUI Templates](https://img.shields.io/badge/DaisyUI_Templates-70+_Templates-purple?logo=tailwindcss)](https://daisyuitemplates.com/)\n\n# 📦 Railsmaker\n\nShip your MVP in hours, not weeks • Zero config needed • Save 20+ dev hours\n\n## ⚡ Why Railsmaker?\n- **Ship Faster**: From zero to production in 15 minutes\n- **Growth Ready**: Built-in analytics, SEO, and monitoring\n- **Own Your Data**: Fully self-hosted, full control, full flexibility\n- **Cost Efficient**: You decide how much you want to spend\n- **DX Focused**: Modern stack, zero configuration\n\n## ✨ Features\n\n#### Growth \u0026 Analytics\n- **Privacy-focused**: Self-hosted Plausible, Signoz, and Docker Registry\n- **SEO**: Auto-optimized meta-tags \u0026 sitemaps\n- **Performance**: Lightning-fast ~50ms page loads\n- **Mobile First**: Instant responsive layouts\n\n#### Developer Experience\n- **UI**: Latest TailwindCSS 4 + DaisyUI 5\n- **Auth**: Battle-tested Clearance + OmniAuth\n- **Storage**: SQLite + Litestream\n- **Email**: Production-ready Mailjet integration\n- **Modern Stack**: Rails 8, Ruby 3.2, Hotwire magic\n\n#### Infrastructure\n- **Monitoring**: Full SigNoz \u0026 Sentry integration\n- **Deploy**: One-command Kamal deployments, self-hosted Registry support\n- **Observability**: Enterprise-grade OpenTelemetry + Lograge\n- **Scale-ready**: Global CDN support, multi-environment\n\n## 🚀 Setup\n\n### Prerequisites\n- Ruby 3.x (`rbenv` or `rvm` recommended)\n- Bundler: `gem install bundler`\n- Bun: [Install guide](https://bun.sh)\n- Git\n- Dev tools:\n  - Ubuntu/Debian: `sudo apt install build-essential libyaml-dev`\n  - macOS: `xcode-select --install`\n- Docker (for analytics \u0026 monitoring)\n\n### 1. Bootstrapping your app\n\n#### A. Set Required Environment Variables\n\n```bash\n# Docker registry access (required)\nexport KAMAL_REGISTRY_PASSWORD=\"docker-registry-password\"\n\n# Litestream backup configuration (optional)\nexport LITESTREAM_ACCESS_KEY_ID=\"access-key\"\nexport LITESTREAM_SECRET_ACCESS_KEY=\"secret-access-key\"\nexport LITESTREAM_BUCKET=\"https://eu2.yourbucketendpoint.com/\"\nexport LITESTREAM_REGION=\"eu2\"\n```\n\n#### B. Install and Deploy\n\n```bash\ngem install railsmaker-core\n\n# Interactive wizard (2 minutes)\nrailsmaker new:wizard\n\n# Deploy to any cloud\nkamal setup\n```\n\nIf you have chosen to include litestream keep in mind that the corresponding kamal accessory will also be deployed.\n\n### 2. Setting up Monitoring (Optional)\n\n#### A. Install SigNoz Server\n```bash\nrailsmaker remote signoz \\\n  --ssh-host=monitor.example.com \\\n  --ssh-user=deploy\n```\n\n#### B. Add OpenTelemetry Collector to apps server\n```bash\nrailsmaker remote signoz:opentelemetry \\\n  --ssh-host=app.example.com \\\n  --ssh-user=deploy \\\n  --signoz-host=monitor.example.com \\\n  --hostname=my-production-apps\n```\n\n### 3. Setting up Analytics (Optional)\n```bash\nrailsmaker remote plausible \\\n  --ssh-host=analytics.example.com \\\n  --ssh-user=deploy \\\n  --analytics-host=plausible.example.com\n```\n\n### 4. Setting up Private Docker Registry (Optional)\n```bash\nrailsmaker remote registry \\\n  --ssh-host=192.168.1.10 \\\n  --ssh-user=deploy \\\n  --registry-host=registry.example.com \\\n  --registry-username=admin \\\n  --registry-password=secret\n```\n\nAfter setting up your registry:\n1. Create an A record for `registry.example.com` pointing to your server\n2. Update your Kamal config to use your private registry (unless you already used `-r` option):\n```yaml\n# config/deploy.yml\nregistry:\n  server: registry.example.com\n  username: admin\n  password:\n    - KAMAL_REGISTRY_PASSWORD\n```\n\n### Verification\n\n- SigNoz Dashboard: `https://monitor.example.com:3301`\n- Plausible Analytics: `https://analytics.example.com`\n- Docker Registry: `https://registry.example.com`\n- Your App: `https://app.example.com`\n\n\u003e **Note**: All services are tested on Ubuntu 24.04 and macOS 15.2.\n\n**For a more detailed guide, check out [10 Steps To Prod](./10-STEPS-TO-PROD.md).**\n\n### Environment Requirements\n\n- **SigNoz Server**: 2 CPU, 4GB RAM minimum\n- **Plausible**: 1 CPU, 2GB RAM minimum\n- **App Server**: 1 CPU, 2GB RAM minimum\n\nYou can decide how to split the services between your servers (e.g. SigNoz \u0026 Plausible on a separate server from the app or apps).\n\n### Database Recovery\n\nIn case of DB failure, follow these steps to recover your data:\n\n1. Stop the application:\n```bash\nkamal app stop\n```\n\n2. Remove existing database files:\n```bash\nkamal app exec /bin/sh -i\nrm -rf ./storage/*\nexit\n```\n\n3. Recover files and set proper ownership to files:\n```bash\nkamal restore-db-app\nkamal restore-db-cache\nkamal restore-db-queue\nkamal restore-db-cable\nkamal restore-db-ownership\n```\n\n4. Restart Litestream to initiate recovery:\n```bash\nkamal accessory reboot litestream\n```\n\n5. Start the application:\n```bash\nkamal app boot\n```\n\n### Managing Docker Services\n\nAfter deploying services with `railsmaker remote` commands, you can manage them using standard Docker commands:\n\n```bash\n# Navigate to the service directory\ncd ~/SERVICE_DIRECTORY\n\n# Common commands for all services\ndocker compose ps          # List containers\ndocker compose logs -f     # View logs\ndocker compose restart     # Restart all containers\ndocker compose down        # Stop all containers\ndocker compose up -d       # Start all containers\n```\n\nService directories:\n- Plausible Analytics: `~/plausible-ce`\n- SigNoz Server: `~/signoz/deploy/docker`\n- SigNoz Server Collector: `~/signoz/deploy/docker/generator/infra`\n- OpenTelemetry Collector (other servers): `~/signoz-opentelemetry/deploy/docker/generator/infra`\n\n\u003e **Note**: Replace `~` with the absolute path if using sudo or running commands as another user.\n\n### Cloudflare DNS\n\nIf you are relying on Cloudflare, make sure you set-up SSL/TLS to Full for your application and analytics.\n\n## Support\n\nThis project is **pay-what-you-want**. If it helps you ship faster:\n\n[![Support](https://img.shields.io/badge/Support-%F0%9F%8D%B8-yellow?style=for-the-badge)](https://buymeacoffee.com/sgerov)\n\n*Give it a try at [railsmaker.com](https://railsmaker.com)*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgerov%2Frailsmaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsgerov%2Frailsmaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgerov%2Frailsmaker/lists"}