Repository navigation
Privacy-first ToolStack architecture refresh and local tools - #1
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new privacy-check script currently uses a URL with path.join, which will throw at runtime and break the CI/privacy enforcement.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR refreshes ToolStack’s architecture around a strict “local processing / no network” privacy contract, centralizes tool metadata, and adds several new browser-only utilities while standardizing tool page layout.
Changes:
- Introduces shared tool metadata/types (
src/types/tool.ts,src/config/tools.ts) and updates the homepage/components to use categories instead of tag shuffling. - Adds reusable “local tool” UI building blocks (
LocalToolLayout,ToolPage,PrivacyBadge) and updates multiple tools to the new layout. - Adds privacy/security enforcement and hardening (privacy-check script, security headers, CI verify workflow, markdown preview escaping) plus several new local-only tool pages.
File summaries
| File | Description |
|---|---|
| src/types/tool.ts | Adds shared Tool / ToolCategory types with local-only privacy contract fields. |
| src/config/tools.ts | Centralizes tool catalog and category list generation. |
| src/components/ToolPage.tsx | New standardized tool-page wrapper including privacy badge + back link. |
| src/components/ToolList.tsx | Simplifies tool list rendering and switches to shared Tool type. |
| src/components/ToolCard.tsx | Updates card UI to show category and “Local” badge; uses shared Tool type. |
| src/components/PrivacyBadge.tsx | Adds reusable “Processed locally / No upload / No tracking” badge. |
| src/components/LocalToolLayout.tsx | Adds a reusable layout for local-only tool pages (Navbar/Breadcrumbs/Footer + ToolPage). |
| src/app/page.tsx | Replaces homepage-owned catalog with centralized TOOLS; adds category filtering and privacy badge. |
| src/app/sitemap.ts | Adds sitemap route built from centralized tool list. |
| src/app/robots.ts | Adds robots route referencing sitemap. |
| src/app/unit-converter/page.tsx | Refactors converter UI/logic; separates SI vs IEC storage units. |
| src/app/regex-tester/page.tsx | Refactors regex tester to avoid state mutation in useMemo and handle non-global regexes. |
| src/app/markdown-editor/page.tsx | Refactors markdown editor and escapes raw HTML before rendering preview. |
| src/app/csv-converter/page.tsx | Fixes CSV→XML output by escaping XML and normalizing element names. |
| src/app/file-hash/page.tsx | Adds new local file hashing tool using Web Crypto. |
| src/app/url-cleaner/page.tsx | Adds new tracking URL cleaner tool. |
| src/app/password-generator/page.tsx | Adds new password/passphrase generator using crypto.getRandomValues. |
| src/app/jwt-inspector/page.tsx | Adds new JWT decoding/inspection tool (decode-only). |
| src/app/timestamp-tool/page.tsx | Adds new timestamp/date conversion tool. |
| src/app/uuid-generator/page.tsx | Adds new UUID/ULID generator + UUID validator. |
| src/app/text-privacy-cleaner/page.tsx | Adds new hidden/control character detector + cleaner. |
| src/app/encoder-decoder/page.tsx | Adds new Base64/URL/HTML encoder-decoder tool. |
| src/app/image-converter/page.tsx | Adds new image format conversion/download tool. |
| src/app/file-encryption/page.tsx | Adds local AES-GCM file encrypt/decrypt tool with PBKDF2-derived key. |
| src/app/json-toolbox/page.tsx | Adds new JSON validate/format/minify/sort tool. |
| src/app/browser-privacy/page.tsx | Adds browser privacy inspector showing readable browser-exposed values. |
| scripts/check-privacy.mjs | Adds a script to reject network-capable APIs in src/app. |
| next.config.ts | Adds security/privacy response headers including CSP and Permissions-Policy. |
| .github/workflows/ci.yml | Adds CI workflow to run privacy check, lint, typecheck, and build. |
| package.json | Updates scripts (start, lint, typecheck, privacy-check, verify) and bumps version. |
| README.md | Updates privacy contract, tool listing, dev instructions, and verification guidance. |
Review details
- Files reviewed: 31/31 changed files
- Comments generated: 4
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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
This PR refactors ToolStack around an explicit local-processing privacy contract, modernizes the project to Next.js 16, hardens existing browser tools, and adds a substantial set of new local-only utilities.
Architecture and maintainability
src/config/tools.tsTool, category and privacy metadata typestsconfig.jsonfor Next 16 (react-jsxand.next/dev/types/**/*.ts)Privacy and security
scripts/check-privacy.mjsto reject direct network-capable APIs acrosssrc/unsafe-evaldisabled in production but enables it innext dev, where React requires it for debuggingNew local-only tools
Correctness and UX fixes
:where(),:is(),:not()and:has()behaviorVerification
CI now runs:
privacy-check → ESLint → TypeScript → Vitest → Next production buildCurrent result: all stages pass, including 18 unit tests and the production build.
Deliberately not added