-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
feat(backend): rewrite Alterion panel backend to Rust (SeaORM + Actix Web)
TODO: Complete backend rewrite from [current stack] to Rust
Core Setup
- Initialize new Rust workspace with Cargo.toml
- Add dependencies: actix-web, sea-orm, tokio, serde, dotenv, tracing
- Configure async runtime (Tokio) and logging (tracing-subscriber)
- Set up .env / config loading (envy or config crate)
Database Layer (SeaORM)
- Define SeaORM entities for all existing models
- Write and test initial migrations (sea-orm-cli migrate)
- Implement repository pattern / data access layer
- Set up connection pooling (SeaORM + SQLx pool)
- Validate all relations (one-to-many, many-to-many, etc.)
API Layer (Actix Web)
- Scaffold Actix Web app with modular router structure
- Port all existing REST endpoints to Actix handlers
- Implement request/response DTOs with serde
- Add input validation (validator crate)
- Wire up middleware: auth, CORS, rate limiting, logging
Authentication
- Implement JWT auth middleware (jsonwebtoken crate)
- Port session/token management logic
- Role-based access control (RBAC) guards
Error Handling
- Define unified AppError enum (thiserror)
- Implement actix ResponseError for AppError
- Standardize error response format (JSON)
Testing
- Unit tests for service/business logic layer
- Integration tests for all API routes (actix-web test client)
- Seed test database via SeaORM fixtures
DevOps / Deployment
- Update Dockerfile for Rust multi-stage build
- Update CI/CD pipeline for cargo build/test
- Verify feature parity with old backend before cutover
- Update API docs / OpenAPI spec (utoipa or paperclip)
BREAKING CHANGE: full backend replacement — verify all panel API consumers
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Projects
Status
Todo