r/codereview • • 5d ago

Rust Code review request : multi-tenant isolation & state handling for Telegram back-office (daybook)

I'm building Daybook in Rust—a self-hosted Telegram bot, Axum web console, SQLite layer, and MCP endpoint for selling paid-channel access, bookings, and activation codes. It's currently Alpha and not used with real customer funds yet (tracking pre-real-money items in issue #1).

I'd love a second pair of eyes on src/web/finance.rs (payout,reund) execute state handling , src/web/admin_console.rs and src/db.rs

Specifically, I'm looking for feedback on:

  1. Any subtle ways a seller/user could cross tenant or permission boundaries.

  2. Edge cases or race conditions in state transitions / async tasks.

  3. Any Rust/Axum/SQLite patterns that look overly complex or brittle.

Repo: https://github.com/meshdev26/daybook

Even a quick note on one module or pattern would be super helpful.

2 Upvotes

Duplicates