Rustelo/info/why_db_abstraction.md
Jesús Pérex 2f0f807331 feat: add dark mode functionality and improve navigation system
- Add complete dark mode system with theme context and toggle
- Implement dark mode toggle component in navigation menu
- Add client-side routing with SSR-safe signal handling
- Fix language selector styling for better dark mode compatibility
- Add documentation system with mdBook integration
- Improve navigation menu with proper external/internal link handling
- Add comprehensive project documentation and configuration
- Enhance theme system with localStorage persistence
- Fix arena panic issues during server-side rendering
- Add proper TypeScript configuration and build optimizations

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-11 20:53:20 +01:00

16 lines
758 B
Markdown

Why Database Abstraction is Better
### Current Problems:
1. **Tight Coupling**: Auth services are hardcoded to `PgPool`
2. **Limited Flexibility**: Can't easily switch databases
3. **Maintenance Burden**: Database-specific code scattered throughout
4. **Testing Complexity**: Hard to test with different databases
5. **Vendor Lock-in**: Forced to use PostgreSQL for auth features
### Benefits of Database Abstraction:
1. **Loose Coupling**: Services depend on traits, not concrete types
2. **Database Flexibility**: Easy to switch between SQLite, PostgreSQL, MySQL, etc.
3. **Better Testing**: Can use in-memory databases for tests
4. **Cleaner Code**: Single interface for all database operations
5. **Future-proofing**: Easy to add new database backends