Commit Graph

77 Commits

Author SHA1 Message Date
copilot-swe-agent[bot] d83dfb12c6 fix: regenerate logo PNGs from SVG to fix DocuNova → DocuElevate branding
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-26 09:05:38 +00:00
copilot-swe-agent[bot] 0821e2f989 feat(privacy): implement GDPR and global privacy compliance
- Add dismissable cookie notice banner to base template (essential
  cookies only, ePrivacy Directive compliant, localStorage persistence)
- Expand Privacy Notice to cover all target markets: EU/GDPR,
  UK GDPR, Switzerland nFADP, Ukraine, US CCPA/CPRA, Canada PIPEDA/
  Law 25, Brazil LGPD/Latin America, and Asia-Pacific & Japan (APPI,
  Australia Privacy Act, South Korea PIPA, Singapore PDPA, India DPDP)
- Add International Data Transfers section (SCCs, IDTAs, adequacy
  decisions) and Data Minimization & Purpose Limitation section
- Update Cookie Policy with precise cookie table, ePrivacy exemption
  rationale, and localStorage notice dismissal documentation
- Create docs/PrivacyCompliance.md: full multi-market compliance guide
  covering cookie strategy, data transfer mechanisms, data subject
  rights handling matrix with response timelines, and market-specific
  notes for all supported regions
- Add docs/PrivacyCompliance.md to mkdocs.yml Compliance nav section
- Add 10 new targeted tests to test_views_general.py validating all
  key compliance content areas

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-25 15:15:24 +00:00
copilot-swe-agent[bot] 6e78e9e7cf docs: add missing docs to mkdocs nav and README index
- Add BrowserExtension to Getting Started section in mkdocs.yml nav
- Add SettingsManagement to Configuration section in mkdocs.yml nav
- Add new Security section with CredentialRotationGuide in mkdocs.yml nav
- Mirror all nav additions in docs/README.md index

Closes the documentation gaps identified in the health check audit:
all user-relevant guides (browser extension, settings management,
credential rotation) are now discoverable via ReadTheDocs/mkdocs.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-25 14:37:50 +00:00
Christian Krakau-Louis 9584c0263c Merge pull request #408 from christianlouis/copilot/audit-documentation-gaps
fix(mypy): add missing type annotations in meilisearch_client.py
2026-02-25 15:18:51 +01:00
copilot-swe-agent[bot] c428a7ec00 feat(ui): add dark mode support with system preference detection and localStorage persistence
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-25 13:59:49 +00:00
copilot-swe-agent[bot] 139e23c9e4 docs: add Setup Wizard, Production Readiness, Database, K8s, and Licensing guides
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-25 13:52:22 +00:00
copilot-swe-agent[bot] a08bfb9f1a feat(helm): add Helm chart for Kubernetes deployment and update DeploymentGuide
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-25 13:31:54 +00:00
copilot-swe-agent[bot] 89d5df71c8 feat(ocr): fine-tune OCR quality criteria with stricter threshold and head-to-head comparison
- Raise quality acceptance threshold from 65→85 (configurable via TEXT_QUALITY_THRESHOLD)
- Reject text with significant issues (excessive_typos, garbage_characters,
  incoherent_text, fragmented_sentences) even when score is above threshold
  (configurable via TEXT_QUALITY_SIGNIFICANT_ISSUES)
- Add compare_text_quality() for AI-powered head-to-head comparison of
  original embedded text vs fresh OCR output
- Update process_document to pass original text to OCR task for comparison
- Update process_with_ocr to run comparison and keep the higher-quality text
- Add new settings to settings_service.py metadata
- Update docs/ConfigurationGuide.md with new settings
- Add comprehensive tests for new threshold and comparison logic

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-25 13:03:21 +00:00
copilot-swe-agent[bot] b03bfb5e02 feat(ocr): add AI-based embedded text quality check with automatic OCR fallback
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-24 18:41:27 +00:00
copilot-swe-agent[bot] 8a2a4dc2b3 feat(ocr): auto-install Tesseract/EasyOCR languages from settings
- Add app/utils/ocr_language_manager.py: detects tessdata dir, downloads
  missing .traineddata files via wget/curl from tessdata_fast GitHub repo,
  pre-downloads EasyOCR models, exposes async background-thread helper
- TesseractOCRProvider.process() calls ensure_tesseract_languages() before
  running pytesseract; raises clear error if languages remain unavailable
