- Add guest_merge.py to resolve guest accounts via token, device_id, and web IP+UA fingerprint
- Implement merge_guest_user_data for support rooms, messages, bookmarks, and ratings
- Trigger guest merging in UserVerifyView on verification and UserLoginView on authentication
- Automatically merge guest support conversations in resolve_user_support_room for logged-in users
- Add AdminSupportRoomSerializer, AdminSupportMessageSerializer, and user serialization utilities
- Implement AdminSupportRoomListView for listing and searching rooms with total unread counters
- Implement AdminSupportRoomByUserView for starting or opening rooms by user_id
- Implement AdminSupportRoomMessagesView for message retrieval and sending specialist responses
- Implement AdminSupportMessageDetailView for message editing and deletion
- Enforce staff/admin authorization with IsSupportAdminPanelUser permission
- Add SupportRoom and SupportMessage models with automated status and unread counters
- Implement API endpoints for message history, message sending, and unread checking
- Support guest session tracking and seamless room migration via X-Guest-Token
- Register SupportRoom and inline messages in Unfold admin dashboard
- Add initial migration 0001_initial and register app in settings and URLs
- Add migrate_leaf_categories_to_topics command to migrate legacy leaf categories to topics
- Add diversify_topic_sources command to balance and distribute distinct source types (hadith, quran, history, fatwa, quote) under parent categories
- Support --dry-run flag and automatic cache invalidation
- Add is_topic boolean field to HadisCategory model with indexing
- Enforce validation rules in clean():
* Topics cannot have children and must define a source_type
* Structural categories cannot contain hadiths and have source_type=None
* Parents cannot be topics
* Hadiths can only be attached to topics (is_topic=True)
- Update admin serializers and views to support is_topic filtering and mapping
- Expose is_topic in public category serializers (SimpleCategory, HadisCategorySelectSerializer, CategorySerializer)
- Include migration 0051_add_category_is_topic
- Add narrator and transmitter filtering support to HadisMainListView and HadisListView by slug or ID
- Include available narrators list with localized names in HadisFiltersView endpoint
- Document narrator query parameter in Swagger schema
- Add cleanup_non_hadith_narrators.py script to remove orphan/erroneous narrator chains and layers from non-hadith arguments
- Add utils/search_parser.py providing query parsing and Django Q construction for exact phrases, mandatory inclusions (+), excluded negations (-), and grouped OR conditions (()).
- Add auto-balancing and sanitization for unclosed quotes and parentheses.
- Seamlessly integrate all operator terms with Arabic and Persian search normalization.
- Update search querysets across Hadis, Transmitters, Book References, and Categories views.
- Add utils/text_normalizer.py providing robust Arabic and Persian orthographic normalization (diacritics/tashkeel removal, unification of Alef variants, Yeh/Alef Maksura, Kaf, Teh Marbuta, Waw Hamza, Tatweel, and digit normalization).
- Implement recursive text extraction from multilingual JSON structures and models.
- Add normalized_text shadow column across Hadis, HadisCorrection, HadisInterpretation, Transmitters, BookReference, and HadisCategory models with automated save-time synchronization.
- Apply database migrations (0048 and 0049).
- Add populate_normalized_search management command for backfilling existing records.
- Update search querysets in hadis, transmitter, book reference, and category views to filter using normalized text queries.
- Add comprehensive documentation in docs/ARABIC_SEARCH_NORMALIZATION_GUIDE.md.
- Allow 'cache-control' and 'pragma' headers in CORS_ALLOW_HEADERS to prevent CORS preflight errors on transmitter and hadith requests
- Support both 'hadis' and 'hadis_id' query parameters in AdminHadisCorrectionViewSet
- Support both 'category' and 'category_id' query parameters in AdminHadisInterpretationViewSet
- Support both 'hadis'/'hadis_id' and 'reference'/'reference_id' in AdminHadisReferenceImageViewSet upload handler
- Refactor QuranSecondaryTranslation to store language_code, translation_text and translator per record
- Add migrations 0042 and 0043 to migrate existing secondary translations
- Update AdminCategoryQuranVerseSerializer and AdminHadisCategorySerializer with proper secondary translations handling
- Support category filtering by source_type, has_quran_verse and exclude_verse_id in admin category viewset
- Enforce HTTPS for podcast audio files in serializers and admin field
- Add cache-busting version query param to bypass Cloudflare 301 cached redirect
- Configure SECURE_PROXY_SSL_HEADER and USE_X_FORWARDED_HOST/PORT in settings
- Update nginx config with HTTP to HTTPS redirect, media range/CORS headers and X-Forwarded-Proto handling
- Add utils/cache.py with invalidate_cache_patterns and smart_cached_view
- Support cache bypass on Cache-Control: no-cache headers and query params
- Add automatic signals (post_save, post_delete, m2m_changed) for library, video, podcast, article, calendar, and hadis
- Hook cache invalidation in custom admin viewset actions
- video: remove Q(playlist_items__video__id__in=...) to strictly filter by bookmarked playlist ID
- podcast: ensure playlist bookmark filter targets playlist IDs and accepts both PODCAST_PLAYLIST and PODCAST
- security/correctness: return empty queryset if is_bookmark is requested without authentication across video, podcast, library, and article views
- Optimize HadisSyncSerializer: remove unused number, address_details, and book descriptions
- Separate sync serializers for corrections and interpretations (omitting redundant hadis_info and category_info)
- Add HadisDatabaseVersion model and migration for tracking offline SQLite DB
- Add export_hadis_sqlite management command with gzip compression and single-file overwrite
- Add GET /api/hadis/sync/database/ endpoint and enhance version serializers
- Automatically trigger background SQLite database export on version increment in admin
- Add request-level user bookmark memoization in BookmarkStatusSerializer to eliminate redundant queries across all lists
- Optimize BookReferenceSyncView and BookReference.authors caching (reduced queries from 185 to 10)
- Add multi-level prefetch_related for references and images in HadisMainListView (reduced queries from 109 to 6)
- Add incremental sync support (updated_after/since) in HadisSyncView
- Add select_related for language in BookListView (reduced queries from 35 to 18)
- Annotate episode count and cache effective_thumbnail in podcast and video playlist views (reduced queries from 22/17 to 4)
- Prefetch categories with annotated article counts in ArticleListAPIView (reduced queries from 41 to 3)
- Scale Gunicorn workers/threads to 4w/4t (16 concurrency) with gthread in docker-compose.prod.yml