all templates
Blog Engines

Blog Engine — Rust · MongoDB

Rust + MongoDB: the blog engine with documents instead of rows.

The Rust implementation on MongoDB via the official mongodb crate. Same axum surface as the Postgres sibling; BSON documents and startup-ensured indexes take over from sqlx. Argon2 local auth, JWTs, and the standard Clerk/Auth0 swap examples included.

What's inside

  • Full CRUD + publish flow for markdown posts
  • Local auth: users collection, argon2, HS256 JWT
  • Drop-in Clerk & Auth0 JWT verifier examples
  • Official mongodb crate, typed BSON models
  • Indexes ensured on startup
  • docker-compose with healthchecked MongoDB

Quickstart

$ curl -LO https://devai.io/downloads/blog-rust-mongo.zip$ unzip blog-rust-mongo.zip && cd blog-rust-mongo$ cp .env.example .env$ docker compose up --build

Browse the code

The full source, exactly as the zip ships it.

loading…
Download .zip
loading tree…

about this series

Part of the devai.io blog engine series: one contract, eight backends — compare languages on identical ground.