convez.ai
MCP Server
backant-io

jerrycan

backant-io/jerrycan

Ver no GitHub
InicialPluginScore · de 0 a 100

jerrycan — the AI-native Rust backend platform: framework, CLI, and MCP server. https://jerrycan.cc

Instalação

$npx convez-ai backant-io/jerrycan

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
9
Forks
0
Acompanhando
0
Saúde
50%
Último commit
há 2 meses
Versão
v0.7.30
Issues abertas
6
Contribuidores
1

README

A tradução para o português deste README ainda está na fila.

jerrycan

The AI-native Rust backend platform.

Backends designed, generated, verified, and packaged by AI agents — on a framework built from the ground up for exactly that.

CI crates.io license

jerrycan.cc · AI-native docs · Platform contracts · Design spec · Roadmap


What is jerrycan?

jerrycan is two inseparable halves:

  1. A backend framework — a ground-up rewrite of the Flask/Werkzeug concept space in Rust: leanest possible core, async-only on tokio + hyper, trait-based extensions, secure by default.
  2. A generation platform — one jerrycan binary that is both a CLI and an MCP server, through which AI agents design → generate test-first → verify → package complete, deployable backends.

Humans don't write the code — agents do, guided by documentation where every example is a compiling, running doc-test, and by machine-readable contracts for every tool.

Status: 0.1.0, first release. Phases 0 (core API + frozen contracts), 1 (CLI + MCP core loop), 2 (data & test-first generation), 3 (auth, observability, jerrycan package), and 4 (fuzzing, agent evals, diagnostics polish) are complete and fully tested. This is the first usable release — crates are at 0.1.0 (publish-pending; the maintainer runs scripts/publish.sh). Early but real; expect rough edges as it grows.

A taste

use jerrycan::prelude::*;

// A route module — Flask's Blueprints, reborn with compiler-enforced boundaries.
pub fn module() -> Module {
    Module::new("todos")
        .route("/", get(list).post(create))
        .route("/{id}", get(show).delete(remove))
        .mount("/{id}/comments", comments::module()) // subroutes nest arbitrarily
        .provide(TodoRepo::new())                    // module-scoped dependency
}

async fn list(repo: Dep<TodoRepo>) -> Result<Json<Vec<Todo>>> {
    Ok(Json(repo.all().await?))
}

#[jerrycan::main]
async fn main() -> Result<()> {
    App::new().mount("/todos", todos::module()).serve().await
}

Dependencies are jerrycan's signature feature — async, nested, memoized per request, and guards are just dependencies:

async fn current_user(session: Dep<Session>, db: Dep<Db>) -> Result<User> { /* ... */ }
async fn admin_only(user: Dep<User>) -> Result<Admin> { /* ... */ }

async fn remove(_: Dep<Admin>, repo: Dep<TodoRepo>, Path(id): Path<i64>) -> Result<NoContent> {
    repo.delete(id).await?;
    Ok(NoContent)
}

Testing runs real requests in memory — no sockets, and any dependency can be faked in one line:

let t = app().into_test().override_dep(Db::fake());
assert_eq!(t.get("/todos/").await.status(), jerrycan::http::StatusCode::OK);

Why jerrycan

Built for AI generationEverything a handler needs is visible in its signature. One fractal project shape, learned once. Docs follow a fixed, machine-friendly structure — and every example is executed in CI, so docs can never lie.
Secure by defaultBody limits, strict input handling, no internals leaked in errors. Every framework error carries a stable JC#### code that deep-links into the docs. #![forbid(unsafe_code)] everywhere.
Fail loudConflicting routes are build-time errors, before serving. Missing dependencies and cycles are coded errors, not mysteries.
TDD as a workflow, not a virtueThe MCP tools enforce design-first → failing acceptance tests → implement → verify → package. The design becomes executable acceptance criteria.
Multi-agent readyGenerated apps are crate-per-module workspaces: one agent owns one route crate, the compiler enforces the boundaries, shared files are generator-owned. Parallel agents merge without conflicts.
Deploy anywherejerrycan package produces static binaries, hardened container images, k8s manifests, or systemd units — with an SBOM.

Architecture

crates/
├── jerrycan          # facade + the CLI/MCP binary — apps depend on this
├── jerrycan-core     # routing, extractors, DI, modules, middleware, errors, test client
├── jerrycan-macros   # #[jerrycan::main]
├── jerrycan-db       # SQL + migrations
├── jerrycan-auth     # sessions, JWT, guards
├── jerrycan-validate # validation + OpenAPI
└── jerrycan-observe  # logs, /healthz, /metrics
docs/
├── ai/               # the AI-native docs — every example is a CI-run doc-test
└── contracts/        # MCP tool schemas, design.json schema, CLI UX spec

The agent workflow

jerrycan_design   → requirements become a validated design.json (pointed questions, not guesses)
jerrycan_scaffold → workspace shell + one route-module crate per design module
jerrycan_gen_tests→ failing acceptance tests, generated from the design
   (agent implements handlers, guided by the docs tools)
jerrycan_check    → build + clippy + audit + tests + jerrycan lints, machine-readable diagnostics
jerrycan_package  → hardened artifacts + SBOM, only when everything is green

Roadmap

PhaseScopeStatus
0 — ContractsCore API spike (DI, modules, routing, serving) + AI docs + MCP/CLI contracts✅ complete
1 — Core loopjerrycan CLI (new/generate/dev/check) + MCP server✅ complete (incl. 1b hardening)
2 — Data & TDDjerrycan-db, jerrycan-validate + OpenAPI, per-module test generation✅ complete
3 — Productionjerrycan-auth, jerrycan-observe, jerrycan package (Docker/k8s/binary/systemd)✅ complete
4 — HardeningFuzzing, agent evals, diagnostics polish → v0.1.0✅ complete
v0.1.0First release (publish-pending: maintainer runs scripts/publish.sh)🚀

The full plan lives in the design spec; deferred items are tracked in the backlog.

Install

These work once 0.1.0 is published (publish is maintainer-pending).

# In an app — the framework facade with the extensions you need:
cargo add jerrycan --features db,auth,validate,observe

# The CLI + MCP server (the generation platform):
cargo install jerrycan

Agent eval

The headline metric: an opus agent, given only the published docs surface (jerrycan docs … — no framework source, no test fixtures), scaffolds and fully implements backends that build, pass jerrycan check, and serve real CRUD over HTTP. Latest run: 5/5 (100%) — see conformance/eval/results.md (floor 4/5, target ≥ 90%).

Development

cargo test --workspace --all-features   # CI runs this — every docs example is a doc-test
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo fmt --all --check
cargo bench                             # criterion benches (routing, extraction)
cargo +nightly fuzz run <target>        # fuzz targets live in fuzz/ (outside the workspace)

The project is built docs-first and test-first: documentation examples are the executable specification.

Support

If jerrycan's direction resonates with you, you can fuel it:

License

Licensed under either of Apache License 2.0 or MIT License at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Ver o original no GitHub

Bom para

Relacionados