Tier: Preview. Rails is a preview stack — Archiet generates real, idiomatic Rails 7 code, boot-tested in CI, with cross-stack parity work ongoing relative to the four stable stacks. Production-shaped output; review before shipping rather than treating it as runtime-certified.
What generating a Rails app from requirements produces
app/
models/ user.rb, workspace.rb, {entity}.rb (ActiveRecord + scope)
controllers/ api/v1/{entities}_controller.rb
serializers/ {entity}_serializer.rb (jsonapi-serializer)
policies/ {entity}_policy.rb (Pundit)
db/
migrate/ one timestamped migration per entity
schema.rb
config/
routes.rb # namespace :api do namespace :v1 ...
spec/
requests/ {entity}_spec.rb (RSpec request specs)
factories/ (FactoryBot)
docker-compose.yml # puma + postgres + redis
Dockerfile
openapi.yaml
Rails-specific patterns Archiet gets right
Tenant scoping by association, enforced in the controller base — records are always loaded through the current workspace, so cross-tenant access isn't reachable:
class Api::V1::OrdersController < Api::V1::BaseController
def index
orders = current_workspace.orders
.order(created_at: :desc)
.page(params[:page]).per(25)
render json: OrderSerializer.new(orders)
end
end
Pundit policies for authorization:
class OrderPolicy < ApplicationPolicy
def update?
record.workspace_id == user.workspace_id && user.admin_or_manager?
end
end
Devise + JWT in httpOnly cookies. Authentication is issued as a HttpOnly; Secure; SameSite=Lax cookie via devise-jwt, not stored in localStorage. bcrypt hashes passwords; failed auth returns 401.
Serializers on every response. Controllers render {Entity}Serializer (jsonapi-serializer) rather than to_json on the model, so internal attributes never leak. Strong parameters validate input.
PostgreSQL + ActiveRecord migrations. Schema changes are timestamped migrations run with rails db:migrate. No SQLite in production config.
What is included beyond the Rails backend
- Next.js frontend — every screen from your manifest, wired to the API
- Docker — Puma + PostgreSQL + Redis via
docker-compose.yml - GitHub Actions — RuboCop → RSpec → build → deploy
- Architecture docs — ADRs under
docs/decisions/ - OpenAPI 3.1 spec — for client SDKs and gateways
Related
- Step-by-step walkthrough: Generate a production Rails app from your PRD
- Template-oriented page: Rails boilerplate generator
- All use cases: archiet.com/use-cases
FAQ
Which Rails version does it generate?
Rails 7 with ActiveRecord, Devise + JWT authentication, Pundit authorization, and RSpec request specs, targeting Ruby 3.2+.
How is multi-tenancy handled?
Records are loaded through the current_workspace association in a controller base class, and Pundit policies guard writes — so cross-tenant reads and writes aren't reachable through normal controller actions.
Does it generate tests?
Yes — RSpec request specs with FactoryBot factories covering CRUD, auth, validation, and authorization paths.
Is the Rails stack production-ready?
It is a preview stack: real, idiomatic Rails 7, boot-tested in CI with parity work ongoing. Use it as a strong starting point and review before production.
CTA
Generate a complete Rails + Next.js application from your requirements — free plan, no credit card.
Describe your product, pick Rails, and download a production-shaped codebase in about 90 seconds.
Start free at archiet.com.