all templates
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

Browse the code

The full source, exactly as it ships in the repo.

loading…
Download .zip
loading tree…

about this series

One of the devai.io advanced Rust boilerplates — a Warp + MongoDB starting point with auth already wired, brought up to date.