Replace in-memory SessionManager with a real database (PostgreSQL or MongoDB).
- Add DB as a service in compose.stack.yml
- Migrate ConversationSession and Message models to SQLAlchemy/Motor (async)
- Persist: user_id, session_id, messages[], created_at, is_active, metadata
- Implement user registration/auth (JWT or API key; reject anonymous user)
- Refactor session_manager.py for async DB calls, remove threading.Lock
Replace in-memory SessionManager with a real database (PostgreSQL or MongoDB).