Commit Graph

45 Commits

Author SHA1 Message Date
copilot-swe-agent[bot] ff9a3ff49f style: fix code formatting with black, isort, and flake8
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-12 03:21:41 +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] 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] d08040ac4a style: fix all flake8 linter errors across app/ directory
- Run Black formatter and isort on all app/ files
- Remove unused imports (F401) across multiple files
- Add # noqa: F401 for intentional re-exports in celery_worker.py,
  tasks/__init__.py, utils.py, frontend.py, views/base.py
- Fix f-strings without placeholders (F541) in azure.py, notification.py,
  check_credentials.py, upload_to_onedrive.py, settings.py
- Fix bare except (E722) in upload_to_sftp.py
- Fix block comment format (E265) in models.py
- Move imports to top of file to fix E402 in celery_app.py, celery_worker.py
- Fix line-too-long (E501) by wrapping strings in multiple files
- Remove unused variable (F841) in upload_to_nextcloud.py

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-08 17:42:33 +00:00
copilot-swe-agent[bot] b6755f8b36 Fix line length to comply with Black formatting (120 chars)
- Break long line in lifespan function to multiple lines
- Remove test_startup.py (not needed, existing tests validate startup)

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-08 07:18:21 +00:00
copilot-swe-agent[bot] ad31f26beb Migrate from deprecated @app.on_event to lifespan context manager
- Convert sync and async startup handlers to single lifespan function
- Remove deprecated @app.on_event("startup") and @app.on_event("shutdown")
- Add asynccontextmanager import for lifespan pattern
- Consolidate all startup/shutdown logic into one place
- Fixes Python 3.14 compatibility issue causing startup failure

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-08 07:16:57 +00:00
copilot-swe-agent[bot] e1bb9de915 Add settings management infrastructure: models, API, views, and database loading
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 22:31:06 +00:00
copilot-swe-agent[bot] 74724973d8 Fix API routes to return JSON instead of HTML on errors
- Modified exception handlers in app/main.py to check if request path starts with /api/
- HTTPException handler returns JSON for API routes, HTML for frontend routes
- General exception handler (500) also checks and returns appropriate format
- Enhanced frontend deleteFile() to handle non-JSON responses gracefully
- Added content-type checking before parsing JSON
- Added comprehensive tests for API error handling

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 19:18:42 +00:00
copilot-swe-agent[bot] f0f48b39a9 Add security fixes, testing infrastructure, and CI/CD improvements
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-06 21:55:19 +00:00
Christian Krakau-Louis 36582030c2 feat: Explicitly include the files router in the main application 2025-04-11 15:42:55 +00:00
Christian Krakau-Louis bcc7a32772 fix: Update template directory path for error handlers 2025-04-11 14:18:48 +00:00
Christian Krakau-Louis d79652b494 feat: Add authentication configuration and validation
- Introduced new authentication settings in config.py including `auth_enabled`, `admin_username`, `admin_password`, and `session_secret`.
- Added validation for `session_secret` to ensure it meets security requirements when authentication is enabled.
- Updated main.py to conditionally mount static files and log warnings if the directory is not found.
- Removed unused email template files and added new authentication and notification setup documentation.
- Implemented authentication configuration validation in validators.py and updated settings display.
- Enhanced the user interface with a new login template and SVG assets for branding.
- Added comprehensive guides for setting up authentication and notifications in the documentation.
2025-04-11 03:44:08 +02:00
Christian Krakau-Louis 05ede35059 feat: Add license and attribution routes, update templates and documentation
- Added a new license route to serve the LGPL license text.
- Introduced a new attribution page to acknowledge third-party software used in the project.
- Updated the base HTML template to include a link to the attribution page.
- Included the license router in the main application router.
- Added the license text file for LGPL to the static licenses directory.
- Updated the NOTICE file to include detailed attributions for third-party libraries.
- Added a new requirements-dev.txt for license compliance checking.
- Updated the requirements.txt to clarify the LGPL license for Paramiko.
2025-04-11 02:39:26 +02:00
Christian Krakau-Louis ce91dc8c79 feat: Implement notification system with Apprise integration and credential checks 2025-04-11 01:55:10 +02:00
Christian Krakau-Louis 8f311d730a feat: rename project from DocuNova to DocuElevate, update related documentation and templates 2025-04-03 23:25:51 +02:00
Christian Krakau-Louis d23a48b1c0 feat: add frontend views and file management functionality, enhance user response structure, and update configuration guide 2025-04-03 21:49:15 +02:00
Christian Krakau-Louis 2cafda11dd feat: update version to 0.4.3-dev, add file deletion feature, and refactor API structure 2025-04-03 15:55:34 +02:00
Christian Krakau-Louis 22a551f766 feat: refactor file upload handling and remove unused router files 2025-04-01 04:58:55 +02:00
Christian Krakau-Louis 6972fb7505 feat: implement Google Drive integration and enhance documentation for new features 2025-04-01 04:44:00 +02:00
Christian Krakau-Louis 219a252090 feat: update environment configuration and README for DocuNova branding 2025-03-28 23:49:07 +01:00
Christian Krakau-Louis de06fd1286 refactor: rename upload_to_s3 to process_document
- Rename upload_to_s3.py to process_document.py to better reflect its purpose
- Update all import statements across the codebase to use new module name
- Remove S3-specific code and references
- Keep the core document processing logic intact
- Update docstrings and comments to reflect new functionality

