4 Layers
domain -> app -> infra -> http
I build secure, observable backend systems with typed boundaries. This portfolio runs on the same real auth, Postgres, and SSE stack I ship in production-style projects.
This site is both my portfolio and a working app platform. The sections below are wired to real runtime behavior, not static mockups.
4 Layers
domain -> app -> infra -> http
1 SSE Stream
Per visitor session, fanout across tabs
Typed Contracts
DTO -> command -> domain -> SQL row
Guardrails On
CI checks + centralized error mapping
Use the slider to send a large burst of requests from this browser and watch live request logs and SSE updates in real time.
Burst size: 1000 requests
Concurrency: 24 workers
Ready. Choose a burst size and run the load.
Try live posts as the demo user. Sign in to send as yourself.
Room: Lobby
hello
hello
blah
this is from
hello
helloooooooo
blah
aaa
blah
ok
test
asda
asd
asda
aaa
test
there!
a
k
aa
a
hello
hello
blah
this is from
hello
helloooooooo
blah
aaa
blah
ok
test
asda
asd
asda
aaa
test
there!
a
k
aa
a
Run the chat demo and watch request, DB, and SSE behavior stream in real time.
No backend events yet. Trigger a demo action to start streaming.
No network events yet. Trigger a demo action to populate this table.
Three high-signal slices from this project, each tied to working routes and code.
Capstone
End-to-end message path with persistence, moderation, rate limiting, and SSE fanout.
Security
axum-login and tower-sessions on top of Postgres-backed storage with encrypted cookies.
Observability
Typed log targets/messages separate operational signal from deep diagnostics.
Each tab maps to a concrete capability in this workspace: auth durability, boundary-safe flows, observability, and live chat delivery.
Example runtime facts from the active auth/session stack.
Encrypted cookies and durable Postgres-backed sessions keep identity consistent across requests.
Built withaxum-logintower-sessionspostgres
A single chat request moving through each layer.
Transport, policy, domain invariants, and persistence stay separated by typed handoffs.
Cratesdomainappinfrahttp
What is emitted while a chat message is posted and broadcast.
Request spans, live logs, and SSE patches make behavior inspectable while the app runs.
Signalstracingssedatastarlog panels
Core controls in the chat path.
A complete request -> validate -> persist -> broadcast path with moderation and rate limiting.
Includespersistencerate limitmoderationsse fanout
Concrete patterns from this codebase, with real snippets and why each choice is maintainable.
App defines contracts and infra implements mechanisms, so policy stays stable as storage evolves.
Scopedomainappinfrahttp
Example: crates/app/src/chat/mod.rs
pub trait ChatRepository: Send + Sync {
async fn create_room(
&self,
name: room::RoomName,
created_by: room::UserId,
) -> Result<room::Room>;
}Enums and newtypes move correctness checks to compile time and reduce typo-prone runtime branching.
Patternenumnewtypestrum
Example: crates/domain/src/chat/message.rs
#[derive(Debug, Clone, Copy, PartialEq, Eq, strum_macros::Display, strum_macros::EnumString)]
pub enum MessageStatus {
#[strum(serialize = "visible")]
Visible,
#[strum(serialize = "pending")]
Pending,
#[strum(serialize = "removed")]
Removed,
}Handlers stay focused on workflow while response behavior remains consistent across pages and partials.
Outcomeconsistencyclaritysafety
Example: crates/http/src/error.rs
pub enum Error {
Internal,
Unauthorized,
Validation(Text),
Chat(app::chat::Error),
User(app::user::Error),
Auth(app::auth::Error),
}Live and diagnostic streams are intentionally separated so users see signal instead of noise.
Built ontracingSSEtyped targets
Example: crates/http/src/trace_log.rs
#[derive(Clone, Copy, Debug, PartialEq, Eq, Display, EnumString)]
pub enum LogTargetKnown {
#[strum(serialize = "demo.request")]
DemoRequest,
#[strum(serialize = "demo.db")]
DemoDb,
#[strum(serialize = "demo.sse")]
DemoSse,
#[strum(serialize = "http::router::layers")]
RouterLayers,
}Shared typed components reduce duplication and make broad UI changes local and safe.
Techniquemaud::Renderbuildertyped props
Example: crates/http/src/views/partials/demo/log/row.rs
#[derive(Clone, Debug, Builder)]
pub struct Row {
pub timestamp: Text,
pub message: Text,
#[builder(default)]
pub pills: Vec<Pill>,
}Builder pipelines make dependency wiring self-documenting and less error-prone over time.
Outcomereadabilitymaintainabilityexplicit wiring
Example: crates/http/src/state.rs
#[builder]
pub fn from_parts(
#[builder(setters(name = with_user))] user: app::user::Service,
#[builder(setters(name = with_auth))] auth: app::auth::ProviderImpl,
#[builder(setters(name = with_chat))] chat: app::chat::Service,
#[builder(setters(name = with_sse))] sse: crate::sse::Registry,
) -> Self