Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
0b69b8d
Integrate Paperless-NGX API for document attachments
abiteman Jun 13, 2025
beb2fe8
resolve Paperless NGX compressed PDF download issue
abiteman Jun 13, 2025
438026c
Paperless integration reorg
gitmotion Jun 13, 2025
a1e9697
fix(security): prevent API token exposure to frontend in settings end…
abiteman Jun 13, 2025
c6804ea
feat: implement Paperless NGX document indication with visual badges
abiteman Jun 13, 2025
7ee85d0
Add constants for APITOKENMASK, validation, and refactor for future i…
gitmotion Jun 13, 2025
dbbbfef
WIP POC for generalized integrations manager with paperless
gitmotion Jun 13, 2025
ff6124b
reorg integrations to root
gitmotion Jun 13, 2025
895fd59
reorg paperless icon to public/assets/logos
gitmotion Jun 13, 2025
8e8af6e
removal of previous paperless.js integration
gitmotion Jun 13, 2025
203b221
refactor frontend integrations code out of settings and into its own …
gitmotion Jun 14, 2025
dc515fc
fix test endpoint
gitmotion Jun 14, 2025
d403632
feat: transform Paperless search into multi-integration external docu…
abiteman Jun 15, 2025
33bd247
reorganize css and asset files for future integrations
gitmotion Jun 16, 2025
7cec9b1
update cursorrules and copilot instructions for future integrations
gitmotion Jun 16, 2025
5b91880
update cursor / copilot rules with css structure
gitmotion Jun 16, 2025
bb47e05
adjust integration styles for file uploader and setting styles
gitmotion Jun 17, 2025
6c08882
fix/revert duplicate modal styles
gitmotion Jun 17, 2025
73aebeb
Updates to show/add & high/remove listeners & buttons on loadactivein…
gitmotion Jun 17, 2025
3610fad
Fix paperless download endpoint and badge styles
gitmotion Jun 17, 2025
7c37e79
add new integrationmanager.registerroutes function to call all other …
gitmotion Jun 17, 2025
a582c36
reorganize integration registration functions
gitmotion Jun 17, 2025
a1131c5
fix: fixes error linking external docs on new asset creation
abiteman Jun 18, 2025
b3bd4c7
Add filetype filtering to search modal
abiteman Jun 18, 2025
2feab51
Added Papra Integration
abiteman Jun 18, 2025
4a0a61c
feat: modularize external document manager and add integration guide …
abiteman Jun 18, 2025
05ad102
fix: resolve HTTP 400 error in external document search - Fix paramet…
abiteman Jun 18, 2025
39bc17c
Apply collapsible styling on settings integrations
gitmotion Jun 18, 2025
6d8e972
Add/pass integration logos to settings integrations
gitmotion Jun 18, 2025
3e90a46
minor integrations style updates
gitmotion Jun 18, 2025
74c30c7
Update papra search to return all documents. if there is no search qu…
gitmotion Jun 18, 2025
6a287c5
Update to integration styling in settings and search modal
gitmotion Jun 18, 2025
e100130
passing integration color scheme to button / filters (still in progress)
gitmotion Jun 18, 2025
5f5d4ac
fix: handle both string and integer document IDs in external doc mana…
abiteman Jun 19, 2025
a06d98a
feat: add Home Assistant integration for device import
abiteman Jun 19, 2025
829633e
Refactor paperless properties to generalized properties
gitmotion Jun 19, 2025
0bf6ebf
Add fix for integrations filtering in search modal and using logoHref…
gitmotion Jun 19, 2025
4bc800a
update home assistant logo
gitmotion Jun 19, 2025
a6a0a61
Add only active integrations with the category of document-managment …
gitmotion Jun 19, 2025
0c4029f
Dynamically apply integration color schemes for search results
gitmotion Jun 19, 2025
567e9f3
Fix filtering results count to type of attachment for accurate pagina…
gitmotion Jun 19, 2025
c668db0
refactor paperless-styles to integration-styles and removed papra-sty…
gitmotion Jun 19, 2025
a16b60d
fix integration badges on file previews
gitmotion Jun 19, 2025
4ecd0fc
add logic to copy external attachments to asset duplication logic
gitmotion Jun 19, 2025
2be1430
feat: Add image preview proxy for external integrations
abiteman Jul 16, 2025
b7873a6
fix: Change image object-fit from cover to contain
abiteman Jul 16, 2025
4e715d1
feat: Enhanced Paperless integration to handle original images vs pro…
abiteman Jul 16, 2025
b258d16
Show different icon for original images processed as PDF
abiteman Jul 16, 2025
820e80a
Revert "Show different icon for original images processed as PDF"
abiteman Jul 16, 2025
fca1131
Revert "feat: Enhanced Paperless integration to handle original image…
abiteman Jul 16, 2025
bc4dea5
Add image icon support for document previews
abiteman Jul 17, 2025
9c2b607
fix: resolve integration code review issues
abiteman Jul 17, 2025
7ad7fd4
Update sidebar animation to use transform property
abiteman Jul 17, 2025
b7bb5d2
perf: optimize sidebar animation and fix incomplete template literal
abiteman Jul 17, 2025
19062c9
fix: resolve CSS integration style conflicts by moving and scoping se…
abiteman Jul 17, 2025
0422821
feat: disable Home Assistant integration with Coming Soon message
abiteman Jul 17, 2025
8aed97d
fix: improve Coming Soon integration logic and add cache busting
abiteman Jul 17, 2025
5112c47
debug: add schema logging to /api/integrations endpoint
abiteman Jul 17, 2025
39dced1
fix: Add comingSoon flag to integration registration and implement pr…
abiteman Jul 17, 2025
a295aae
fix: Add missing exports to assetRenderer.js and clean up debug logging
abiteman Jul 17, 2025
79b0f36
style: Update Coming Soon message styling with blue-green theme and s…
abiteman Jul 17, 2025
2ff6c6c
fix save settings bug from not loading all integration settings after…
gitmotion Jul 22, 2025
4621efd
readjust styles on file preview grid on asset/subassets view
gitmotion Jul 23, 2025
ea44564
revert unused changes
gitmotion Jul 23, 2025
b55538f
Fix for keeping file attachment collapsible sections open when linkin…
gitmotion Jul 25, 2025
fa7adb5
update paperless endpoints
gitmotion Jul 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 55 additions & 1 deletion .cursorrules
Original file line number Diff line number Diff line change
Expand Up @@ -323,4 +323,58 @@ try {
- Apprise integration for external notifications
- Queue management to prevent notification spam
- Timezone-aware scheduling with Luxon
- Sanitized message formatting for security
- Sanitized message formatting for security

## Integration System

### Adding New Integrations
DumbAssets uses a schema-driven integration system that automatically generates UI and handles configuration management. The integration system is now managed centrally by the Integration Manager, which is responsible for importing, registering, and routing all integrations. Follow these steps to add a new integration:

#### 1. Backend Integration Setup

- **Create Integration File** (`/integrations/your-integration.js`):
- Export a class with a static `SCHEMA` property and a static `registerRoutes(app, getSettings)` method.
- The `SCHEMA` defines config fields, validation, endpoints, and metadata.
- The `registerRoutes` method should register all Express routes for the integration.

- **Register Integration in Integration Manager** (`/integrations/integrationManager.js`):
- Import your integration at the top of the file.
- In `registerBuiltInIntegrations()`, call `this.registerIntegration('your-integration-id', YourIntegration.SCHEMA);`
- The Integration Manager is now responsible for calling each integration's `registerRoutes` method via its own `registerRoutes(app, getSettings)` function. This means only the Integration Manager imports integration files, and all route registration is centralized.

- **Register All Integration Routes in server.js**:
- In `server.js`, after initializing the app and before starting the server, call `integrationManager.registerRoutes(app, getSettings)`.
- You do NOT need to import individual integrations in `server.js`.

#### 2. Frontend Integration (Automatic)
- The frontend dynamically loads all integrations and their schemas from the `/api/integrations` endpoint.
- The UI is generated based on the schema, including validation, field types, and test connection functionality.
- Add optional integration-specific styles in `/public/assets/css/your-integration-styles.css` if needed.

#### 3. Integration Schema Reference
- See the Paperless NGX integration for a full example of a schema and route registration.
- Supported field types: text, password, url, number, select, checkbox, textarea, boolean.
- Mark sensitive fields with `sensitive: true` (these are masked in the UI and handled securely).

#### 4. Error Handling and Testing
- Use consistent error response format: `{ success: false, message: 'Error description' }`
- Implement proper timeout handling (default: 10000ms)
- Provide meaningful error messages for users
- Log detailed errors server-side for debugging
- Implement a `testConnection` static method for connectivity validation

#### 5. Integration Development Checklist
- [ ] Create integration class in `/integrations/` with SCHEMA and registerRoutes
- [ ] Register integration in `integrationManager.js` (import and add to `registerBuiltInIntegrations`)
- [ ] Integration Manager will call your integration's `registerRoutes` automatically
- [ ] Call `integrationManager.registerRoutes(app, getSettings)` in `server.js`
- [ ] Test UI generation, validation, and connection from the frontend
- [ ] Add custom styles if needed
- [ ] Document any special configuration requirements

#### 6. Key Conventions
- All backend integration logic and route registration is managed by the Integration Manager
- Only the Integration Manager imports integration files
- All integrations must provide a static `registerRoutes(app, getSettings)` method
- The frontend is schema-driven and requires no manual code changes for new integrations
- Use the Paperless NGX integration as a reference for best practices
Loading