How saradune6/pdf_sign works
Project type and purpose
• This is a pure-frontend, single-page web application (Vue 3 + TypeScript) for signing PDF documents in the browser.
• It leverages client-side storage (IndexedDB via idb-keyval, localStorage), a PDF generation engine (jsPDF + @component-hook/pdf-canvas), and internationalization (vue-i18n).
File structure
• Top-level config and tooling
• .github/workflows/ci.yml, deploy.yml, preview.yml (CI/CD pipelines)
• vite.config.ts, tsconfig.json (build & TS config)
• package.json, linters (eslint.config.js, prettier.config.js), husky hooks
• Public assets
• Source code (src/)
• pages/ – view-level Vue files organized by feature (home, upload, signature, complete)
• store/ – Pinia stores managing PDF blobs, signature info, UI state
• router/ – vue-router setup, route events
• plugins/ – global Vue plugins (error handler, i18n, preload fonts/locales)
• hooks/ – composable functions for canvas loading, pointer handling, redirect, resize, warning popups
• utils/ – general utilities (IDB wrapper, image compression, PDF readers, toast notifications)
• assets/ and styles/ – static images and Tailwind/CSS styles
• Tests
• Unit & mocking (src/__tests__, Vitest)
• E2E (playwright.config.ts, src/__tests__/e2e)
README for additional insights
• Tech stack: Vue 3, TypeScript, Pinia, jsPDF, browser-image-compression, vue-i18n, idb-keyval.
• Deployment: Vercel, GitHub Actions for CI, preview, and production.
Detail without overcomplication
• Every distinct module (pages, components, hooks, plugins, utils).
• How they interconnect via the Vue application bootstrap (main.ts) and plugin registration.
• Two storage mediums (IndexedDB vs. localStorage) separately.