This change is part of removing AWS S3 dependencies and simplifying the
document processing pipeline.
2025-03-27 14:50:51 +01:00
Christian Krakau-Louis d60dcbf54b added custom 500 error 2025-03-26 03:06:32 +01:00
Christian Krakau-Louis d95f5babb8 Refactored frontend + added template engine 2025-03-26 02:17:05 +01:00
Christian Krakau-Louis ff1f6e042c fixed 404 2025-03-25 22:11:44 +01:00
Christian Krakau-Louis 9570d499b4 change import 2025-03-25 22:02:19 +01:00
Christian Krakau-Louis 0f82defc01 added more pages and changed project name to DocuNova 2025-03-25 21:57:48 +01:00
Christian Krakau-Louis 0003daadb1 fixed import for Request in main.py 2025-03-25 21:33:55 +01:00
Christian Krakau-Louis e4101f690b added gravatar to user and added /api/whoami call 2025-03-25 21:31:32 +01:00
Christian Krakau-Louis 398663595d Merge branch 'main' into auth-for-ui 2025-03-25 14:49:19 +01:00
Christian Krakau-Louis 5005f65f17 changes to the Authentik integration 2025-03-25 14:45:45 +01:00
Christian Krakau-Louis 5eb8fa586b added duplicate check and database 2025-03-25 13:55:15 +01:00
Christian Krakau-Louis 8aa667fd48 removed proxymiddleware and moved to uvicorn startup command 2025-03-25 12:44:41 +01:00
Christian Krakau-Louis bf4aa95f52 added support for correct url detection 2025-03-25 12:23:21 +01:00
Christian Krakau-Louis 6ca68126ed added Authentik config 2025-03-25 11:34:22 +01:00
Christian Krakau-Louis 19c763e595 added a favicon, updated the README.md file 2025-03-25 10:48:55 +01:00
Christian Krakau-Louis 50ba7989c5 added imports for FastAPI 2025-03-24 17:11:49 +01:00
Christian Krakau-Louis f4cacacd3a fixed typo 2025-03-24 17:04:53 +01:00
Christian Krakau-Louis 2891b335b0 added ui upload route 2025-03-24 17:02:56 +01:00
Christian Krakau-Louis e526f691ef added first draft of upload interface 2025-03-24 16:52:47 +01:00
Christian Krakau-Louis 70fb539b7b putting it all together 2025-02-12 02:26:41 +01:00
Christian Krakau-Louis e601392a29 Fixed directory default for processing 2025-02-11 23:13:14 +01:00
Christian Krakau-Louis cdc6e976a8 Add APIs to upload to various destinations - dummy code first 2025-02-11 23:11:21 +01:00
Christian Krakau-Louis fb217a8d8f Changed to workdir variable 2025-02-11 22:01:42 +01:00
Christian Krakau-Louis 1ad9425102 Added first working version of the code. Processes
PDF files, no upload yet.
2025-02-11 19:42:23 +01:00
Christian Krakau-Louis 3a0949d79d Create main.py 2025-02-09 16:20:26 +01:00