How siddichandu02/privacy-toolkit works
Privacy Toolkit is a browser-only PDF and image tool suite: users choose a tool, provide local files, configure the operation, and receive a result without uploading files. Its domain stages include file intake and preview, tool-specific editing, PDF processing, and result presentation. Web Workers provide an internal execution layer to keep processing off the UI thread. The README documents all six ready tools; sampled source confirms routing and parts of the worker framework, but not every tool-to-worker connection, so those links are omitted or marked unverified.
Main entry points: ToolPage.tsx Tool dispatch · App.tsx App routes · DoneCard.tsx Result cards · Home.tsx Tool discovery
Components 30
Navigation and discovery
- App routes
src/App.tsx - Tool discovery
src/routes/Home.tsx - Tool registry
src/tools.ts - Tool dispatch
src/routes/ToolPage.tsx - Not found
src/routes/NotFound.tsx - Site header
src/components/layout/Header.tsx - Tool accents
src/components/ui/accent.ts - Page title
src/useDocumentTitle.ts
File and tool workflow
- File workbench
src/components/drop/ToolWorkbench.tsx - File preview
src/components/drop/preview.ts - File queue
src/components/drop/useFileQueue.ts - Merge PDFs
src/components/merge/MergeTool.tsx - Split PDFs
src/components/split/SplitTool.tsx - Rotate pages
src/components/rotate/RotateTool.tsx - Images to PDF
src/components/images/ImagesTool.tsx - Sign PDF
src/components/sign/SignTool.tsx - Compress PDF
src/components/compress/CompressTool.tsx - Result cards
src/components/result/DoneCard.tsx - Pip companion
src/components/pip/Pip.tsx - Motion preference
src/useStillMotion.ts
PDF processing
- PDF operations
src/lib/pdf - PDF compression
src/lib/pdf/compress.ts - Image conversion
src/lib/pdf/images.ts - PDF rotation
src/lib/pdf/rotate.ts
Worker execution
- Worker job hooks
src/workers/useWorkerJob.ts - Tool workers
src/workers - Worker failures
src/workers/fail.ts - Wait progress
src/components/wait/progress.ts - Wait scene
src/components/wait/scenes/JarScene.tsx
Other components
- Visitor
Connections 36
- Visitor → App routes: opens
- App routes → Tool discovery: routes to
src/App.tsx - App routes → Tool dispatch: routes to
src/App.tsx - App routes → Not found: routes to
src/App.tsx - Tool discovery → Tool registry: reads tools
src/routes/Home.tsx - Tool discovery → Tool dispatch: offers navigation
- Tool dispatch → Tool registry: looks up tool
src/routes/ToolPage.tsx - Tool dispatch → Merge PDFs: dispatches merge
src/routes/ToolPage.tsx - Tool dispatch → Split PDFs: dispatches split
src/routes/ToolPage.tsx - Tool dispatch → Rotate pages: dispatches rotate
src/routes/ToolPage.tsx - Tool dispatch → Images to PDF: dispatches images
src/routes/ToolPage.tsx - Tool dispatch → Sign PDF: dispatches signing
src/routes/ToolPage.tsx - Tool dispatch → Compress PDF: dispatches compression
src/routes/ToolPage.tsx - Tool dispatch → File workbench: fallback dispatch
src/routes/ToolPage.tsx - App routes → Site header: renders
src/App.tsx - File workbench → File preview: uses preview
src/components/drop/preview.ts - File preview → Tool registry: validates files
src/components/drop/preview.ts - File preview → File queue: feeds file queue
- Compress PDF → PDF compression: runs compression
- Images to PDF → Image conversion: creates PDF
- Rotate pages → PDF rotation: rotates pages
- Tool workers → PDF compression: processes PDF
src/workers/compress.worker.ts - Tool workers → Image conversion: converts images
src/workers/images.worker.ts - Worker job hooks → Worker failures: uses failure message
src/workers/useWorkerJob.ts - Worker job hooks → Tool workers: starts worker
src/workers/useWorkerJob.ts - Sign PDF → Result cards: shows result
- Split PDFs → Result cards: shows result
- Compress PDF → Result cards: shows result
- Images to PDF → Result cards: shows result
- Rotate pages → Result cards: shows result
- Tool discovery → Pip companion: renders companion
src/routes/Home.tsx - Tool dispatch → Page title: sets page title
src/routes/ToolPage.tsx - Wait progress → Wait scene: provides progress display
- Wait scene → Pip companion: depicts wait story
- Tool dispatch → Tool accents: styles tool heading
src/routes/ToolPage.tsx - Pip companion → Motion preference: respects motion preference
src/components/pip/Pip.tsx