After 2 years of learning Rust, I finally shipped my first public project.
It's a boilerplate starter kit for building Web API with Rust. The architecture is inspired by NestJS, Spring Boot, and Laravel. I took the best patterns from those and adapted them to work properly in Rust.
GitHub: https://github.com/thomijasir/axum-starter
The Stack
| Layer | Technology |
|---|---|
| Web Framework | Axum 0.8 |
| ORM | Diesel 2.3 (SQLite dev / PostgreSQL prod) |
| Auth | JWT + Argon2 |
| Docs | OpenAPI / Swagger (dev only) |
| Logging | Tracing (structured JSON) |
| IDs | Snowflake (distributed-safe) |
Architecture pattern: Controller → Service → Repository. Strict unidirectional. Nothing leaks between layers.
Get Running in 30 Seconds
git clone https://github.com/thomijasir/axum-starter
cd axum-starter
./run.sh dev
Server starts at http://localhost:3099. Swagger UI at http://localhost:3099/spec.
Note:
run.shis the task runner. It auto-loads the correct.envfile per environment so you don't set variables manually.
Sample Endpoints Already Wired Up
POST /auth/register
POST /auth/login
POST /auth/refresh
GET /user/profile
POST /attachment (file upload with MIME validation)
GET /spec (Swagger UI, dev only)
These are sample endpoints. Remove what you don't need, add what you do.
Why I Built This
When I started learning Rust for web API development, there was no solid reference I could follow. Most tutorials stop at "hello world." Nobody shows you how to structure a real project with auth, file uploads, migrations, and proper layering all working together.
So I built the reference I wish I had.
This project is not perfect. I'm sharing it because I need feedback from real developers. If you spot something wrong or something that could be better, please open an issue or PR. I'll be happy to review it.
Full Article
The full breakdown with architecture deep dive, project structure explanation, environment setup, and documentation guide is on my website.
If this is useful, a on GitHub would help a lot. Once it hits 100 stars I'll submit it to Awesome Rust.

Top comments (0)