API & Backend
Rust CRUD API — Warp · Postgres
A JWT-secured REST API in Rust: Warp handlers, sqlx, Postgres, role-based routes.
A production-shaped Rust boilerplate. Warp 0.4 handlers over sqlx 0.9 and Postgres 18, argon2id password hashing, JWT auth with User / Admin role checks, and a full users / articles / comments CRUD surface — laid out as routes → handlers → service per module. The schema is applied on startup, and one `docker compose up --build` runs the API with its database.
What's inside
- Full users + articles CRUD, with comments
- JWT auth with role-based route guards
- sqlx over Postgres — typed row mapping, no ORM
- argon2id password hashing
- compose: API + Postgres 18, schema applied on startup
- Multi-stage Dockerfile → distroless, non-root
Quickstart
$ git clone https://github.com/devai-io/devai_boilerplates.git$ cd devai_boilerplates/rust-crud-sql-api$ docker compose up --build # API on http://localhost:8080
about this series
One of the devai.io advanced Rust boilerplates — a real, batteries-included starting point for a Rust web API, brought up to date.
More in API & Backend
view allAPI & Backend
Rust CRUD API — Warp · MongoDB
The same JWT-secured Rust API, backed by MongoDB instead of Postgres.
Rust 2024warp 0.4mongodb 3.9MongoDB 8+2
View template zip + preview
API & Backend
Rust CRUD API — Actix · MongoDB
Actix-web 4 + MongoDB with JWT from cookie or Bearer, and rotating refresh tokens.
Rust 2024actix-web 4MongoDB 8JWT+2
View template zip + preview