Arag / app /services /analytics_core

Commit History

Fix analytics accuracy, tenant isolation, and event-loop blocking.
ff0847b

AuthorBot Cursor commited on

Implement Enterprise Worth Roadmap (R-139–R-173).
df480e4

AuthorBot Cursor commited on

fix: geo lookup now works on HF Spaces without MaxMind DB - Add ip-api.com async HTTP fallback when GeoLite2 mmdb is not present - 3-tier resolution: Redis cache (24h) -> MaxMind (offline) -> ip-api.com (free, no key) - Cache key uses SHA-256 hash of IP (raw IP never stored) - Pass redis into get_geo_info from both chat.py and visitor_tracker.py - Fixes country showing as dash on all sessions
f65c89c

AuthorBot commited on

feat: proper visitor analytics system - New Visitor model (visitor_uid + fingerprint fallback, first_seen/last_seen/page_views, geo, device) - VisitorRepository with upsert + analytics queries - visitor_tracker.py: record_visitor() upserts on every session/init - session/init accepts visitor_uid in request body (HF-Spaces iframe-safe, no cookies) - 4 new analytics endpoints: /visitors /geo /devices /sessions/stats - geo.py: region extraction + X-Real-IP support - DB migration: visitor_uid column on chat_sessions - ARCHITECTURE.md updated
3ae7860

AuthorBot commited on

fix: 5 critical storage bugs + 3 SQLite/SSE bugs -- tracker.py: db.flush() after add() so chat messages/analytics are persisted -- chat.py: flush->commit for durable ChatSession row -- settings.py: fix session mismatch in all PUT routes (widget-config, profile, personality, notifications, password) - setattr on cross-session user was discarded; now uses UPDATE stmt on route db -- aggregator.py: replace PostgreSQL-only gen_random_uuid() with uuid4() param for SQLite -- ingest.py: fix SSE channel name mismatch subscriber vs publisher -- superadmin_service.py: fix naive/aware datetime TypeError in extend_subscription
784dc0e

AuthorBot commited on

Fix: add datetime/timezone import to tracker (preventative)
0f06ce6

AuthorBot commited on

Unify token tracking, smart links, and personality settings across admin and chat.
a825fee

AuthorBot Cursor commited on

Restructure project for HF Spaces deployment
772f852

AuthorBot commited on