Skip to content

olekspickle/axum-template

Repository files navigation

axum-template

axum-template demo Axum Template - Portfolio/blog website template

Overview

Portfolio/blog website template for a company that does software/games projects

This template provides:

  • Axum server with middleware
  • Askama templates
  • Containerization (with compose)
  • Portfolio projects management
  • Blog with markdown support
  • Admin panel with authentication
  • SQLite backend (default)
  • SurrealDB backend (optional, behind feature flag)
  • RBAC (User/Editor/Admin)
  • HttpOnly cookie support
  • Rate limiting on login
  • Enable HTTPS
  • Add login page template
  • Audit logging
  • Secure cookie flag
  • Password reset flow
  • Remember me checkbox with longer token TTL

Running

# SQLite3 backend:
make run

# SurrealDB backend
make surreal

You can peek into Makefile for build details

Configuration

Edit config.toml to configure:

  • Server host/port
  • Database path
  • Admin credentials (password is argon2 hashed)
  • Site name and tagline

Afterthoughts and issues

I found axum to be the most ergonomic web framework out there, and while there might be not enough examples at the moment, it is quite a breeze to use

  • static files was sure one noticeable pain in the rear to figure out
  • surrealdb sure adds complexity, I'm adding it under a feature because sqlite integration is so much less crates to compile(190+ vs 500+)

License: MIT OR Apache-2.0

About

Axum template(with static templates) + SQLite + dockerization

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENCE-APACHE
MIT
LICENCE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors