- Admin panel (/admin) with JWT auth: configure Replicate API token, JigsawStack API key, model version, enable/disable AI translation, change admin password. Settings persisted in data/settings.json. - Replicate AI translation: POST /api/translate/replicate uses JigsawStack text-translate model via Replicate API. Main page switches to client-side AI translation when enabled. - Document translation tab: supports PDF, DOCX, XLSX, XLS, CSV. Excel/Word formatting fully preserved (SheetJS + JSZip XML manipulation). PDF uses pdf-parse extraction + pdf-lib reconstruction. Column selector UI for tabular data (per-sheet, All/None toggles). - Updated README with full implementation documentation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
36 lines
846 B
JavaScript
36 lines
846 B
JavaScript
const withPWA = require("next-pwa");
|
|
|
|
module.exports = withPWA({
|
|
swcMinify: true,
|
|
pwa: {
|
|
dest: "public"
|
|
},
|
|
// Exclude server-only packages from client bundles
|
|
webpack: (config, { isServer }) => {
|
|
if (!isServer) {
|
|
config.resolve.fallback = {
|
|
...config.resolve.fallback,
|
|
fs: false,
|
|
path: false,
|
|
crypto: false,
|
|
stream: false,
|
|
zlib: false
|
|
};
|
|
}
|
|
return config;
|
|
},
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: "/(.*)",
|
|
headers: [
|
|
{
|
|
key: "Permissions-Policy",
|
|
value: "interest-cohort=()"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
});
|