logo and architecture fixes
This commit is contained in:
@@ -1,9 +1,34 @@
|
||||
# Architecture Knowledge Base
|
||||
**Last Updated:** December 8, 2025
|
||||
**Last Updated:** December 9, 2025
|
||||
**Purpose:** Critical architectural patterns, common issues, and solutions reference
|
||||
|
||||
---
|
||||
|
||||
## 🔥 CRITICAL FIXES - December 9, 2025
|
||||
|
||||
### PERMANENT FIX: User Swapping / Random Logout Issue
|
||||
**ROOT CAUSE**: Django's database-backed sessions with in-memory user caching caused cross-request contamination at the process level.
|
||||
|
||||
**SOLUTION IMPLEMENTED**:
|
||||
1. ✅ Redis-backed sessions (`SESSION_ENGINE = 'django.contrib.sessions.backends.cache'`)
|
||||
2. ✅ Custom authentication backend without caching (`NoCacheModelBackend`)
|
||||
3. ✅ Session integrity validation (stores and verifies account_id/user_id on every request)
|
||||
4. ✅ Middleware never mutates `request.user` (uses Django's set value directly)
|
||||
|
||||
**See**: `CRITICAL-BUG-FIXES-DEC-2025.md` for complete details.
|
||||
|
||||
### PERMANENT FIX: useNavigate / useLocation Errors During HMR
|
||||
**ROOT CAUSE**: Individual Suspense boundaries per route lost React Router context during Hot Module Replacement.
|
||||
|
||||
**SOLUTION IMPLEMENTED**:
|
||||
1. ✅ Single top-level Suspense boundary around entire `<Routes>` component
|
||||
2. ✅ Removed 100+ individual Suspense wrappers from route elements
|
||||
3. ✅ Router context now persists through HMR automatically
|
||||
|
||||
**See**: `CRITICAL-BUG-FIXES-DEC-2025.md` for complete details.
|
||||
|
||||
---
|
||||
|
||||
## Table of Contents
|
||||
1. [Authentication & Session Management](#authentication--session-management)
|
||||
2. [Site/Sector Architecture](#sitesector-architecture)
|
||||
|
||||
Reference in New Issue
Block a user