API & Backend
Rust CRUD API — Warp · MongoDB
The same JWT-secured Rust API, backed by MongoDB instead of Postgres.
The document-database sibling: Warp 0.4 over the official mongodb 3.9 driver, argon2id password hashing, JWT auth with User / Admin role checks, and the same users / articles / comments CRUD surface — with comments embedded in their article. Unique indexes are ensured on startup, and one `docker compose up --build` runs the API with MongoDB 8.
What's inside
- Full users + articles CRUD, with comments
- JWT auth with role-based route guards
- Official MongoDB driver, typed models
- argon2id password hashing
- compose: API + MongoDB 8, indexes ensured on startup
- Multi-stage Dockerfile → distroless, non-root
Quickstart
$ git clone https://github.com/devai-io/devai_boilerplates.git$ cd devai_boilerplates/rust-crud-nosql-api$ docker compose up --build # API on http://localhost:8080
about this series
One of the devai.io advanced Rust boilerplates — a Warp + MongoDB starting point with auth already wired, brought up to date.
More in API & Backend
view allAPI & Backend
Rust CRUD API — Warp · Postgres
A JWT-secured REST API in Rust: Warp handlers, sqlx, Postgres, role-based routes.
Rust 2024warp 0.4sqlx 0.9PostgreSQL 18+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