1.4 KiB
1.4 KiB
Backend Rust Migration Master Plan
Goal
Re-implement backend services in Rust while preserving architecture, service boundaries, data flow, and runtime behavior.
Current-to-Target Mapping
- NestJS gateway -> Rust gateway
- NestJS users -> Rust users
- NestJS companies -> Rust companies
- NestJS customers -> Rust customers
- NestJS professionals -> Rust professionals
- NestJS jobseekers -> Rust jobseekers
Hard Constraints
- Same microservice boundaries.
- Same role/runtime-config flow.
- Same onboarding state transitions and schema lookup behavior.
- Same auth/session behavior at gateway boundary.
- No contract-breaking change unless explicitly versioned.
Stage Sequence
- Freeze contracts and DB assumptions.
- Implement Rust shared crates (
config,errors,db,auth,observability,contracts). - Implement Rust gateway with parity adapters to existing services.
- Migrate
usersservice to Rust and switch gateway client to Rust users. - Migrate
companiesservice to Rust. - Migrate
customersservice to Rust. - Migrate
professionalsservice to Rust. - Migrate
jobseekersservice to Rust. - Remove legacy Nest services after full parity signoff.
Phase Exit Checklist (Apply Every Stage)
- Build passes.
- Contract tests pass.
- Runtime-config and onboarding smoke tests pass.
- No P0/P1 behavior regressions.
- Rollback path validated.