feat: Add .env.example configuration file and integrate Redis service into Docker Compose for improved task management. Update desktop application to support document indexing and extraction workflows, enhancing user experience with a new extraction wizard and stepper components. Revise README and documentation for clarity on setup and usage.

This commit is contained in:
erik
2026-07-05 22:39:07 -05:00
parent 9aca926988
commit d95f8f6ad8
70 changed files with 9807 additions and 499 deletions
+15
View File
@@ -1,6 +1,7 @@
const { app, BrowserWindow, dialog, ipcMain } = require("electron");
const fs = require("node:fs/promises");
const path = require("node:path");
const { indexFolder } = require("./folderIndex.cjs");
const DOCUMENT_EXTENSIONS = new Set([".pdf", ".tif", ".tiff", ".png", ".jpg", ".jpeg"]);
@@ -72,6 +73,20 @@ ipcMain.handle("fs:first-document", async (_event, rootPath, keywords) => {
return matches[0] || null;
});
ipcMain.handle("fs:index-folder", async (_event, rootPath, structureMode, docTypes, keywords) => {
if (!rootPath) return [];
return indexFolder(rootPath, structureMode, Array.isArray(docTypes) ? docTypes : [], Array.isArray(keywords) ? keywords : []);
});
ipcMain.handle("fs:read-file", async (_event, filePath) => {
const buffer = await fs.readFile(filePath);
return {
filename: path.basename(filePath),
size: buffer.byteLength,
data: buffer,
};
});
async function findDocuments(rootPath, keywords) {
const normalizedKeywords = keywords
.map((item) => String(item || "").trim().toLowerCase())