Arag / app /api

Commit History

Add enterprise growth APIs, billing, admin UI, and test suite.
12930b5

AuthorBot Cursor commited on

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

AuthorBot Cursor commited on

Fix false session-expired errors on admin books load.
c5db49d

AuthorBot Cursor commited on

P0 security: async backup, widget CORS, Redis auth.
937692a

AuthorBot Cursor commited on

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

AuthorBot Cursor commited on

Refactor admin API into service and repository layers.
d6061d6

AuthorBot Cursor commited on

feat: URL import now auto-indexes scraped metadata instantly β€” no file upload needed
ba24df7

AuthorBot commited on

feat: book URL import - 10 platforms, 3-step UI, scraper service
2a566aa

AuthorBot commited on

feat: show IP address in sessions + persistent login until logout - Add ip_address field to ChatSession model (VARCHAR 45, handles IPv4+IPv6) - Store real client IP at session/init time via get_real_ip() - Expose ip_address in /sessions list and /sessions/{id}/transcript responses - DB migration: ip_address column added to chat_sessions - Bump REFRESH_TOKEN_EXPIRE_DAYS from 7 to 30 days (stay logged in 1 month) - Fix auth-client.js: refreshAccessToken only clears session on 401/403, not on network/5xx errors (HF cold-start safe) - Fix restoreSession: keeps session alive when refresh fails transiently, only clears on explicit auth rejection
cb1aefd

AuthorBot 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: Audit pass β€” critical bug fix + lazy import cleanup (qa/books/schemas_router)
1afebcd

AuthorBot commited on

feat: Phase 7 β€” Polling streaming (stream-start + poll endpoints)
94944e2

AuthorBot commited on

feat: Phases 1-5 production improvements + 8 bug fixes
ef8fd29

AuthorBot commited on

Fix: save buy_url during book upload so chatbot shows Buy button; remove nonexistent price field
29f9383

AuthorBot commited on

Fix: replace Celery dispatch with asyncio.create_task for ingestion - books now properly marked ready + chatbot responds correctly
9eb7e65

AuthorBot commited on

Add: SuperAdmin create author endpoint (POST /api/super/authors) with optional plan + fix register ValueError 500
ea890f6

AuthorBot commited on

Production hardening: JWT blacklist, TOTP, Pydantic schemas, Prometheus, SSRF fix, CSP, Redis auth, Celery backup β€” 35 items across P0-P5
131d826

AuthorBot commited on

Enforce strict SuperAdmin vs Author panel separation.
6e276e0

AuthorBot Cursor commited on

Fix logout on page refresh by restoring sessions via refresh token and cookies.
ccbebe0

AuthorBot Cursor commited on

Enforce brief sales-focused chatbot rules with spoiler guard and buy CTAs.
701aaf2

AuthorBot Cursor commited on

Restructure chat flow: hello shows clickable book list, then engaging Q&A.
0daa940

AuthorBot Cursor commited on

Fix auth session expiry with shared auto-refresh client for admin panels.
e70f2c6

AuthorBot commited on

Fix chat session init crash and improve embed reliability
2b2591e

AuthorBot commited on

Phase 1.3+3.2: Integrate Custom Q&A into RAG pipeline (Jaccard similarity), add message feedback (πŸ‘πŸ‘Ž) and session rating endpoints for widget
d95db15

AuthorBot commited on

Deep audit fix: add missing model columns (blocked, rating, tokens_used, out_of_scope_message, buy_url, preview_url), fix .get() calls, fix ingest doc creation, add track-click endpoint, add column migrations, fix email crash, fix audit log field names, enrich superadmin author list
868f634

AuthorBot commited on

Fix ingest.py: use correct service signatures (chunk_document, summarize_book, file_path args)
745bdc2

AuthorBot commited on

Restructure project for HF Spaces deployment
772f852

AuthorBot commited on