AGENTS.md
This file contains guidelines for AI coding agents working on this repository.
Project Overview
Personal Page is a static website built with Rust (Actix-web) and Maud templating. It features a dark theme personal portfolio website.
Build/Lint/Test Commands
# Run the application
just run
# Format code
just fmt
# Run verification
just verify
# Build release
just build
Direct Cargo Commands
# Check code without building
cargo check
# Run linter
cargo clippy
# Format code
cargo fmt
# Run tests
cargo test
# Build release
cargo build --release
Code Style Guidelines
Imports
- Group imports: std library first, then external crates, then local modules
- Use
use crate::for local module imports
Formatting
- Run
cargo fmtbefore committing - Run
cargo clippyand fix all warnings - 4 spaces for indentation (Rust default)
Types and Naming
- Structs/Enums: PascalCase
- Functions/Variables: snake_case
- Constants: SCREAMING_SNAKE_CASE
- Modules: snake_case
Error Handling
- Use
Result<T, E>for fallible operations - Propagate errors with
?operator when appropriate - Handle
Optionwithif letormatchrather than.unwrap()
HTML/Views
- Use
maudfor HTML templating - Use
maud::html!macro for markup - Use
maud::DOCTYPEfor doctype declaration - Check for
HX-Requestheader to determine if rendering full layout or partial content
Request Handlers
- Use Actix-web macros:
#[get("/path")],#[post("/path")] - Return
impl Responderor specific types likeAwResult<maud::Markup>
Environment Variables
PORT: Server port (default: 8080)LOG_LEVEL: Logging level (default: info)
Endpoints
/- Home page/about- About page/projects- Projects portfolio/contact- Contact page/health- Health check endpoint/up- Up/ready check endpoint (returns 200 when server is ready)/assets/*- Static assets (CSS, JS)
Dependencies
Key crates used:
actix-web: Web frameworkmaud: HTML templating (with actix-web feature)env_logger: Loggingtokio: Async runtime
Styling
Uses Tachyons CSS (t.css) with a dark theme:
- Black background (
bg-black) - White text (
white) - White opacity variants (
white-70,white-60,white-50)
Static Assets
Assets are embedded in the binary using include_str!:
t.css- Tachyons CSSh.js- HTMX libraryhx-response-targets.js- HTMX response targets extension