RepoPilotOpen in app →

padrino/padrino-framework

Padrino is a full-stack ruby framework built upon Sinatra.

Healthy

Healthy across the board

Use as dependencyHealthy

Permissive license, no critical CVEs, actively maintained — safe to depend on.

Fork & modifyHealthy

Has a license, tests, and CI — clean foundation to fork and modify.

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isHealthy

No critical CVEs, sane security posture — runnable as-is.

  • Last commit 6w ago
  • 18 active contributors
  • Distributed ownership (top contributor 35% of recent commits)
Show 3 more →
  • MIT licensed
  • CI configured
  • Tests present

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Healthy" badge

Paste into your README — live-updates from the latest cached analysis.

Variant:
RepoPilot: Healthy
[![RepoPilot: Healthy](https://repopilot.app/api/badge/padrino/padrino-framework)](https://repopilot.app/r/padrino/padrino-framework)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/padrino/padrino-framework on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: padrino/padrino-framework

Generated by RepoPilot · 2026-05-10 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/padrino/padrino-framework shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

GO — Healthy across the board

  • Last commit 6w ago
  • 18 active contributors
  • Distributed ownership (top contributor 35% of recent commits)
  • MIT licensed
  • CI configured
  • Tests present

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live padrino/padrino-framework repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/padrino/padrino-framework.

What it runs against: a local clone of padrino/padrino-framework — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in padrino/padrino-framework | Confirms the artifact applies here, not a fork | | 2 | License is still MIT | Catches relicense before you depend on it | | 3 | Default branch master exists | Catches branch renames | | 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code | | 5 | Last commit ≤ 71 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>padrino/padrino-framework</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of padrino/padrino-framework. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/padrino/padrino-framework.git
#   cd padrino-framework
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of padrino/padrino-framework and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "padrino/padrino-framework(\\.git)?\\b" \\
  && ok "origin remote is padrino/padrino-framework" \\
  || miss "origin remote is not padrino/padrino-framework (artifact may be from a fork)"

# 2. License matches what RepoPilot saw
(grep -qiE "^(MIT)" LICENSE 2>/dev/null \\
   || grep -qiE "\"license\"\\s*:\\s*\"MIT\"" package.json 2>/dev/null) \\
  && ok "license is MIT" \\
  || miss "license drift — was MIT at generation time"

# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
  && ok "default branch master exists" \\
  || miss "default branch master no longer exists"

# 4. Critical files exist
test -f "padrino-admin/lib/padrino-admin.rb" \\
  && ok "padrino-admin/lib/padrino-admin.rb" \\
  || miss "missing critical file: padrino-admin/lib/padrino-admin.rb"
test -f "padrino-admin/lib/padrino-admin/access_control.rb" \\
  && ok "padrino-admin/lib/padrino-admin/access_control.rb" \\
  || miss "missing critical file: padrino-admin/lib/padrino-admin/access_control.rb"
test -f "padrino-admin/lib/padrino-admin/generators/admin_app.rb" \\
  && ok "padrino-admin/lib/padrino-admin/generators/admin_app.rb" \\
  || miss "missing critical file: padrino-admin/lib/padrino-admin/generators/admin_app.rb"
test -f "padrino-admin/lib/padrino-admin/generators/admin_page.rb" \\
  && ok "padrino-admin/lib/padrino-admin/generators/admin_page.rb" \\
  || miss "missing critical file: padrino-admin/lib/padrino-admin/generators/admin_page.rb"
test -f "padrino-admin/lib/padrino-admin/generators/orm.rb" \\
  && ok "padrino-admin/lib/padrino-admin/generators/orm.rb" \\
  || miss "missing critical file: padrino-admin/lib/padrino-admin/generators/orm.rb"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 71 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~41d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/padrino/padrino-framework"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

Padrino is a full-stack Ruby web framework built on top of Sinatra that adds Rails-like conveniences (routing, helpers, admin panels, mailers, caching) while maintaining Sinatra's simplicity. It solves the problem of building non-trivial web applications without the overhead of Rails, offering modular components you can use independently—generators for scaffolding, form/tag helpers, built-in admin interface with Bootstrap styling, and mountable multi-app support. Monorepo structure: root contains framework orchestration with Gemfile and Rakefile; padrino-admin/ is a self-contained gem for CRUD admin interfaces with Bootstrap-Less styling (padrino-admin/lib/padrino-admin/bootstrap-less/); padrino-gen likely handles generators; individual gems (padrino-core, padrino-routing, padrino-helpers, etc.) would be in separate directories. Assets are pre-compiled into Less stylesheets.

👥Who it's for

Ruby developers who want Sinatra's lightweight philosophy but need Rails-like features (ORM integration, admin dashboards, form builders, localization). Specifically: developers building APIs with multiple mountable applications, teams wanting a lighter alternative to Rails, and those who value pick-and-choose modularity over monolithic frameworks.

🌱Maturity & risk

Production-ready and actively maintained. The repository shows a mature, established project with CI/CD pipeline (.github/workflows/ci.yml), RuboCop linting, Yard documentation standards, and semantic versioning (CHANGES.rdoc). However, commit frequency appears moderate—typical for a stable framework that doesn't require constant updates. No signs of abandonment.

Low-to-moderate risk for active projects. Dependencies are reasonably managed given the framework's age, but it's a monorepo with padrino-admin as a significant subcomponent adding complexity. The framework depends heavily on Sinatra stability and the broader Ruby ecosystem (ActiveRecord, DataMapper, Sequel). If Sinatra or key Ruby dependencies break, Padrino users are affected. Community size is smaller than Rails, so fewer third-party integrations exist.

Active areas of work

No specific PR/milestone data visible in provided structure, but the CI/CD setup (GitHub Actions) and Dependabot configuration (.github/dependabot.yml) indicate active dependency management and automated testing. The CHANGES.rdoc file tracks releases. The codebase is JavaScript/Less-heavy in admin, suggesting recent UI updates.

🚀Get running

Clone and install:

git clone https://github.com/padrino/padrino-framework.git
cd padrino-framework
bundle install
rake test

For a new Padrino project (once installed): padrino-gen project my_app

Daily commands: Run tests: rake test (via Rakefile). Start a Padrino app: padrino start or bundle exec padrino start. Development mode with auto-reloading is default.

🗺️Map of the codebase

  • padrino-admin/lib/padrino-admin.rb — Main entry point for the padrino-admin gem; defines the module and core loading logic that all admin features depend on.
  • padrino-admin/lib/padrino-admin/access_control.rb — Core authorization and access control system; every admin endpoint must integrate with this to protect sensitive operations.
  • padrino-admin/lib/padrino-admin/generators/admin_app.rb — Generator for scaffolding admin applications; the primary entry point for developers setting up new admin panels.
  • padrino-admin/lib/padrino-admin/generators/admin_page.rb — Generator for creating individual admin pages and CRUD interfaces; used for extending existing admin applications.
  • padrino-admin/lib/padrino-admin/generators/orm.rb — ORM abstraction layer that bridges multiple database backends (ActiveRecord, Mongoid, Sequel); critical for model integration.
  • Gemfile — Declares all gem dependencies for the framework; changes here ripple across all padrino-admin functionality.
  • Rakefile — Build and release task orchestrator; entry point for testing, packaging, and distributing the gem.

🛠️How to make changes

Generate a new admin application with authentication

  1. Run the padrino admin generator which invokes padrino-admin/lib/padrino-admin/generators/admin_app.rb (padrino-admin/lib/padrino-admin/generators/admin_app.rb)
  2. The generator creates a base controller from the template (padrino-admin/lib/padrino-admin/generators/templates/app/controllers/base.rb.tt)
  3. A sessions controller template is generated for login/logout (padrino-admin/lib/padrino-admin/generators/templates/app/controllers/sessions.rb.tt)
  4. An ORM-appropriate user model is generated (e.g., ActiveRecord, Mongoid, Sequel) (padrino-admin/lib/padrino-admin/generators/templates/account/activerecord.rb.tt)
  5. Access control policies are configured in the generated admin app (padrino-admin/lib/padrino-admin/access_control.rb)

Add a new CRUD admin page for a model

  1. Run the admin page generator which uses admin_page.rb to scaffold list, show, create, edit, delete views (padrino-admin/lib/padrino-admin/generators/admin_page.rb)
  2. The generator determines the ORM via the orm.rb abstraction layer and generates model-specific actions (padrino-admin/lib/padrino-admin/generators/orm.rb)
  3. Action generators create RESTful controller methods (list, show, edit, create, update, delete) (padrino-admin/lib/padrino-admin/generators/actions.rb)
  4. Bootstrap templates are used to style the CRUD forms and tables (padrino-admin/lib/padrino-admin/bootstrap-less/forms.less)
  5. Ensure the new admin page controller inherits from or respects access_control.rb policies (padrino-admin/lib/padrino-admin/access_control.rb)

Customize admin styling and layout

  1. Edit the main Bootstrap LESS framework file to adjust core Bootstrap variables and mixins (padrino-admin/lib/padrino-admin/bootstrap-less/bootstrap.less)
  2. Override Padrino-specific admin styles in the padrino-admin.less file (padrino-admin/lib/padrino-admin/bootstrap-less/padrino-admin.less)
  3. Modify component-specific LESS files (e.g., forms.less, tables.less, navbar.less) as needed (padrino-admin/lib/padrino-admin/bootstrap-less/forms.less)
  4. Update Font Awesome icon definitions and styles (padrino-admin/lib/padrino-admin/bootstrap-less/font-awesome/font-awesome.less)
  5. Recompile LESS to CSS and test in the admin application (padrino-admin/lib/padrino-admin/generators/templates/assets/javascripts/application.js)

🔧Why these technologies

  • Sinatra — Minimal, routing-focused DSL perfect for rapid admin panel development; padrino-admin builds higher-level abstractions on top of Sinatra's solid foundation
  • Bootstrap & LESS — Responsive, battle-tested CSS framework that ships pre-configured; LESS allows variable-driven customization without recompiling source
  • Multi-ORM abstraction (ActiveRecord, Mongoid, Sequel, Ohm, Dynamoid, MiniRecord) — Enables padrino-admin to work across diverse data persistence layers; developers choose their ORM, generators adapt automatically
  • ERB templates with code generation — Familiar Ruby templating for scaffolding; generators produce human-readable, editable code rather than opaque frameworks
  • Role-Based Access Control (RBAC) — Fine-grained permission model allows admin apps to enforce least-privilege policies and prevent unauthorized operations

⚖️Trade-offs already made

  • Generator-based scaffolding rather than DSL or reflection-based auto-routing

    • Why: Explicit code generation gives developers full control and visibility; makes customization straightforward
    • Consequence: Requires re-running generators after model changes; less magical but more transparent and debuggable
  • Tight coupling to Sinatra and minimal ORM abstraction layer

    • Why: Keeps framework lightweight and focused; delegates heavy lifting to ORM of choice
    • Consequence: Cannot be used standalone without Padrino; developers must understand their chosen ORM's API
  • Bootstrap CSS as default styling with LESS customization

    • Why: Quick time-to-first-admin-page; LESS variables allow theming without forking bootstrap.css
    • Consequence: Less flexible than Tailwind for pixel-perfect design; adds LESS compilation step to build pipeline

🚫Non-goals (don't propose these)

  • Does not handle authentication from scratch—relies on ORM-specific user models and session/cookie management from Sinatra/Padrino
  • Does not provide real-time updates or WebSocket support—designed for traditional request-response admin workflows
  • Does not

🪤Traps & gotchas

No specific env vars are documented in the provided snippet, but typical Padrino apps require DATABASE_URL or similar for ORM setup. Less compilation must happen before serving (watch mode in dev, precompile in prod). Generators expect specific directory structure (app/, models/, views/, controllers/)—deviating breaks conventions. The monorepo structure means running bundle install at root installs all gems; individual components may have separate dependencies. Admin panel requires explicit mount in app—not automatic.

🏗️Architecture

💡Concepts to learn

  • Mountable Applications (Multi-App Routing) — Padrino's key differentiator from Rails—ability to mount multiple Sinatra-based apps in one process at different routes, critical for microservice architectures and modular codebases.
  • DSL-Based Routing — Padrino extends Sinatra's elegant HTTP verb DSL (get, post, etc.) with named routes and filters; understanding this is essential for building any Padrino controller.
  • Generator-Driven Scaffolding — padrino-gen creates project structure, models, controllers, and migrations via CLI; knowing generator hooks allows customizing scaffolding for your conventions.
  • Form Builder Pattern — Padrino's form_for and form_tag helpers generate HTML with CSRF tokens, nested field management, and error display; critical for secure, DRY form code.
  • Role-Based Access Control (RBAC) — padrino-admin implements RBAC for protecting admin dashboard; understanding access_control.rb is vital for restricting admin functionality to authorized roles.
  • Rack Middleware Integration — Padrino apps are Rack-compatible; knowing how to use Rack middleware for authentication, compression, CORS is essential for non-trivial deployments.
  • Less CSS Compilation — Admin UI styling uses Less (padrino-admin/bootstrap-less/); customizing admin appearance requires understanding Less variables, mixins, and compilation workflow.
  • sinatra/sinatra — Direct dependency and foundation—Padrino extends Sinatra's DSL; understanding Sinatra is essential.
  • rails/rails — Philosophical competitor offering similar feature set (routing, helpers, admin) but monolithic; Padrino is lighter alternative.
  • ruby-grape/grape — Alternative Sinatra-based framework focused on REST APIs; shares ecosystem and routing philosophy.
  • jashkenas/coffeescript — CoffeeScript compilation is common in Padrino admin UIs (JavaScript asset pipeline); related tooling.
  • activerecord/activerecord — Primary ORM choice for Padrino apps; migrations and associations heavily used with Padrino routing.

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Modernize Bootstrap LESS to Bootstrap CSS/SCSS and remove deprecated Less assets

The padrino-admin module includes an extensive Bootstrap 3-era LESS codebase (padrino-admin/lib/padrino-admin/bootstrap-less/) with 50+ .less files. Bootstrap has moved to CSS and SCSS, and LESS is largely obsolete in modern web development. This creates maintenance burden and blocks users from upgrading to current Bootstrap versions. Migrating to Bootstrap 5+ CSS/SCSS would modernize the admin UI, reduce asset complexity, and align with current web standards.

  • [ ] Remove all files under padrino-admin/lib/padrino-admin/bootstrap-less/
  • [ ] Update padrino-admin/lib/padrino-admin.rb to use Bootstrap 5 CSS from CDN or npm
  • [ ] Convert Font Awesome LESS imports to Font Awesome 6+ CSS
  • [ ] Update padrino-admin/README.rdoc with new styling approach
  • [ ] Add tests in padrino-admin test suite to verify admin UI CSS loads correctly
  • [ ] Update CHANGES.rdoc documenting the Bootstrap migration

Add GitHub Actions workflow for Ruby version matrix testing

The .github/workflows/ci.yml exists but the repo structure suggests it may not be testing against multiple Ruby versions (2.7, 3.0, 3.1, 3.2, 3.3). Given Padrino is a framework with wide adoption, contributors need confidence their changes work across supported Ruby versions. This prevents breaking compatibility inadvertently.

  • [ ] Review current .github/workflows/ci.yml to identify existing Ruby version matrix
  • [ ] If missing, add ruby-versions matrix strategy: [2.7, '3.0', '3.1', '3.2', '3.3']
  • [ ] Ensure Gemfile supports all tested Ruby versions (add ruby version constraints if needed)
  • [ ] Test padrino-core, padrino-admin, padrino-gen, and padrino-helpers in the matrix
  • [ ] Document supported Ruby versions in README.rdoc if not already present

Add comprehensive integration tests for padrino-admin access control module

The file padrino-admin/lib/padrino-admin/access_control.rb exists as a critical security component, but no corresponding test file is evident in the file structure. Access control is a high-risk area where bugs lead to security vulnerabilities. New contributors could add thorough specs covering role-based access control, permission checking, and admin authentication flows.

  • [ ] Create padrino-admin/spec/padrino_admin/access_control_spec.rb
  • [ ] Write tests for role definition and assignment
  • [ ] Write tests for permission checking (positive and negative cases)
  • [ ] Write tests for admin user authentication and session handling
  • [ ] Write tests for access denial and redirect behavior
  • [ ] Add integration tests verifying access control works with admin routes
  • [ ] Ensure test coverage is reported in CI pipeline

🌿Good first issues

  • Add test coverage for padrino-admin/lib/padrino-admin/access_control.rb—it handles RBAC but no test files visible in structure. Write specs for role checking and permission denial.
  • Document the Less customization workflow in padrino-admin/ (how to override bootstrap.less variables, compile, and deploy). Add a guides/admin-styling.md file.
  • Create example apps in examples/ showing multi-app mounting with Padrino (currently implied but not visible). A concrete 'two-apps-one-admin-panel' demo would lower onboarding friction.

Top contributors

Click to expand

📝Recent commits

Click to expand
  • 167044f — chore: remove deprecated ORM generators (DataMapper, MongoMapper, CouchRest, Ripple) (#2320) (achiurizo)
  • 14e7b8d — Fix access control path matching and link_to XSS (#2319) (achiurizo)
  • e558248 — Fix Allow header typo and Mail::Message.set guard bug (#2318) (achiurizo)
  • c31c99c — Add HAML 6/7 compatibility (#2317) (achiurizo)
  • a63de9a — Add Ruby 4.0 compatibility (#2316) (nesquena)
  • f71cf79 — Bumped version to 0.16.1 (nesquena)
  • a079eae — Change HAML setup to support newer versions (#2312) (crashtech)
  • 1555f27 — loosen bundler restriction to <5 (#2311) (achiurizo)
  • e40808a — Bumped version to 0.16.0 (nesquena)
  • f10d100 — Update changelog (nesquena)

🔒Security observations

The Padrino framework appears to be a mature project with reasonable structure, but several security considerations require attention. The main risks involve the admin panel's access control implementation, code generation security (CSRF, XSS, SQLi prevention), and dependency management. The framework should provide clear security guidelines for developers. No critical vulnerabilities are apparent from the static file structure analysis, but comprehensive code review of the actual implementations (especially access_control.rb, generators, and middleware) is strongly recommended. Ensure automated security scanning and regular dependency updates are in place.

  • Medium · Admin Panel Access Control Review Required — padrino-admin/lib/padrino-admin/access_control.rb. The padrino-admin component includes access_control.rb which handles authentication and authorization. Without examining the actual implementation, there's potential risk if access control is not properly enforced on all admin routes, potentially allowing unauthorized access to administrative functions. Fix: Conduct a thorough security audit of the access control implementation. Ensure all admin routes require proper authentication, implement role-based access control (RBAC), and validate user permissions on every request.
  • Medium · Generated Code Security in Admin Generators — padrino-admin/lib/padrino-admin/generators/templates/. The admin generator templates create boilerplate code for models, controllers, and views. Improperly configured generators could produce code vulnerable to SQL injection, XSS, or CSRF attacks if they don't include proper sanitization or CSRF protection by default. Fix: Review all ERB template files (.tt) to ensure they include proper input validation, output encoding, CSRF tokens, and parameterized queries. Test generated code for common vulnerabilities.
  • Low · Dependency Management and Outdated Components — Gemfile, gem specifications. The Gemfile and dependency specifications are not visible in the provided file structure. Bootstrap-less files are included but Bootstrap versions may be outdated. No evidence of automated dependency scanning or pinned versions shown. Fix: Ensure all dependencies are tracked and regularly updated. Use tools like bundler-audit or Dependabot to scan for known vulnerabilities. Pin gem versions in Gemfile.lock to ensure reproducible builds.
  • Low · Third-party Assets (Bootstrap/Font Awesome) — padrino-admin/lib/padrino-admin/bootstrap-less/. The framework includes bootstrap-less and font-awesome components as embedded assets. These may contain outdated or vulnerable versions of front-end libraries. Fix: Regularly update Bootstrap and Font Awesome to latest stable versions. Consider using a package manager (npm/yarn) for front-end dependencies instead of embedding them. Audit CSS/LESS for XSS vulnerabilities.
  • Low · Missing Security Headers Configuration Documentation — README.rdoc, configuration files. No visible configuration for security headers (HSTS, CSP, X-Frame-Options, etc.) in the provided file structure. Framework documentation should guide users on implementing these headers. Fix: Document security best practices including Content Security Policy (CSP), HSTS, X-Frame-Options, and other recommended security headers. Provide example configurations or middleware for common security headers.

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Healthy signals · padrino/padrino-framework — RepoPilot