Commit Graph
46 Commits
Author SHA1 Message Date
Atharv1705 40c386d1ae Fix .gitignore to not exclude documentation markdown files 2026-10-03 15:59:15 +05:30
Atharv1705 fc33f0e3ee Fix timezone-naive vs timezone-aware datetime comparison in admin-status endpoint 2026-10-03 15:29:57 +05:30
Atharv1705 1976cc2f11 Fix flex wrapping on mobile for doc review buttons 2026-10-03 15:12:57 +05:30
Atharv1705 96736941f0 Fix UI overflow on mobile for document review buttons 2026-10-03 15:06:27 +05:30
Atharv1705 f5659838de Fix HTML tags in chatbot backend responses by converting to markdown 2026-10-03 14:55:10 +05:30
Atharv1705 ca4bd32954 Add fix_templates.py 2026-10-03 14:40:46 +05:30
Atharv1705 5faff3ebbc Fix su-exec to gosu for Debian 2026-10-03 14:11:30 +05:30
Atharv1705 34a2cc0098 Fix dynamic tax year fallback in models and upload endpoints 2026-10-03 11:46:55 +05:30
Atharv1705 31fbc85565 Fix all 5 deploy gaps: nginx real-IP, volume chown entrypoint, chat cascade migration, template seed, frontend build Makefile 2026-10-02 16:07:04 +05:30
Atharv1705 818185e931 Fix UI bugs, HTML injection in contact, file delete API security 2026-10-02 15:18:28 +05:30
Atharv1705 ca0ab74d5a Fix UI bugs 2026-10-02 14:53:16 +05:30
Atharv1705 7304ebf096 Finalize audit: strict env validation, nginx headers, bookmark cleanup, admin stats fix 2026-10-01 14:49:38 +05:30
Atharv1705 7add0adb7e Final audit fixes: D&D, Docker security, Seed script, review events 2026-10-01 14:36:02 +05:30
Atharv1705 0ca44bc3f4 Cleanup and bugfixes 2026-10-01 12:58:37 +05:30
Atharv1705 f199ecdec6 Fix B3: rename note= to comment= in DocumentReviewEvent instantiation 2026-10-01 11:20:39 +05:30
Atharv1705 1a2618cb5e Fix mock user seed script imports and column limits 2026-10-01 10:36:55 +05:30
Atharv1705 085cbd21b9 Update ZIP exports to use username for filename and internal folders 2026-09-30 17:33:08 +05:30
Atharv1705 268c3d402b Implement workflow improvements: admin document review, user email notifications, and engagement letter download 2026-09-30 16:37:33 +05:30
Atharv1705 cb4d939c0b chore: Revert to shared hosting config (port 8081, no certbot) for new VPS 2026-09-21 11:34:03 +05:30
Atharv1705 a28b7702a9 chore: Update configs for new Contabo VPS (aicpa.duckdns.org / 13.140.170.213) 2026-09-21 11:12:15 +05:30
Atharv1705 9ef212675d fix: Add missing ai_summary column to admin_documents in migration script 2026-09-05 22:12:39 +05:30
Atharv1705 080fe875cc chore: Change nginx port to 8081 to avoid conflict 2026-09-05 22:05:01 +05:30
Atharv1705 e58dddafee chore: Adapt deployment for shared hosting (internal port 8080, remove docker certbot) 2026-09-05 21:56:02 +05:30
Atharv1705 08cd959746 Fix YAML formatting for chroma_data volume 2026-09-05 18:21:28 +05:30
Atharv1705 91bb2d6965 Fix undefined volume chroma_data in docker-compose.yml 2026-09-05 18:18:52 +05:30
Atharv1705 37a8892af5 Add missing backfill_vectors.py script 2026-09-05 18:09:08 +05:30
Atharv1705 46a340dc74 Production ready: mobile responsive UI, ChromaDB persistence, Excel export, and Filing Deadlines 2026-09-05 17:42:08 +05:30
Atharv1705 e0f6167d14 feat/fix: implement chatbot session persistence, resolve auth redirect loops, and polish UI 2026-08-25 15:30:16 +05:30
Atharv1705 bf1a019d6c chore: apply deployment fixes, timezone fixes, and cleanup unused dependencies 2026-08-12 12:00:07 +05:30
Atharv1705 a1ea3aadc0 fix: docker-compose MYSQL_ROOT_PASSWORD uses MYSQL_PASSWORD (single password var) 2026-08-10 12:43:41 +05:30
Atharv1705 683e29e0d1 fix: update domain to aiindiacpa.duckdns.org
- nginx/default.conf: server_name aiindiacpa.duckdns.org + VPS IP (no trailing slash)
- main.py: CORS default fallback updated to new domain
- review.py: DASHBOARD_LINK reads from FRONTEND_URL env var (no hardcoded domain)
- login_email.py: login/signup email links read from FRONTEND_URL env var
- ALLOWED_ORIGINS in .env: https://aiindiacpa.duckdns.org + http://147.93.168.145
  (IP on port 80 via nginx, not 8000 direct FastAPI)
2026-08-10 11:38:24 +05:30
Atharv1705 419aa6de3d fix: production hardening — 5 critical issues resolved
1. Dockerfile: remove UTF-16 encoding conversion (requirements.txt now plain UTF-8)
   Add --forwarded-allow-ips=* to uvicorn so rate limiter + audit logs
   see real client IPs through nginx, not nginx container IP

