Write Less Code, Build More Features.
The Productive Framework. Developer-friendly, lightning fast, and designed for rapid development.
See how easy it is to validate input, save to the database, and return a response.
proc createTodo*(ctx: Context) {.async.} =
# 1. VALIDATE (Automatic 422 on failure)
let data = ctx.validate(%*{
"title": "required|min:3",
"priority": "int|between:1,5"
})
# 2. DATABASE (Fluent API)
let id = DB.table("todos").insert(%*{
"title": data["title"].getStr,
"priority": data["priority"].getInt,
"completed": 0
})
# 3. RESPONSE
ctx.status(201).json(%*{"id": id, "status": "created"})Jazzy comes batteries-included so you can focus on your product, not the plumbing.
- ⚡ Lightning Fast: Powered by
Mummy, keeping your app blazing fast. - 🛡️ Built-in Auth: JWT Authentication and Middleware ready to go.
- 💾 Fluent ORM: A lightweight, expressive query builder.
- ✅ Validation: Declarative validation rules (Laravel style).
- ⚙️ Zero Config: Auto-loads
.envand just works.
nimble install jazzyimport jazzy
proc home(ctx: Context) =
ctx.text("Hello Jazzy!")
Route.get("/", home)
Jazzy.serve(8080)Run it:
nim c -r app.nimJazzy makes database interactions trivial.
connectDB("app.db")
# Fetch
let users = DB.table("users").where("active", 1).get()
# First
let user = DB.table("users").where("id", 5).first()
# Insert
DB.table("logs").insert(%*{"level": "info", "msg": "Login"})Organize your routes cleanly. Secure them with middleware easily.
Route.groupPath("/api/v1", guard):
Route.get("/todos", listTodos) # required bearer token
Route.post("/todos", createTodo) # required bearer token
Route.delete("/todos/:id", deleteTodo) # required bearer tokenSecure your app in minutes.
# Login
let token = ctx.login(%*{"id": 1, "role": "admin"})
# Protect
if ctx.check():
echo "User is logged in!"Jazzy supports Basic Auth via the basicAuthGuard middleware.
Add credentials to your .env file:
BASIC_AUTH_USER=admin
BASIC_AUTH_PASSWORD=secret123Then use the basicAuthGuard middleware on routes that need protection:
Route.groupPath("/admin", basicAuthGuard):
Route.get("/", admin_controller.index)Jazzy automatically reads your .env file.
JWT_SECRET=my-secret-keylet secret = getConfig("JWT_SECRET")Jazzy pays the boilerplate tax so you don't have to.
Made with ❤️ by the Jazzy Team.