---
url: /runcobo/guide/introduction.md
description: >-
  What Runcobo is — a batteries-included web framework for Crystal — and the
  ideas behind it.
---

# What is Runcobo?

Runcobo is a **batteries-included web framework for [Crystal](https://crystal-lang.org)**. It ships everything you need to go from a first route to a production deploy — typed input validation, JSON and HTML views, uploads, static files, logging and error handling, plus a toolchain for databases, migrations and SQL code generation.

It's built around one idea: **everything about an endpoint lives together** — its route, the input it accepts, its logic and its response, side by side in one folder.

```crystal [src/actions/posts/create_post.cr]
class Posts::CreatePost < Blog::BaseAction
  post "/posts"                              # where it lives

  call do
    input = validate(CreatePostContract)     # what it accepts
    post = store.create_post(author_id: input.author_id, title: input.title)
    render status_code: 201                  # what it returns
  end
end
```

The route, the accepted input and the logic sit in one class. Its contract and its response template sit right beside it, in the same folder:

* `CreatePostContract` (in `create_post_contract.cr`) declares the fields the endpoint accepts and their types — [Request Contracts](/guide/contracts).
* `render` sends `create_post.jbuilder`, which lists the response fields — [Views](/guide/views).
* `store.create_post` is a typed method generated from a SQL query — [Database Access](/guide/database).
* `Blog::BaseAction` is your application's base class for every action — [Project Structure](/guide/project-structure#blog-baseaction).

## Core ideas

**One endpoint, one folder**

An action, its contract and its template sit side by side. Run [`cobo routes`](/cli/#cobo-routes) to find the code behind any URL.

**Typed input at the boundary**

The first line of `call` [validates](/guide/contracts) the request. After it, `input.title` is a `String`; bad requests get a `422`.

**Checked by the compiler**

Routes, contracts, templates and layouts compile into your binary. A missing template is a build error, not an incident.

**A SQL-first ORM**

[crsql](/guide/database) turns the SQL you write into typed methods for PostgreSQL, MySQL or SQLite.

**One way to do each thing**

One way to read input, one way to render, one way to pass dependencies — so every Runcobo app reads the same.

**Explicit wiring**

Middleware is a plain array you can read and reorder. Dependencies reach actions through the request context, not globals.

## What's in the box

| Area | What you get |
| --- | --- |
| Routing | Routes declared on actions, typed path parameters, custom HTTP methods, route listing |
| Input | [Request contracts](/guide/contracts) for path, query, form and JSON input — types, constraints, nested objects, cross-field rules |
| Uploads | [Multipart uploads](/guide/uploads) with size, file and field limits, atomic saving and automatic cleanup |
| Output | [JSON, text, files, redirects, empty responses](/guide/responses) |
| Views | Compile-time [Jbuilder](https://github.com/shootingfly/jbuilder) (JSON) and [Water](https://github.com/shootingfly/water) (HTML) templates, with layouts and partials |
| Server | Request IDs, structured logging, error handling, static files, graceful shutdown, TLS, trusted proxies |
| Database tooling | Local databases for PostgreSQL, MySQL and SQLite, SQL migrations with [verified rollbacks](/cli/database#verifying-migrations), staging/production migration commands |
| ORM | [crsql](/guide/database): typed query methods [generated](/cli/codegen) from SQL for PostgreSQL, MySQL and SQLite, with a CI check |
| Tooling | One CLI, `cobo`: dev server, console, script runner, project tasks, test runner |

## Next steps

**Install** →

Add Runcobo to a project.

**Quick Start** →

Build a JSON API in five minutes.

**Project Structure** →

See how a full application is laid out.
