What You Will Build
A production-ready Ruby on Rails codebase for a B2B SaaS, generated from a paragraph. The generated app includes:
- ActiveRecord models with migrations (
rails db:migrateready) - Devise authentication
- Controllers with organisation scoping
- Convention-over-configuration structure throughout
- A working
docker-compose.yml
Rails is the right pick for startups and teams who value developer velocity and a well-trodden, opinionated path.
Prerequisites
- An Archiet account (free at archiet.com/register)
- Docker installed locally
- 10 minutes
Step 1: Write a Minimal PRD
Pipeline is a B2B SaaS for recruiters. Organisations sign up and invite
recruiters. Recruiters manage candidates (name, email, stage) and jobs
(title, status), and link candidates to jobs. Only recruiters in an
organisation see that organisation's candidates and jobs. We need
registration, login, and password reset.
Archiet extracts Organisation, User, Candidate, and Job, plus the auth flow.
Step 2: Open the Blueprint Wizard
Log in at archiet.com/login, click New Blueprint, paste the PRD, click Analyse, review the model.
Step 3: Choose Rails
On the Generate screen, select Rails and click Generate.
Step 4: What You Get
pipeline/
├── app/
│ ├── models/
│ │ ├── organisation.rb
│ │ ├── candidate.rb
│ │ └── job.rb
│ ├── controllers/
│ │ ├── candidates_controller.rb
│ │ └── jobs_controller.rb
├── db/migrate/
├── config/routes.rb
├── docker-compose.yml
└── bin/rails
The model and controller follow Rails conventions, with tenant scoping made explicit:
# app/models/candidate.rb
class Candidate < ApplicationRecord
belongs_to :organisation
belongs_to :job, optional: true
enum stage: { applied: 0, screening: 1, interview: 2, offer: 3, hired: 4 }
validates :name, :email, presence: true
end
# app/controllers/candidates_controller.rb
class CandidatesController < ApplicationController
before_action :authenticate_user!
def index
@candidates = current_user.organisation.candidates
render json: @candidates
end
end
current_user.organisation.candidates scopes every read to the signed-in user's organisation through the association — no candidate from another org is reachable.
Step 5: Run It Locally
cd pipeline
cp .env.example .env
docker compose up -d
docker compose exec web bin/rails db:migrate
# or locally:
bin/rails s
The API is at http://localhost:3000/. Devise handles registration, login, and password reset out of the box.
What to Do Next
Lean on convention: because the app is standard Rails, every Rails guide and gem applies directly.
Add background jobs: the structure leaves a clean seam for Sidekiq or Active Job.
Other stacks: Laravel offers a similar convention-driven experience in PHP; Django in Python.
The generated ARCHITECTURE.md documents the model relationships, the auth choice (Devise), and the tenancy approach.