No description
- Rust 100%
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
MiniCMS
MiniCMS is a lightweight, self‑contained content management system written in Rust. It uses Actix‑Web for the HTTP server and Turso for a local SQLite‑like database. The goal is to provide a minimal, easy‑to‑run example that can be extended for learning or small projects.
Features
- Simple API – A few endpoints for creating, reading, and listing posts.
- Admin panel – A very small HTML interface for editing pages and posts.
- Local database – Uses Turso’s local mode to store data in a single file (
my-database.db). - Zero configuration – Just run
cargo runand the server starts on127.0.0.1:8080.
Getting Started
Prerequisites
- Rust (stable) – install from https://rustup.rs/
- Cargo – comes with Rust.
Build and Run
# Clone the repository
git clone https://github.com/your-username/minicms.git
cd minicms
# Build and run the server
cargo run
The server will start and you can visit:
http://127.0.0.1:8080/– Hello world endpoint.http://127.0.0.1:8080/hey– Manual hello endpoint.http://127.0.0.1:8080/echo– POST endpoint that echoes the request body.
Admin Panel
The admin panel is a simple HTML page located in templates/admin.html. It allows you to create and edit posts. To access it, navigate to:
http://127.0.0.1:8080/admin
Note
: The admin panel is intentionally minimal and does not include authentication. For production use, add proper authentication and validation.
Project Structure
├── Cargo.toml
├── src/
│ ├── main.rs # Application entry point
│ ├── database.rs # Database helper functions
│ └── templates/
│ └── admin.html # Simple admin UI
└── minicms.db # SQLite database file (created on first run)
Extending MiniCMS
- Add routes – Add new Actix routes in
main.rs. - Add models – Define new database tables in
database.rs. - Improve UI – Replace the static
admin.htmlwith a full‑featured frontend.
License
MIT © 2026 Alex Wellnitz