Migration Guide
Complete guide to the Clean Architecture restructure of Send v5.Overview
The repository has been restructured from a tightly-coupled monolith to a Clean Architecture monorepo with proper separation of concerns.What Changed
1. Monorepo Structure
Before
After
2. Config Schema Migration
Before: Hash as Primary Key
After: UUID Primary Key with Hash Deduplication
- Add new
idcolumn as UUID - Add
hashcolumn with old PK values - Update all foreign keys from
configtoconfig_id - Update application code to use
config_id
3. API Structure
Before: Nested Structure
After: Flat Resource Structure
Breaking Changes
Config References
Before:Repository Methods
Before:Migration Path
For Existing Data
For Application Code
Update all references fromconfig to config_id and from config_hash to config_id.
New Features
Config Deduplication
Automatically returns existing config if hash matches:Interactive API Playground
Test API endpoints directly in documentation:- Navigate to any endpoint page
- Click “Try it” button
- Fill in parameters
- See live request/response
- Copy code snippets in 4 languages
Package Structure
wheel-core (Domain)
- 5 entities with business rules
- 5 use cases
- 5 repository interfaces
- Zero framework dependencies
wheel-infrastructure (Infrastructure)
- 5 Nile repository implementations
- Database schema
- Nile client setup
wheel-dashboard (Admin UI)
- Next.js 15 SSR
- Material-UI
- Dependency injection
- Port 3001
wheel-instances (Public UI)
- Next.js 15 SSG
- Dynamic routing
- Optimized for performance
- Port 3002
api/wheel (Rust API)
- Axum web framework
- Clean Architecture in Rust
- All endpoints defined
- Port 3003
Deployment
No changes to deployment strategy:Rollback Plan
If issues arise:- Restore from
/projects/games/wheel/(old structure still exists) - Revert database schema changes using backup
- Switch Cloudflare routing back to old deployment
