Skip to content

Rewrite backend in Rust (FastAPI → Rust) #1

Description

@moonexpr

Goal

Rewrite the Python/FastAPI backend (backend/app) in Rust, motivating the move of this fork into the Monogarden (~/Garden/external/claude-deck) where it can later integrate with the harvest build system and shared Rust libs.

Context

  • Forked from adrirubio/claude-deck @ 0ea9286 (v1.1.0).
  • Currently deployed on moonray (FreeBSD home server) as the Python backend serving the built React frontend, behind Cloudflare Access at deck.moonexpr.com. Deployment is the interim state; the Rust rewrite is the end goal.
  • Frontend (React 19 + Vite) stays as-is; this is a backend-only port.

Scope (high level — to be decomposed)

  • Choose Rust web framework (axum/actix) + async SQLite (sqlx)
  • Port /api/v1 routers: config, mcp, commands, plugins, hooks, permissions, agents, backup, sessions, usage, memory, cc-bridge, etc.
  • Preserve the exact JSON contract the frontend expects (no frontend changes)
  • Reproduce CC Bridge (tmux discovery + PTY relay) — the most involved subsystem
  • Serve the built frontend/dist as static assets
  • Maintain SQLite schema + WAL behavior
  • Parity test suite vs the Python backend before cutover

Non-goals

  • Frontend rewrite
  • Behavioral changes / new features during the port

Acceptance

  • Rust backend passes a request/response parity check against the Python backend for all /api/v1 endpoints
  • CC Bridge attaches/relays a real tmux Claude session
  • moonray redeployed on the Rust backend with no frontend changes

Deferred — tracked, not started this session.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions