A multi-component blog system written in Rust: HTTP + gRPC backend, WebAssembly frontend, CLI tool, and a shared client library — all in a single Cargo workspace.
Highlights:
- Dual-protocol backend: REST (Actix-web) and gRPC (Tonic) serving the same domain logic
- Frontend in Rust compiled to WebAssembly (Yew) — no JavaScript framework involved
- JWT-based authentication
- PostgreSQL with compile-time checked queries (sqlx) and migrations
- Shared client crate reused by both the CLI and the WASM frontend
Stack: Rust · Actix-web · Tonic (gRPC) · Yew (WASM) · PostgreSQL · sqlx · Docker
This repository is a Rust workspace containing the following projects:
- blog-server: The backend API server supporting both HTTP (Actix-web) and gRPC (Tonic).
- blog-wasm: A modern frontend built with Yew, compiled to WebAssembly.
- blog-cli: A command-line interface tool to interact with the blog system.
- blog-client: A shared library providing HTTP and gRPC client implementations for the blog system.
- Rust (latest stable version)
- Trunk (for building the WASM frontend)
- Docker (for running the database)
- sqlx-cli (for database migrations)
The server requires a PostgreSQL database. You can start one using Docker and the init script:
chmod +x scripts/init_db.sh
./scripts/init_db.shAPP_JWT__SECRET=<secret> cargo run -p blog-serverThe server will start an HTTP API on port 3000 and a gRPC server on port 50051 (defaults).
cd blog-wasm
trunk serveThe app will be available at http://localhost:8080.
cargo run -p blog-cli -- --helpMIT or Apache-2.0