- EasyOCRProvider.process() logs informational message when models download
- app/main.py: calls ensure_ocr_languages_async() at startup
- app/utils/settings_sync.py: triggers language re-check after every
  settings reload so UI changes take effect without container restart
- app/api/settings.py: adds POST /api/settings/install-ocr-languages
  endpoint for on-demand language installation from the admin UI
- Dockerfile: adds wget for runtime tessdata downloads
- docs/ConfigurationGuide.md: documents automatic language download
- tests/test_ocr_language_manager.py: 29 unit tests

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-24 16:28:14 +00:00
copilot-swe-agent[bot] fec032643b feat(ocr): embed searchable text layer for providers without native PDF output
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-24 13:19:52 +00:00
copilot-swe-agent[bot] f9d849f7eb feat(api): remove redundant /env and /api/diagnostic/settings endpoints
- Remove `/api/diagnostic/settings` endpoint (superseded by `/api/settings/`)
- Remove `/env` view route (superseded by `/settings` admin page)
- Delete `env_debug.html` template
- Remove `/env` nav links from base.html (desktop + mobile)
- Update status_dashboard.html to link to /settings instead of /env
- Remove corresponding tests for deleted endpoints
- Update RateLimitingStrategy.md docs

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-23 23:23:28 +00:00
copilot-swe-agent[bot] 044da0ff47 feat: update all OpenAI/ChatGPT refs + settings dropdown for fixed-value fields
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-23 20:06:57 +00:00
copilot-swe-agent[bot] dcdef44303 feat: add Portkey provider support and null-content guard to AI abstraction layer
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-23 19:42:03 +00:00
copilot-swe-agent[bot] a46cd6634b feat(api): implement API key rotation mechanisms (#168)
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-22 19:24:38 +00:00
copilot-swe-agent[bot] ca27a0b687 feat(security): add request size limits to API endpoints
- Add RequestSizeLimitMiddleware that checks Content-Length header
  before request body is read: non-multipart requests capped at
  MAX_REQUEST_BODY_SIZE (default 1 MB), multipart uploads capped at
  MAX_UPLOAD_SIZE (default 1 GB). Returns HTTP 413 on violation.
- Register middleware in app/main.py
- Add max_request_body_size setting to app/config.py
- Fix ui_upload in files.py to check Content-Length early and read
  in 64 KB chunks (bounded memory usage), removing the post-write
  os.path.getsize check
- Document MAX_REQUEST_BODY_SIZE in .env.demo and ConfigurationGuide.md
- Mark SECURITY_AUDIT.md item #4 as resolved
- Add 9 tests in test_request_size_limit.py
- Update test_upload_file_too_large to use patch.object instead of
  the now-unused os.path.getsize mock

Closes #173

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-22 14:41:04 +00:00
copilot-swe-agent[bot] ac51f7206a feat(ci): add pip-audit dependency vulnerability scanning to CI/CD
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-21 21:17:15 +00:00
copilot-swe-agent[bot] 10ff772fbe docs: add GitHub Copilot configuration documentation
Add comprehensive documentation for .github/copilot.yml network allowlist configuration.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-16 20:37:13 +00:00
copilot-swe-agent[bot] 5380c6de6c docs: update browser extension documentation for web clipping
- Updated browser-extension/README.md with web clipping features
- Updated docs/BrowserExtension.md with dual-mode architecture
- Added documentation for clip mode data flow and API endpoints
- Updated permissions explanation for new clipping capabilities
- Added troubleshooting for clip-specific issues
- Documented version 1.1.0 features and changes

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-13 23:24:10 +00:00
copilot-swe-agent[bot] 16ed181cdd docs: add CI de-duplication summary document
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-13 11:11:39 +00:00
copilot-swe-agent[bot] 6c6bc6d90a feat: remove DeepSource and update CI documentation
- Remove .deepsource.toml (redundant with Ruff + CodeQL)
- Update docs/CIWorkflow.md to reflect current tool stack (Ruff instead of legacy tools)
- Create comprehensive docs/CIToolsGuide.md documenting streamlined CI setup
- Update README.md documentation index
- Update TODO.md to reference Ruff instead of legacy tools
- Document tool overlap analysis and de-duplication rationale

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-13 11:10:01 +00:00
copilot-swe-agent[bot] b03ebab747 chore: apply ruff formatting and fix whitespace issues
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-13 09:12:11 +00:00
copilot-swe-agent[bot] 5e8ee5440f docs: add comprehensive OAuth testing CI/CD guide
- Document GitHub Actions configuration for mock and real OAuth
- Add security best practices for OAuth secrets
- Include troubleshooting guide
- Provide complete workflow examples

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-12 11:11:01 +00:00
Christian Krakau-Louis c85a6710b6 Merge pull request #256 from christianlouis/copilot/add-browser-plugin-for-docuelevate
feat(browser): add browser extension for URL-based file submission
2026-02-12 04:17:46 +01:00
copilot-swe-agent[bot] 0a3fe11f66 docs(browser): add permissions guide and improve documentation
- Create comprehensive PERMISSIONS.md explaining all permissions
- Document empty host_permissions array and privacy benefits
- Add session cookie security best practices to BrowserExtension.md
- Clarify future use case for content script message handler
- Improve error message clarity for JSON parsing failures

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-12 03:11:33 +00:00
copilot-swe-agent[bot] d025923ef5 ci: split linters into independent parallel jobs and add CI documentation
Refactors .github/workflows/tests.yaml so that flake8, black, mypy,
pylint, and bandit each run as their own job in parallel with the test
job. This ensures a failure in one tool never blocks the others, and
contributors see full feedback from every tool on every CI run.

- Upgrades actions/checkout to v4 and actions/setup-python to v5
- All linter jobs are enforced (no continue-on-error)
- Test artifacts (junit.xml, coverage.xml) always uploaded
- Bandit JSON report always uploaded as artifact
- Adds docs/CIWorkflow.md with maintainer documentation
- Updates CONTRIBUTING.md with CI workflow table and link

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-12 03:07:53 +00:00
copilot-swe-agent[bot] 817dc31e12 feat(browser): implement browser extension for sending files to DocuElevate
- Add complete browser extension with popup UI and background workers
- Support Chrome, Firefox, Edge, and other Chromium-based browsers
- Include context menu integration for quick file sending
- Add comprehensive documentation for users and administrators
- Update main README and API docs to include browser extension
- Implement secure configuration storage in browser extension storage
- Add SSRF-protected URL upload endpoint integration

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-12 03:04:36 +00:00
copilot-swe-agent[bot] 00abb33bbe docs: update all references from PyPDF2 to pypdf in documentation
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-12 02:54:48 +00:00
Christian Krakau-Louis 02e1445e01 Enhance file detail page with original and processed file previews, GPT metadata display, and text extraction functionality
- Added endpoints for previewing original and processed PDF files.
- Implemented on-demand text extraction from original and processed PDFs.
- Updated file detail page to show original and processed file paths with existence status.
- Introduced GPT metadata display with a collapsible JSON view.
- Enhanced front-end with PDF.js for in-browser PDF rendering and improved user experience.
- Added integration tests for new features including metadata display and file previews.
2026-02-11 23:32:29 +01:00
Christian Krakau-Louis 7222740204 feat(auth): add configurable admin group name for OAuth user access 2026-02-11 22:53:13 +01:00
copilot-swe-agent[bot] c7dff41492 docs: add comprehensive documentation for storage reorganization
- Create StorageArchitecture.md with detailed architecture explanation
- Document collision handling with -0001 suffix format
- Explain immutable original and processed file storage
- Document forced Cloud OCR reprocessing feature
- Update API.md with new reprocess-with-cloud-ocr endpoint
- Update UserGuide.md with user-facing feature descriptions
- Include database schema, lifecycle diagrams, and examples

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-11 20:14:56 +00:00
copilot-swe-agent[bot] 9145060d8e docs: Add comprehensive architecture documentation for status tracking
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-11 19:49:41 +00:00
copilot-swe-agent[bot] e8bba38f98 docs: fix numbering in BuildMetadata.md
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-11 14:45:22 +00:00
copilot-swe-agent[bot] 037b4aa94e fix(build): sync VERSION file with semantic-release tags and add build time
- Update generate_build_metadata.sh to sync VERSION from latest git tag
- Change BUILD_DATE format from date-only to ISO 8601 with time (YYYY-MM-DDTHH:MM:SSZ)
- Fix VERSION file from 0.5.0 to 0.9.1 (matching latest git tag v0.9.1)
- Change version fallback from hardcoded '0.5.0-dev' to 'unknown' in config.py
- Update release.yml to commit all build metadata files (not just VERSION)
- Update BuildMetadata.md documentation to reflect automated versioning
- Add tests for build_date with time format and version unknown fallback

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-11 14:42:37 +00:00
copilot-swe-agent[bot] 201984de96 docs: document URL upload API endpoint
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-11 13:37:36 +00:00
copilot-swe-agent[bot] 403cd02428 feat: Adjust rate limits per feedback - increase uploads to 600/minute, remove processing limit
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-10 20:29:26 +00:00
copilot-swe-agent[bot] 7480c70de4 plan: Adjust rate limits based on feedback
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-10 20:26:21 +00:00
copilot-swe-agent[bot] 8634dc0265 fix: Remove accidentally committed pip output file and fix duplicate heading
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-10 16:23:45 +00:00
copilot-swe-agent[bot] 5633752594 docs: Add comprehensive rate limiting strategy documentation
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-10 16:22:23 +00:00
copilot-swe-agent[bot] 8d347e0a53 feat: Add rate limiting middleware with SlowAPI
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-10 16:17:53 +00:00
copilot-swe-agent[bot] 742b4e2e8c refactor: improve code quality and documentation clarity
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-10 15:04:48 +00:00
copilot-swe-agent[bot] 6aeb466491 fix: address code review feedback for custom fields
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-10 15:02:05 +00:00
copilot-swe-agent[bot] 327244c43a feat(paperless): add flexible multi-field custom fields mapping
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-10 15:00:28 +00:00
copilot-swe-agent[bot] eeb32ac77f docs: add documentation for Paperless custom field configuration
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-10 14:57:14 +00:00
copilot-swe-agent[bot] 956f0c0c2a refactor: change security headers default to disabled
Security headers are now disabled by default since most deployments use a reverse proxy (Traefik, Nginx) that already adds these headers. Enable with SECURITY_HEADERS_ENABLED=true for direct deployments.

Changes:
- Set security_headers_enabled default to False in app/config.py
- Update all documentation to reflect new default
- Comment out examples in .env.demo (now showing disabled state)
- Update SECURITY_AUDIT.md to reflect reverse proxy as default deployment
- Tests still pass (3 passed, 8 skipped as expected with headers disabled)

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-10 14:22:47 +00:00
copilot-swe-agent[bot] 20a0e43a11 docs: address code review comments
- Fix test count in SECURITY_AUDIT.md (11 tests, not 24)
- Add deprecation note for ALLOW-FROM in X-Frame-Options
- Update documentation to recommend CSP frame-ancestors instead

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-10 14:10:23 +00:00
copilot-swe-agent[bot] e144fdd50a feat(security): add configurable security headers middleware
- Add SecurityHeadersMiddleware with HSTS, CSP, X-Frame-Options, X-Content-Type-Options
- Add configuration options in app/config.py
- Integrate middleware into app/main.py
- Add comprehensive tests in tests/test_security_headers.py
- Update .env.demo with security header examples
- Update docs/DeploymentGuide.md with security headers section and Traefik/Nginx examples
- Update docs/ConfigurationGuide.md with detailed configuration reference
- Update SECURITY_AUDIT.md to mark security headers implementation complete

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-10 14:05:19 +00:00
copilot-swe-agent[bot] f4b4ab0328 docs: clarify PDF splitting is page-based, not byte-based
- Add prominent documentation that splitting uses page boundaries
- Update docstring with IMPORTANT note about page-level splitting
- Add test to validate split PDFs are valid and readable
- Update ConfigurationGuide.md to emphasize page-based approach
- Update SECURITY_AUDIT.md with implementation details
- Ensures users understand no risk of corrupted PDFs

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-10 13:51:24 +00:00
copilot-swe-agent[bot] 9ad32e40e6 feat(security): add configurable file upload size limits with optional splitting
- Add MAX_UPLOAD_SIZE config (default 1GB) to prevent resource exhaustion
- Add MAX_SINGLE_FILE_SIZE config for optional PDF file splitting
- Implement automatic PDF splitting when files exceed single file limit
- Update upload endpoint to use configured limits instead of hardcoded 500MB
- Add comprehensive tests for upload limits and file splitting
- Document configuration in ConfigurationGuide.md and SECURITY_AUDIT.md
- Reference SECURITY_AUDIT.md in error messages for user guidance

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-10 10:51:30 +00:00
copilot-swe-agent[bot] 1937ea84cb docs: add detailed path traversal security audit report
- Create comprehensive audit documentation
- Document all vulnerabilities, fixes, and testing
- Include security recommendations for future development

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-10 10:30:26 +00:00