railsmaker-core 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0ed25a62bb449bb3710dafb3d4cc089df97477d7b6439df3f8d8b1b0b6efbbd
4
- data.tar.gz: d128667d1ef969f12940bd0f84a8081753afa2ab33432341564a746a5fb4169f
3
+ metadata.gz: 33cc54abfa136bdcbff79081a157f6474ea60e3802f8fa3dda31b352a4672c8f
4
+ data.tar.gz: 97a98177bb4a61ec6cd6416024bf5773a562ad207dd54a39ced56d845204435b
5
5
  SHA512:
6
- metadata.gz: e503c24961bfe8c4919dfafe60ee4910c304f9d9145a179b42f02cbf7bef3564b0bc3b2efdc3d3f3dd4a24841ebf761b1b33dd061c7f7d7d40e27d68f2270b7e
7
- data.tar.gz: de25342c872d7c3a49c5035fe98f90935a9fa31bde6954bbe28245c169ae0f9941fc9a7a9c83db42955dd98c346d9566cbe12e0ec15d069b459227dd4a9464f5
6
+ metadata.gz: b29e26020a962cdfeeccda4ccd422087615ed8902ee6f8eb4be0377581adb221e1beceae6a52b4074f326438c27502de35a190508e08df4d4d009e34eef60523
7
+ data.tar.gz: fdfc5a3bd55beea8f496012f82561a0ed26a7d7ed0c5db44b6a2c410afee0cc4fd2802d2037fdf4c80bf627593b3ddf59ae021d5e192a8b84e87a587ea30a748
data/CHANGELOG.md ADDED
@@ -0,0 +1,36 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.0.2] - 2025-02-13
9
+
10
+ ### Added
11
+ - Private Docker Registry support with authentication and HTTPS
12
+
13
+ ### Fixed
14
+ - DNS configuration instructions for Cloudflare users
15
+ - Port conflict detection before installation
16
+ - Remote script error handling
17
+
18
+ ## [0.0.1] - 2025-02-12
19
+
20
+ ### Added
21
+ - Initial release
22
+ - Rails 8 app generator
23
+ - Tailwind CSS + DaisyUI integration
24
+ - Kamal deployment configuration
25
+ - Plausible Analytics integration
26
+ - SigNoz monitoring setup
27
+ - OpenTelemetry instrumentation
28
+ - Litestream backup support
29
+ - Authentication with Clearance
30
+ - Google OAuth support
31
+ - Mailjet email service integration
32
+ - Sentry error tracking
33
+ - Basic documentation and examples
34
+
35
+ [0.0.2]: https://github.com/sgerov/railsmaker/compare/v0.0.1...v0.0.2
36
+ [0.0.1]: https://github.com/sgerov/railsmaker/releases/tag/v0.0.1
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Gem Version](https://img.shields.io/gem/v/railsmaker?color=blue&logo=rubygems)](https://rubygems.org/gems/railsmaker)
1
+ [![Gem Version](https://img.shields.io/gem/v/railsmaker-core?color=blue&logo=rubygems)](https://rubygems.org/gems/railsmaker-core)
2
2
  [![Support](https://img.shields.io/badge/Support-%F0%9F%8D%B8-yellow)](https://buymeacoffee.com/sgerov)
3
3
  [![Live Demo](https://img.shields.io/badge/Live_Demo-Try_Now_-brightgreen?logo=rocket&color=00cc99)](https://railsmaker.com)
4
4
  [![Live Demo Repo](https://img.shields.io/badge/Live_Demo_Repo-View_Code-blue?logo=github)](https://github.com/sgerov/railsmaker-sample)
@@ -18,7 +18,7 @@ Ship your MVP in hours, not weeks • Zero config needed • Save $120+/month an
18
18
  ## ✨ Features
19
19
 
20
20
  #### Growth & Analytics
21
- - **Privacy-focused**: Self-hosted Plausible and Signoz
21
+ - **Privacy-focused**: Self-hosted Plausible, Signoz, and Docker Registry
22
22
  - **SEO**: Auto-optimized meta-tags & sitemaps
23
23
  - **Performance**: Lightning-fast ~50ms page loads
24
24
  - **Mobile First**: Instant responsive layouts
@@ -32,7 +32,7 @@ Ship your MVP in hours, not weeks • Zero config needed • Save $120+/month an
32
32
 
33
33
  #### Infrastructure
34
34
  - **Monitoring**: Full SigNoz & Sentry integration
35
- - **Deploy**: One-command Kamal deployments
35
+ - **Deploy**: One-command Kamal deployments, self-hosted Registry support
36
36
  - **Observability**: Enterprise-grade OpenTelemetry + Lograge
37
37
  - **Scale-ready**: Global CDN support, multi-environment
38
38
 
@@ -103,10 +103,33 @@ railsmaker remote plausible \
103
103
  --analytics-host=plausible.example.com
104
104
  ```
105
105
 
106
+ ### 4. Setting up Private Docker Registry (Optional)
107
+ ```bash
108
+ railsmaker remote registry \
109
+ --ssh-host=192.168.1.10 \
110
+ --ssh-user=deploy \
111
+ --registry-host=registry.example.com \
112
+ --registry-username=admin \
113
+ --registry-password=secret
114
+ ```
115
+
116
+ After setting up your registry:
117
+ 1. Create an A record for `registry.example.com` pointing to your server
118
+ 2. Update your Kamal config to use your private registry:
119
+ ```yaml
120
+ # config/deploy.yml
121
+ registry:
122
+ server: registry.example.com
123
+ username: admin
124
+ password:
125
+ - KAMAL_REGISTRY_PASSWORD
126
+ ```
127
+
106
128
  ### Verification
107
129
 
108
130
  - SigNoz Dashboard: `https://monitor.example.com:3301`
109
131
  - Plausible Analytics: `https://analytics.example.com`
132
+ - Docker Registry: `https://registry.example.com`
110
133
  - Your App: `https://app.example.com`
111
134
 
112
135
  > **Note**: All services are tested on Ubuntu 24.04 and macOS 15.2.
@@ -156,9 +179,33 @@ kamal accessory reboot litestream
156
179
  kamal app boot
157
180
  ```
158
181
 
182
+ ### Managing Docker Services
183
+
184
+ After deploying services with `railsmaker remote` commands, you can manage them using standard Docker commands:
185
+
186
+ ```bash
187
+ # Navigate to the service directory
188
+ cd ~/SERVICE_DIRECTORY
189
+
190
+ # Common commands for all services
191
+ docker compose ps # List containers
192
+ docker compose logs -f # View logs
193
+ docker compose restart # Restart all containers
194
+ docker compose down # Stop all containers
195
+ docker compose up -d # Start all containers
196
+ ```
197
+
198
+ Service directories:
199
+ - Plausible Analytics: `~/plausible-ce`
200
+ - SigNoz Server: `~/signoz/deploy/docker`
201
+ - SigNoz Server Collector: `~/signoz/deploy/docker/generator/infra`
202
+ - OpenTelemetry Collector (other servers): `~/signoz-opentelemetry/deploy/docker/generator/infra`
203
+
204
+ > **Note**: Replace `~` with the absolute path if using sudo or running commands as another user.
205
+
159
206
  ### Cloudflare DNS
160
207
 
161
- If you are relying on Cloudflare, make sure you set-up SSL/TLS to Full.
208
+ If you are relying on Cloudflare, make sure you set-up SSL/TLS to Full for your application and analytics.
162
209
 
163
210
  ## Support
164
211
 
data/bin/railsmaker CHANGED
@@ -65,13 +65,13 @@ module RailsMaker
65
65
 
66
66
  Examples:
67
67
  # Install using SSH key authentication
68
- $ railsmaker remote signoz --ssh-host=example.com --ssh-user=deploy --key-path=~/.ssh/id_rsa
68
+ $ railsmaker remote signoz --ssh-host=192.168.1.30 --ssh-user=deploy --key-path=~/.ssh/id_rsa
69
69
 
70
70
  # Install using password authentication (will prompt for password)
71
- $ railsmaker remote signoz --ssh-host=example.com --ssh-user=deploy
71
+ $ railsmaker remote signoz --ssh-host=192.168.1.30 --ssh-user=deploy
72
72
 
73
73
  # Force reinstallation of existing instance
74
- $ railsmaker remote signoz --ssh-host=example.com --ssh-user=deploy --force
74
+ $ railsmaker remote signoz --ssh-host=192.168.1.30 --ssh-user=deploy --force
75
75
  LONGDESC
76
76
  method_option :ssh_host, type: :string, required: true, desc: 'SSH host (e.g., 123.456.789.0)'
77
77
  method_option :ssh_user, type: :string, default: 'root', desc: 'SSH user with sudo access'
@@ -94,12 +94,12 @@ module RailsMaker
94
94
 
95
95
  Examples:
96
96
  # Basic installation
97
- $ railsmaker remote signoz:opentelemetry --ssh-host=app.example.com --ssh-user=deploy \\
98
- --signoz-host=signoz.example.com
97
+ $ railsmaker remote signoz:opentelemetry --ssh-host=192.168.1.40 --ssh-user=deploy \
98
+ --signoz-server-host=192.168.1.30
99
99
 
100
100
  # With custom hostname for better identification
101
- $ railsmaker remote signoz:opentelemetry --ssh-host=app.example.com --ssh-user=deploy \\
102
- --signoz-host=signoz.example.com --hostname=production-app-1
101
+ $ railsmaker remote signoz:opentelemetry --ssh-host=192.168.1.40 --ssh-user=deploy \
102
+ --signoz-server-host=192.168.1.30 --hostname=production-app-1
103
103
  LONGDESC
104
104
  method_option :ssh_host, type: :string, required: true, desc: 'SSH host where collector will be installed'
105
105
  method_option :signoz_server_host, type: :string, required: true, desc: 'Host where SigNoz server is running'
@@ -119,11 +119,11 @@ module RailsMaker
119
119
 
120
120
  Examples:
121
121
  # Basic installation
122
- $ railsmaker remote plausible --ssh-host=analytics.example.com --ssh-user=deploy \\
122
+ $ railsmaker remote plausible --ssh-host=192.168.1.20 --ssh-user=deploy \
123
123
  --analytics-host=plausible.example.com
124
124
 
125
125
  # With custom SSH key
126
- $ railsmaker remote plausible --ssh-host=analytics.example.com --ssh-user=deploy \\
126
+ $ railsmaker remote plausible --ssh-host=192.168.1.20 --ssh-user=deploy \
127
127
  --analytics-host=plausible.example.com --key-path=~/.ssh/analytics_key
128
128
  LONGDESC
129
129
  method_option :ssh_host, type: :string, required: true, desc: 'SSH host where Plausible will be installed'
@@ -136,6 +136,33 @@ module RailsMaker
136
136
  RailsMaker::Generators::PlausibleGenerator.start(to_generator_args(options))
137
137
  end
138
138
 
139
+ desc 'registry', 'Install private Docker Registry on a remote server'
140
+ long_desc <<-LONGDESC
141
+ Installs and configures a private Docker Registry with authentication and HTTPS#{' '}
142
+ (via Caddy) on a remote machine.
143
+
144
+ Examples:
145
+ # Basic installation
146
+ $ railsmaker remote registry --ssh-host=192.168.1.10 --ssh-user=deploy \
147
+ --registry-host=registry.example.com --registry-username=admin --registry-password=secret
148
+
149
+ # With custom SSH key
150
+ $ railsmaker remote registry --ssh-host=192.168.1.10 --ssh-user=deploy \
151
+ --registry-host=registry.example.com --registry-username=admin \
152
+ --registry-password=secret --key-path=~/.ssh/registry_key
153
+ LONGDESC
154
+ method_option :ssh_host, type: :string, required: true, desc: 'SSH host where Registry will be installed'
155
+ method_option :registry_host, type: :string, required: true, desc: 'Domain where Registry will be accessible'
156
+ method_option :registry_username, type: :string, required: true, desc: 'Username for Registry authentication'
157
+ method_option :registry_password, type: :string, required: true, desc: 'Password for Registry authentication'
158
+ method_option :ssh_user, type: :string, default: 'root', desc: 'SSH user with sudo access'
159
+ method_option :key_path, type: :string, desc: 'Path to SSH key (if not provided, will use password auth)'
160
+ method_option :force, type: :boolean, default: false, desc: 'Force reinstallation if already installed'
161
+ def registry
162
+ print_remote_summary('Docker Registry Installation', options)
163
+ RailsMaker::Generators::RegistryGenerator.start(to_generator_args(options))
164
+ end
165
+
139
166
  private
140
167
 
141
168
  def print_remote_summary(title, opts)
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsMaker
4
+ module Generators
5
+ class RegistryGenerator < ServerCommandGenerator
6
+ source_root File.expand_path('templates/shell_scripts', __dir__)
7
+
8
+ class_option :registry_host, type: :string, required: true,
9
+ desc: 'Domain where Docker Registry will be hosted'
10
+ class_option :registry_username, type: :string, required: true,
11
+ desc: 'Username for registry authentication'
12
+ class_option :registry_password, type: :string, required: true,
13
+ desc: 'Password for registry authentication'
14
+
15
+ def initialize(*args)
16
+ super
17
+ @registry_host = options[:registry_host]
18
+ @registry_username = options[:registry_username]
19
+ @registry_password = options[:registry_password]
20
+ end
21
+
22
+ private
23
+
24
+ def script_name
25
+ 'registry'
26
+ end
27
+
28
+ def check_path
29
+ '~/docker-registry'
30
+ end
31
+
32
+ def title
33
+ "Installing Docker Registry on remote server #{options[:ssh_user]}@#{options[:ssh_host]}"
34
+ end
35
+
36
+ attr_reader :registry_host, :registry_username, :registry_password
37
+ end
38
+ end
39
+ end
@@ -26,6 +26,9 @@ module RailsMaker
26
26
  # Generate random suffix for tmp files
27
27
  random_suffix = SecureRandom.hex(8)
28
28
 
29
+ # Store the port check filename for use in templates
30
+ @port_check_filename = "port_check.sh.#{random_suffix}"
31
+
29
32
  remote_files_content = remote_files.map do |file|
30
33
  tmp_filename = "#{file[:filename]}.#{random_suffix}"
31
34
  template file[:template], "/tmp/#{tmp_filename}"
@@ -74,6 +77,10 @@ module RailsMaker
74
77
  def remote_files
75
78
  [
76
79
  *config_files,
80
+ {
81
+ template: '_port_check.sh',
82
+ filename: 'port_check.sh'
83
+ },
77
84
  {
78
85
  template: "#{script_name}.sh.erb",
79
86
  filename: 'install_script.sh'
@@ -0,0 +1,28 @@
1
+ check_port() {
2
+ if lsof -i ":$1" >/dev/null 2>&1; then
3
+ echo "Error: Port $1 is already in use"
4
+ return 1
5
+ fi
6
+ return 0
7
+ }
8
+
9
+ check_required_ports() {
10
+ local ports="$1"
11
+ local ports_in_use=""
12
+
13
+ echo "🔍 Checking if required ports are available..."
14
+
15
+ for port in $ports; do
16
+ if ! check_port "$port"; then
17
+ ports_in_use="$ports_in_use $port"
18
+ fi
19
+ done
20
+
21
+ if [ ! -z "$ports_in_use" ]; then
22
+ echo "❌ Cannot proceed. The following ports are already in use:$ports_in_use"
23
+ echo "Please free up these ports before continuing"
24
+ exit 1
25
+ fi
26
+
27
+ echo "✅ All required ports are available"
28
+ }
@@ -19,6 +19,12 @@ if ! command -v git &> /dev/null; then
19
19
  exit 1
20
20
  fi
21
21
 
22
+ # Source port checking functions
23
+ . /tmp/<%= @port_check_filename %>
24
+
25
+ # Check required ports
26
+ check_required_ports "80 443"
27
+
22
28
  echo "📝 Cloning Plausible repository..."
23
29
  git clone -b v2.1.4 --single-branch https://github.com/plausible/community-edition plausible-ce
24
30
  cd plausible-ce
@@ -0,0 +1,84 @@
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ if ! command -v docker &> /dev/null; then
5
+ echo "Error: Docker is not installed. Please install Docker first."
6
+ echo "Visit https://docs.docker.com/get-docker/ for installation instructions."
7
+ exit 1
8
+ fi
9
+
10
+ if ! command -v docker compose &> /dev/null; then
11
+ echo "Error: Docker Compose is not installed. Please install Docker Compose first."
12
+ echo "Visit https://docs.docker.com/compose/install/ for installation instructions."
13
+ exit 1
14
+ fi
15
+
16
+ # Source port checking functions
17
+ . /tmp/<%= @port_check_filename %>
18
+
19
+ # Check required ports
20
+ check_required_ports "80 443 5000"
21
+
22
+ echo "📝 Creating Docker Registry installation directory..."
23
+ mkdir -p ~/docker-registry/{auth,data,caddy_data,caddy_config}
24
+ cd ~/docker-registry
25
+
26
+ echo "⚙️ Creating authentication credentials..."
27
+ docker run --rm httpd:2.4-alpine htpasswd -Bbn "<%= registry_username %>" "<%= registry_password %>" > auth/htpasswd
28
+
29
+ echo "🔧 Creating docker-compose configuration..."
30
+ cat > docker-compose.yml << 'EOF'
31
+ version: '3'
32
+
33
+ services:
34
+ registry:
35
+ image: registry:2
36
+ restart: always
37
+ ports:
38
+ - "5000:5000"
39
+ environment:
40
+ REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /var/lib/registry
41
+ REGISTRY_AUTH: htpasswd
42
+ REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd
43
+ REGISTRY_AUTH_HTPASSWD_REALM: "Registry Realm"
44
+ volumes:
45
+ - ./data:/var/lib/registry
46
+ - ./auth:/auth
47
+
48
+ caddy:
49
+ image: caddy:2
50
+ restart: always
51
+ ports:
52
+ - "80:80"
53
+ - "443:443"
54
+ volumes:
55
+ - ./Caddyfile:/etc/caddy/Caddyfile
56
+ - ./caddy_data:/data
57
+ - ./caddy_config:/config
58
+ EOF
59
+
60
+ echo "📄 Creating Caddy configuration..."
61
+ cat > Caddyfile << EOF
62
+ <%= registry_host %> {
63
+ reverse_proxy registry:5000
64
+ }
65
+ EOF
66
+
67
+ echo "🚀 Starting Docker Registry services..."
68
+ docker compose up -d --quiet-pull
69
+
70
+ echo "✨ Verifying services..."
71
+ if docker compose ps --status running | grep -q "registry"; then
72
+ echo "✅ Docker Registry is running successfully!"
73
+ echo
74
+ echo "➡️ IMPORTANT: Configure DNS:"
75
+ echo " 1. Create an A record for <%= registry_host %> pointing to this server"
76
+ echo
77
+ echo "➡️ Login to your registry with:"
78
+ echo " docker login <%= registry_host %>"
79
+ echo " Username: <%= registry_username %>"
80
+ echo " Password: <%= registry_password %>"
81
+ else
82
+ echo "❌ Error: Docker Registry failed to start. Please check the logs with 'docker compose logs'"
83
+ exit 1
84
+ fi
@@ -19,6 +19,12 @@ if ! command -v git &> /dev/null; then
19
19
  exit 1
20
20
  fi
21
21
 
22
+ # Source port checking functions
23
+ . /tmp/<%= @port_check_filename %>
24
+
25
+ # Check required ports
26
+ check_required_ports "80 443 3301 4317 4318"
27
+
22
28
  echo "📝 Cloning SigNoz repository..."
23
29
  git clone -b main https://github.com/SigNoz/signoz.git --depth 1 --branch <%= signoz_version %>
24
30
 
@@ -19,6 +19,12 @@ if ! command -v git &> /dev/null; then
19
19
  exit 1
20
20
  fi
21
21
 
22
+ # Source port checking functions
23
+ . /tmp/<%= @port_check_filename %>
24
+
25
+ # Check required ports
26
+ check_required_ports "4317 4318"
27
+
22
28
  git clone -b main https://github.com/SigNoz/signoz.git --depth 1 signoz-opentelemetry --branch <%= signoz_version %>
23
29
 
24
30
  cd signoz-opentelemetry/deploy/
@@ -19,23 +19,23 @@
19
19
  </span>
20
20
  </div>
21
21
  <h1 class="text-4xl xl:text-5xl font-bold">
22
- Ship this app
22
+ Ship Rails apps
23
23
  <span class="relative inline-block mt-4 md:mt-0">
24
- <span class="relative bg-base-100 px-4 py-1 rounded border-2 border-secondary text-secondary">in 15 minutes</span>
24
+ <span class="relative bg-base-100 px-4 py-1 rounded border-2 border-secondary text-secondary">quickly</span>
25
25
  </span>
26
26
  </h1>
27
27
  <p class="py-6 text-lg xl:text-xl">
28
- A modern <strong>all-in-one</strong> Rails template — perfect for
29
- indie hackers craving full control, low operational hassle and quick iteration.
30
- <span class="block mt-2">Save <span class="text-success font-semibold">$120+ per month</span> in infrastructure costs and <span class="text-success font-semibold">20+ hours</span> of development time.</span>
28
+ An <strong>opinionated Rails 8</strong> generator — perfect for
29
+ indie hackers craving full control, low operational hassle and quick iteration
30
+ <span class="block mt-2"><span class="text-success font-semibold">Self-host</span> your app and save <span class="text-success font-semibold">20+ hours</span> of setup</span>
31
31
  </p>
32
32
  <div class="flex flex-col sm:flex-row gap-4 justify-center xl:justify-start">
33
- <%= link_to sign_in_path, class: "btn btn-primary gap-2" do %>
34
- Demo
33
+ <a href="https://github.com/sgerov/railsmaker" class="btn btn-outline gap-2" target="_blank">
35
34
  <svg xmlns="http://www.w3.org/2000/svg" class="size-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
36
- <path d="M14 5l7 7m0 0l-7 7m7-7H3"/>
35
+ <path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"/>
37
36
  </svg>
38
- <% end %>
37
+ View on GitHub
38
+ </a>
39
39
  <a href="https://buymeacoffee.com/sgerov" target="_blank" class="btn btn-secondary gap-2">
40
40
  <svg xmlns="http://www.w3.org/2000/svg" class="size-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
41
41
  <path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/>
@@ -80,8 +80,8 @@
80
80
  <!-- Feature Grid -->
81
81
  <div class="py-16 lg:py-24 px-4 bg-base-200">
82
82
  <div class="text-center max-w-3xl mx-auto mb-16">
83
- <h2 class="text-3xl lg:text-4xl font-bold mb-4">Everything you need for quick iteration</h2>
84
- <p class="text-lg opacity-75">A production-ready Rails stack that respects conventions and puts you in control</p>
83
+ <h2 class="text-3xl lg:text-4xl font-bold mb-4">Sensible defaults</h2>
84
+ <p class="text-lg opacity-75">A minimal <strong>self-hosted</strong> Rails stack prepared for quick iteration</p>
85
85
  </div>
86
86
 
87
87
  <div class="max-w-7xl mx-auto grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
@@ -101,19 +101,19 @@
101
101
  <svg xmlns="http://www.w3.org/2000/svg" class="size-5 text-success flex-shrink-0 mt-1" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
102
102
  <polyline points="20 6 9 17 4 12"></polyline>
103
103
  </svg>
104
- <span>Adjustable template generated in minutes</span>
104
+ <span>Scaffolds a <strong>Rails 8</strong> app — ready to be deployed</span>
105
105
  </li>
106
106
  <li class="flex items-start gap-2">
107
107
  <svg xmlns="http://www.w3.org/2000/svg" class="size-5 text-success flex-shrink-0 mt-1" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
108
108
  <polyline points="20 6 9 17 4 12"></polyline>
109
109
  </svg>
110
- <span>Server-side scripts included</span>
110
+ <span>Authentication with <strong>Clearance</strong> and <strong>OmniAuth</strong></span>
111
111
  </li>
112
112
  <li class="flex items-start gap-2">
113
113
  <svg xmlns="http://www.w3.org/2000/svg" class="size-5 text-success flex-shrink-0 mt-1" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
114
114
  <polyline points="20 6 9 17 4 12"></polyline>
115
115
  </svg>
116
- <span>Tested on Mac M4 & Ubuntu 24.04</span>
116
+ <span><strong>OpenTelemetry</strong> collector setup</span>
117
117
  </li>
118
118
  </ul>
119
119
  </div>
@@ -128,26 +128,26 @@
128
128
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z" />
129
129
  </svg>
130
130
  </div>
131
- <h3 class="text-xl font-bold">Modern Stack</h3>
131
+ <h3 class="text-xl font-bold">Opinionated defaults</h3>
132
132
  </div>
133
133
  <ul class="space-y-3">
134
134
  <li class="flex items-start gap-2">
135
135
  <svg xmlns="http://www.w3.org/2000/svg" class="size-5 text-success flex-shrink-0 mt-1" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
136
136
  <polyline points="20 6 9 17 4 12"></polyline>
137
137
  </svg>
138
- <span>Rails 8 with Tailwind 4 & DaisyUI 5</span>
138
+ <span><strong>Tailwind 4</strong> and <strong>DaisyUI 5</strong> for a modern look</span>
139
139
  </li>
140
140
  <li class="flex items-start gap-2">
141
141
  <svg xmlns="http://www.w3.org/2000/svg" class="size-5 text-success flex-shrink-0 mt-1" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
142
142
  <polyline points="20 6 9 17 4 12"></polyline>
143
143
  </svg>
144
- <span>SQLite with S3 backups</span>
144
+ <span><strong>SQLite</strong> with S3 backups through <strong>Litestream</strong></span>
145
145
  </li>
146
146
  <li class="flex items-start gap-2">
147
147
  <svg xmlns="http://www.w3.org/2000/svg" class="size-5 text-success flex-shrink-0 mt-1" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
148
148
  <polyline points="20 6 9 17 4 12"></polyline>
149
149
  </svg>
150
- <span>SEO-ready and mobile-first</span>
150
+ <span><strong>Bun</strong> for your JS bundles</span>
151
151
  </li>
152
152
  </ul>
153
153
  </div>
@@ -162,31 +162,48 @@
162
162
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" />
163
163
  </svg>
164
164
  </div>
165
- <h3 class="text-xl font-bold">No overhead</h3>
165
+ <h3 class="text-xl font-bold">3rd party services</h3>
166
166
  </div>
167
167
  <ul class="space-y-3">
168
168
  <li class="flex items-start gap-2">
169
169
  <svg xmlns="http://www.w3.org/2000/svg" class="size-5 text-success flex-shrink-0 mt-1" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
170
170
  <polyline points="20 6 9 17 4 12"></polyline>
171
171
  </svg>
172
- <span>Multiple apps per server with Thruster</span>
172
+ <span>Self-hosted <strong>Signoz</strong> and <strong>Plausible CE</strong> setup</span>
173
173
  </li>
174
174
  <li class="flex items-start gap-2">
175
175
  <svg xmlns="http://www.w3.org/2000/svg" class="size-5 text-success flex-shrink-0 mt-1" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
176
176
  <polyline points="20 6 9 17 4 12"></polyline>
177
177
  </svg>
178
- <span>Authentication and OAuth2</span>
178
+ <span>Error tracking with <strong>Sentry</strong></span>
179
179
  </li>
180
180
  <li class="flex items-start gap-2">
181
181
  <svg xmlns="http://www.w3.org/2000/svg" class="size-5 text-success flex-shrink-0 mt-1" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
182
182
  <polyline points="20 6 9 17 4 12"></polyline>
183
183
  </svg>
184
- <span>6000 free emails/mo with Mailjet</span>
184
+ <span><strong>Mailjet</strong> for emails (6k/mo for free)</span>
185
185
  </li>
186
186
  </ul>
187
187
  </div>
188
188
  </div>
189
189
 
190
+ <!-- Demo Section -->
191
+ <div class="col-span-full bg-gradient-to-r from-primary/10 to-secondary/10 rounded-xl p-12">
192
+ <div class="flex flex-col items-center text-center">
193
+ <div class="max-w-xl">
194
+ <a href="<%= sign_in_path %>" class="btn btn-primary btn-wide gap-2">
195
+ Launch mockup app
196
+ <svg xmlns="http://www.w3.org/2000/svg" class="size-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
197
+ <path d="M5 12h14M12 5l7 7-7 7"/>
198
+ </svg>
199
+ </a>
200
+ <span class="block text-xs mt-3 text-base-content/60">
201
+ Note: The generator only creates a minimal UI like the demo above — so you can build your site on top of it
202
+ </span>
203
+ </div>
204
+ </div>
205
+ </div>
206
+
190
207
  <!-- Monitoring & Analytics -->
191
208
  <div class="card bg-base-100 shadow-xl col-span-full">
192
209
  <div class="card-body">
@@ -196,7 +213,7 @@
196
213
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" />
197
214
  </svg>
198
215
  </div>
199
- <h3 class="text-xl font-bold">Complete Observability Suite</h3>
216
+ <h3 class="text-xl font-bold">Self-hosted O11y and Analytics</h3>
200
217
  </div>
201
218
 
202
219
  <div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
@@ -220,69 +237,31 @@
220
237
  </div>
221
238
  </div>
222
239
  </div>
223
-
224
- <div class="grid grid-cols-1 md:grid-cols-2 gap-8 mt-8">
225
- <div class="space-y-2">
226
- <h4 class="font-bold">Self-hosted</h4>
227
- <ul class="space-y-3">
228
- <li class="flex items-start gap-2">
229
- <svg xmlns="http://www.w3.org/2000/svg" class="size-5 text-success flex-shrink-0 mt-1" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
230
- <polyline points="20 6 9 17 4 12"></polyline>
231
- </svg>
232
- <span>Metrics, traces and structured logs with SigNoz</span>
233
- </li>
234
- <li class="flex items-start gap-2">
235
- <svg xmlns="http://www.w3.org/2000/svg" class="size-5 text-success flex-shrink-0 mt-1" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
236
- <polyline points="20 6 9 17 4 12"></polyline>
237
- </svg>
238
- <span>Plausible analytics</span>
239
- </li>
240
- </ul>
241
- </div>
242
- <div class="space-y-2">
243
- <h4 class="font-bold">3rd Party</h4>
244
- <ul class="space-y-3">
245
- <li class="flex items-start gap-2">
246
- <svg xmlns="http://www.w3.org/2000/svg" class="size-5 text-success flex-shrink-0 mt-1" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
247
- <polyline points="20 6 9 17 4 12"></polyline>
248
- </svg>
249
- <span>Error tracking with Sentry</span>
250
- </li>
251
- <li class="flex items-start gap-2">
252
- <svg xmlns="http://www.w3.org/2000/svg" class="size-5 text-success flex-shrink-0 mt-1" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
253
- <polyline points="20 6 9 17 4 12"></polyline>
254
- </svg>
255
- <span>Free alerting with the Opsgenie integration</span>
256
- </li>
257
- </ul>
258
- </div>
259
- </div>
260
240
  </div>
261
241
  </div>
262
242
  </div>
263
243
  </div>
264
244
 
265
- <!-- Social Proof Section -->
266
245
  <div class="bg-base-100 py-16">
267
246
  <div class="max-w-7xl mx-auto px-4">
268
247
  <div class="flex flex-wrap justify-center gap-8">
269
248
  <div class="stats stats-vertical sm:stats-horizontal shadow">
270
249
  <div class="stat">
271
- <div class="stat-title">Setup Time</div>
272
- <div class="stat-value text-primary">15min</div>
273
- <div class="stat-desc">From zero to prod</div>
250
+ <div class="stat-title">Time</div>
251
+ <div class="stat-value text-primary">< 1h</div>
252
+ <div class="stat-desc">The first run</div>
274
253
  </div>
275
254
 
276
255
  <div class="stat">
277
- <div class="stat-title">Servers Costs</div>
278
- <div class="stat-value">from $5/mo</div>
279
- <div class="stat-desc">Depends on your provider</div>
256
+ <div class="stat-title">Dependencies</div>
257
+ <div class="stat-value">14</div>
258
+ <div class="stat-desc">Non-rails gems</div>
280
259
  </div>
281
260
 
282
261
  <div class="stat">
283
262
  <div class="stat-title">Features</div>
284
263
  <div class="stat-value text-secondary">20+</div>
285
- <div class="stat-desc">Production-ready</div>
264
+ <div class="stat-desc">You might need</div>
286
265
  </div>
287
266
  </div>
288
267
  </div>
@@ -292,14 +271,19 @@
292
271
  <!-- CTA Section -->
293
272
  <div class="py-24 bg-base-300">
294
273
  <div class="max-w-3xl mx-auto text-center px-4">
295
- <h2 class="text-3xl lg:text-4xl font-bold mb-6">Launch in one command 🚀</h2>
274
+ <h2 class="text-3xl lg:text-4xl font-bold mb-6">Spin up your app now 🚀</h2>
296
275
  <div class="mockup-code w-full text-left">
297
276
  <pre data-prefix="$"><code>gem install railsmaker-core</code></pre>
298
277
  <pre data-prefix=">" class="text-success"><code>1 gem installed</code></pre>
299
- <pre data-prefix="$"><code>railsmaker new:wizard</code></pre>
278
+ <pre data-prefix="$"><code>railsmaker new --name sample-app \
279
+ --docker dockerusernme \
280
+ --ip 123.123.123.123 \
281
+ --domain example.com \
282
+ --analytics analytics.example.com \
283
+ --bucketname example-s3-bucket-name</code></pre>
300
284
  <pre data-prefix=">" class="text-success"><code>Successfully generated RailsMaker template 🎉</code></pre>
301
285
  <pre data-prefix="$"><code>kamal setup</code></pre>
302
- <pre data-prefix=">" class="text-success"><code>Deployed 🚀</code></pre>
286
+ <pre data-prefix=">" class="text-success"><code>Deployed at 123.123.123.123 🚀</code></pre>
303
287
  </div>
304
288
  <div class="flex flex-col sm:flex-row gap-4 justify-center mt-16">
305
289
  <a href="https://buymeacoffee.com/sgerov" class="btn btn-secondary btn-lg gap-2" target="_blank">
@@ -2,7 +2,7 @@
2
2
  <div class="container mx-auto px-4 py-8">
3
3
  <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
4
4
  <!-- Logo & Description -->
5
- <div class="md:col-span-3">
5
+ <div class="col-span-full">
6
6
  <div class="flex items-center gap-2 mb-4">
7
7
  <%= link_to root_path, class: 'flex items-center gap-2 group' do %>
8
8
  <span class="font-bold text-lg">
@@ -11,8 +11,8 @@
11
11
  <% end %>
12
12
  </div>
13
13
  <p class="text-base-content/70 mb-4">
14
- Launch your next Rails project in minutes, not weeks. Complete with authentication,
15
- modern UI components, and production-ready infrastructure meant for quick (and cheap) iteration.
14
+ Launch your next idea in hours, not weeks. Self-host your app with sensible defaults including authentication,
15
+ modern UI components, and production-ready infrastructure meant for quick iteration.
16
16
  </p>
17
17
  <div class="flex gap-4">
18
18
  <%= link_to "https://www.linkedin.com/in/savagerov/", class: "btn btn-ghost btn-sm", target: "_blank" do %>
@@ -27,15 +27,6 @@
27
27
  <% end %>
28
28
  </div>
29
29
  </div>
30
-
31
- <!-- Company -->
32
- <div>
33
- <h3 class="font-bold mb-4">Company</h3>
34
- <ul class="space-y-2">
35
- <li><%= link_to "Privacy Policy", privacy_path, class: "link link-hover text-base-content/70" %></li>
36
- <li><%= link_to "Terms & Conditions", terms_path, class: "link link-hover text-base-content/70" %></li>
37
- </ul>
38
- </div>
39
30
  </div>
40
31
 
41
32
  <div class="border-t border-base-content/10 mt-8 pt-8 text-sm text-base-content/70">
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsMaker
4
+ VERSION = '0.0.2'
5
+ end
data/lib/railsmaker.rb CHANGED
@@ -23,7 +23,4 @@ require 'railsmaker/generators/auth_generator'
23
23
  require 'railsmaker/generators/ui_generator'
24
24
  require 'railsmaker/generators/mailjet_generator'
25
25
  require 'railsmaker/generators/litestream_generator'
26
-
27
- module RailsMaker
28
- VERSION = '0.0.1'
29
- end
26
+ require 'railsmaker/generators/registry_generator'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railsmaker-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sava Gerov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-02-12 00:00:00.000000000 Z
11
+ date: 2025-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clearance
@@ -272,6 +272,7 @@ executables:
272
272
  extensions: []
273
273
  extra_rdoc_files: []
274
274
  files:
275
+ - CHANGELOG.md
275
276
  - README.md
276
277
  - bin/railsmaker
277
278
  - lib/railsmaker.rb
@@ -284,6 +285,7 @@ files:
284
285
  - lib/railsmaker/generators/opentelemetry_generator.rb
285
286
  - lib/railsmaker/generators/plausible_generator.rb
286
287
  - lib/railsmaker/generators/plausible_instrumentation_generator.rb
288
+ - lib/railsmaker/generators/registry_generator.rb
287
289
  - lib/railsmaker/generators/sentry_generator.rb
288
290
  - lib/railsmaker/generators/server_command_generator.rb
289
291
  - lib/railsmaker/generators/signoz_generator.rb
@@ -293,7 +295,9 @@ files:
293
295
  - lib/railsmaker/generators/templates/auth/app/controllers/omniauth_callbacks_controller.rb
294
296
  - lib/railsmaker/generators/templates/litestream/litestream.yml.erb
295
297
  - lib/railsmaker/generators/templates/opentelemetry/lograge.rb.erb
298
+ - lib/railsmaker/generators/templates/shell_scripts/_port_check.sh
296
299
  - lib/railsmaker/generators/templates/shell_scripts/plausible.sh.erb
300
+ - lib/railsmaker/generators/templates/shell_scripts/registry.sh.erb
297
301
  - lib/railsmaker/generators/templates/shell_scripts/signoz.sh.erb
298
302
  - lib/railsmaker/generators/templates/shell_scripts/signoz_opentelemetry.sh.erb
299
303
  - lib/railsmaker/generators/templates/ui/app/assets/images/og-image.webp
@@ -329,6 +333,7 @@ files:
329
333
  - lib/railsmaker/generators/templates/ui/public/icon.svg
330
334
  - lib/railsmaker/generators/templates/ui/public/robots.txt
331
335
  - lib/railsmaker/generators/ui_generator.rb
336
+ - lib/railsmaker/version.rb
332
337
  homepage: https://railsmaker.com
333
338
  licenses:
334
339
  - MIT
@@ -337,6 +342,7 @@ metadata:
337
342
  source_code_uri: https://github.com/sgerov/railsmaker
338
343
  bug_tracker_uri: https://github.com/sgerov/railsmaker/issues
339
344
  documentation_uri: https://github.com/sgerov/railsmaker/blob/main/10-STEPS-TO-PROD.md
345
+ changelog_uri: https://github.com/sgerov/railsmaker/blob/main/CHANGELOG.md
340
346
  post_install_message:
341
347
  rdoc_options: []
342
348
  require_paths: