draft - feat: Paperless-ngx integration (import/export)#82
Draft
lcrostarosa wants to merge 1 commit intovas3k:mainfrom
Draft
draft - feat: Paperless-ngx integration (import/export)#82lcrostarosa wants to merge 1 commit intovas3k:mainfrom
lcrostarosa wants to merge 1 commit intovas3k:mainfrom
Conversation
Add bidirectional integration with Paperless-ngx, a self-hosted document management system. Users can import documents from Paperless-ngx into TaxHacker for AI-powered financial extraction, and export processed transactions back to Paperless-ngx for long-term archival. - Typed API client (lib/paperless/) with auth, pagination, error handling - Settings UI at /settings/paperless (URL, token, test connection) - Import flow: browse, search, select, and import Paperless documents - Export flow: upload transaction files with tag/correspondent mapping - Prisma migration adding paperlessDocumentId to File model for dedup - Sidebar link for Paperless import, bulk action button for export - Full documentation at docs/paperless-ngx.md Closes vas3k#39 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
lcrostarosa
commented
Mar 31, 2026
| )} | ||
| </div> | ||
| </td> | ||
| <td className="p-2 hidden md:table-cell text-muted-foreground">{doc.created_date}</td> |
Author
There was a problem hiding this comment.
Styles and classnames inline
| const correspondent = doc.correspondent ? correspondentMap.get(doc.correspondent) : null | ||
|
|
||
| return ( | ||
| <tr className="border-t hover:bg-muted/30 cursor-pointer" onClick={onToggle}> |
Author
There was a problem hiding this comment.
This needs to be rewritten, should not return hardcoded classnames and ideally returns a component
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds bidirectional integration with Paperless-ngx, a self-hosted document management system. Closes #39.
/settings/paperlesswith URL, API token, enable toggle, and connection test button.paperlessDocumentIdon the File model to prevent duplicate imports/exports.New files
lib/paperless/— Typed API client (native fetch, auth, pagination, error handling)app/(app)/settings/paperless/— Settings page + test connection actionapp/(app)/import/paperless/— Import page + server actionsapp/(app)/export/paperless/— Export server actionscomponents/settings/paperless-settings-form.tsx— Settings formcomponents/import/paperless.tsx— Import UI (browse, search, select, paginate)components/export/paperless-export-dialog.tsx— Export dialog with tag/correspondent selectiondocs/paperless-ngx.md— Full documentationpaperless_document_idtofilestableModified files
prisma/schema.prisma—paperlessDocumentIdfield + index on File modelforms/settings.ts— Paperless fields in settings Zod schemaapp/(app)/settings/layout.tsx— "Paperless-ngx" in settings navmodels/files.ts—getFileByPaperlessDocumentId()querycomponents/sidebar/sidebar.tsx— "Import from Paperless" sidebar linkcomponents/transactions/bulk-actions.tsx— "Export to Paperless" buttoncomponents/transactions/list.tsx+app/(app)/transactions/page.tsx— Pass Paperless enabled flagTest plan
npx prisma migrate dev— migration applies cleanlynpm run build— no type errors (verified)/unsorted🤖 Generated with Claude Code