Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 2.19 KB

project-reference.md

File metadata and controls

36 lines (25 loc) · 2.19 KB

Project and development reference

Implementation and development notes preserved from the earlier README. For use, see the main guide.

  • ⚡️ Next.js 16 App Router with React Server Components
  • 🎨 Tailwind CSS v4, shadcn/ui primitives, and lucide-react icons
  • 🌗 Dark / light mode toggle with localStorage persistence and zero flash-of-unstyled-content
  • 🔍 Fuse.js fuzzy search and tag filtering across tool titles and tags
  • 🧱 Modular tool registry via lib/tools.config.ts
  • 🗺️ SEO-ready with autogenerated robots.txt and dynamic sitemap.xml
  • 🔒 Nonce-based Content Security Policy via Next.js middleware (proxy.ts)
  • 🛡️ Privacy Policy page at /privacy

Available scripts

  • pnpm dev – start the development server
  • pnpm build – create an optimized production build
  • pnpm start – run the production server
  • pnpm lint – lint with ESLint and Next.js rules
  • pnpm format – format all supported files with Prettier
  • pnpm test – run regression tests (Vitest)
  • pnpm test:watch – run tests in watch mode

Security implementation

Nonce-based Content Security Policy enforced on every request via proxy.ts (Next.js 16 middleware). Strict in production (script-src 'nonce-...' 'strict-dynamic'), relaxed for HMR in development. Full HSTS, COOP, COEP, CORP headers included.

The visitor counter API (/api/visits) makes no outbound requests, stores only an aggregate count, requires same-origin POSTs and rate-limits them per IP and overall (in memory; the overall cap holds even if client IP headers are forged). The Short URL Expander API (/api/expand-url) blocks SSRF via protocol allowlist, private host detection (RFC-1918, loopback, link-local), and per-hop redirect validation.

Password generation uses rejection-sampling (unbiasedRandom) to eliminate modulo bias in crypto.getRandomValues.

→ Full header table and CSP details: docs/ARCHITECTURE.md — Security model

Tests and deployment

See test cases, architecture, contribution guide, and deployment. Run pnpm test, pnpm build, and pnpm lint before committing.