2. .dockerignore: exclude pandoc MSI (~200MB), blog_images/, frontend-legacy/,
   *.md docs, *.docx, *.msi, *.patch, openrouter_error.log — significant image
   size reduction

3. requirements.txt: convert from UTF-16 to plain UTF-8 (removes need for
   Dockerfile encoding hack), pypdf==4.3.1 already added in previous commit

4. DEPLOYMENT.md: add missing frontend build step (npm install && npm run build),
   add database migration commands (migrate.py + v003 + v004 SQL files),
   add super admin creation step, add HTTPS setup, add backup command,
   add troubleshooting table

5. All secrets now come from .env only (no fallback defaults in docker-compose)
2026-08-10 10:42:37 +05:30
Atharv1705 aff470bb48 fix: remove hardcoded password fallbacks from docker-compose — read all secrets from .env only 2026-08-10 10:33:47 +05:30
Atharv1705 1170ea38fc fix: production deployment fixes
- .env: MYSQL_HOST=db (Docker service name, not localhost)
- .env: ALLOWED_ORIGINS includes bookkeepro.net + IP
- docker-compose.yml: add nginx service, fix MySQL user/password env vars,
  expose app on port 8000 internally only, nginx on port 80
- nginx/default.conf: serve /css /assets /images directly from dist,
  proxy /api/* to FastAPI, SPA fallback via try_files
- main.py: remove duplicate /dist mount, hide API docs in production,
  clean up static mount logic
- requirements.txt: add pypdf==4.3.1 (was missing, used by ai.py)
2026-08-10 10:30:00 +05:30
Atharv1705 9c7f25e06f feat: major platform upgrade — AI extraction pipeline, responsive UI, admin chatbot enhancements
CRITICAL FIXES
- Fix blank pages: useCallback declared after useEffect in all 5 pages
- Fix showToast undefined everywhere (ToastContext exported addToast not showToast)
- Fix admin doc upload always 422 (missing doc_key + doc_label form fields)
- Fix audit log wrong field names (log.details -> log.detail, remove user_agent)
- Fix SPA catch-all missing in main.py (direct URL access was 404)
- Fix chatbot using broken nvidia free model -> llama-3.3-70b

AI EXTRACTION PIPELINE
- 3-stage pipeline: Stage1 native text (free) -> Stage2 Tesseract OCR (free CPU) -> Stage3 Qwen vision (paid)
- Tesseract installed with eng+hin bilingual support, psm6, 2.5x DPI
- Scanned PDF fallback via PyMuPDF page render
- Blank template fallback: returns form_type/purpose/tax_year instead of empty
- Improved prompt: extracts actual document field names, no predefined terms
- Auto-poll UI: shows Processing spinner when extraction is running
- backfill_extraction.py: re-process all docs, fixed empty-dict-as-None bug

ADMIN DASHBOARD
- Pending docs split into Pending Personal + Pending Business stat cards
- User cards show typed badges: N personal / N business instead of generic N pending
- Backend returns pending_personal, pending_business, pending_docs per user

ADMIN USER DETAIL
- Doc count chips in user info bar: personal / business / returns / total
- Doc name bold 15px, date with calendar icon + TY chip, status as colored badges
- Responsive layout: doc-review-layout CSS classes replace inline flex styles
- Filing Timeline sidebar stacks above doc list on mobile
- AI Summary: bold labels and values, blank template shows metadata

CHATBOT ENHANCEMENTS
- Ask anything free-text input on menu screen (both admin and user chatbots)
- Admin: live context with latest uploads by date, new users today
- Admin: per-user activity lookup by name/email (docs + audit log)
- New endpoint: /api/chatbot/admin-user-context
- ExpandableSummaryBlock + ExpandableValue: bold navy field labels and values

RESPONSIVENESS
- components.css: 480px/640px/768px breakpoints for all pages
- Admin table, stat cards, tabs, toasts, FAB all properly responsive
- Auth shell stacks on mobile correctly
2026-08-05 11:41:06 +05:30
Atharv1705 c2e22902c8 Fix AI chatbot role mapping, add markdown formatting, update system prompts, and handle OpenRouter API errors 2026-07-20 12:14:58 +05:30
Atharv1705 756547a22c Add Super Admin Chatbot widget with system overview and FAQs 2026-07-16 12:47:10 +05:30
Atharv1705 c9bfacfa9d Revert port binding to 8000 due to host conflicts 2026-07-15 23:00:31 +05:30
Atharv1705 c997c34c6d Remove Nginx from deployment and map app to port 80 2026-07-15 22:55:10 +05:30
Atharv1705 ccf1f440e7 Fix mysql healthcheck shell evaluation 2026-07-15 18:35:45 +05:30
Atharv1705 6c84c4b40e Fix MySQL 8.4 container crash due to deprecated auth flag 2026-07-15 18:24:55 +05:30
Atharv1705 270879df32 Fix deployment configs, fix passlib bug, add super admin script 2026-07-15 17:46:04 +05:30
Atharv1705 6e3d1a9203 Fix: pass send_email directly to background tasks instead of inner async closures 2026-07-15 15:43:34 +05:30
Atharv1705 40bf55267b Fix raw HTML rendering in password strength indicator 2026-07-15 14:44:23 +05:30
Atharv1705 3aca5017d5 Update emailer logs for generic SMTP 2026-07-15 14:39:40 +05:30
Atharv1705 611d00bda1 Initial commit 2026-07-15 12:30:28 +05:30