Crystal web framework

The batteries-included framework for Crystal

Routing, controllers, views, a real ORM, generators and a CLI — with sane defaults, so building a web app feels like the framework is working for you.

  • 992 specs passing
  • SQLite + PostgreSQL
  • Linux · macOS · Windows

MIT licensed · Star on GitHub

terminal — quick start
$ curl -fsSL https://github.com/Arab-Open-Source/Altair/releases/latest/download/install.sh | sh # verifies SHA-256, installs to ~/.local/bin $ altair --version Altair 0.3.x

One framework, the whole stack

Everything a web app needs ships together and agrees on conventions — typed at compile time, so renames break the build instead of the page.

Segment-based routing

Typed to: PagesController.index references, resources, constraints, globs and redirects.

Controllers

Per-request instances, typed params, filters, callbacks and content negotiation.

Views

Compile-time ECR with auto-escaping, layouts, partials and a form builder.

Sessions and auth

Signed cookies, flash, CSRF and full registration via altair g auth.

Secure by default

Security headers, request ids, sliding-window rate limiting and opt-in CORS.

CLI + generators

new, g scaffold, server, routes and database commands.

Performance

Measured under real load

A public k6 harness compares Altair with Express and Fiber on identical PostgreSQL-backed CRUD endpoints — 1,000 virtual users for 60 seconds.

Write · POST /items

13,167 req/s

1.8x Express throughput · best write max latency of all three.

Read · GET /items/:id

14,687 req/s

1.9x Express throughput · zero failed requests in every run.

Methodology

1,000 VUs · 60s

Full report with latency tables and the tail-latency investigation.

Start here

Documentation

Install once, scaffold in seconds, and learn the framework guide by guide.

Install

One-command setup on Linux, macOS and Windows with checksum verification.

Usage

Create a project, generate a scaffold and run the server.

Guides

Routing, controllers, views, the ORM, sessions, security and uploads.

CLI reference

Every command and generator, with flags and examples.