Frontend balíčky — license review¶
Tento doc reviewuje JS/TS závislosti frontend repa (nemoreport-ai-frontend-v2).
Licence summary
Všechny direct deps jsou MIT, BSD, ISC, nebo Apache 2.0 — plně OK pro komerční SaaS prodej.
Direct dependencies (package.json)¶
next: 16.2.3¶
- License: MIT
- Účel: React framework (App Router, SSR, server components)
- Repo: https://github.com/vercel/next.js
- Production-safe: ✅
- Pozn.: Vercel maintained. Next 16 je breaking-changes verze — viz
AGENTS.mdv repu.
react: 19.2.4 + react-dom: 19.2.4¶
- License: MIT
- Účel: React 19 + DOM renderer
- Repo: https://github.com/facebook/react
- Production-safe: ✅
@supabase/ssr: ^0.5.2¶
- License: MIT
- Účel: Server-side rendering helpers (cookies, session refresh)
- Repo: https://github.com/supabase/ssr
- Production-safe: ✅
- Pozn.: Supabase Inc. maintained.
@supabase/supabase-js: ^2.45.0¶
- License: MIT
- Účel: Supabase JavaScript SDK (browser + server)
- Repo: https://github.com/supabase/supabase-js
- Production-safe: ✅
react-markdown: ^10.1.0¶
- License: MIT
- Účel: Render markdown in React (chat messages, report content)
- Repo: https://github.com/remarkjs/react-markdown
- Production-safe: ✅
remark-gfm: ^4.0.1¶
- License: MIT
- Účel: GitHub Flavored Markdown extensions (tables, strikethrough, autolinks)
- Production-safe: ✅
Dev dependencies¶
@opennextjs/cloudflare: ^1.9.0¶
- License: Apache 2.0
- Účel: Adapter Next.js → Cloudflare Workers
- Repo: https://github.com/opennextjs/opennextjs-cloudflare
- Production-safe: ✅ (dev tool, output je naše CF Worker bundle)
- Pozn.: Vercel-blessed alternative. Necessary protože Next 16 SSR nefunguje na CF Pages.
@tailwindcss/postcss: ^4 + tailwindcss: ^4¶
- License: MIT
- Účel: Utility-first CSS framework, v4 (latest)
- Production-safe: ✅
wrangler: ^4.0.0¶
- License: Apache 2.0 OR MIT (dual)
- Účel: Cloudflare Workers CLI (deploy, dev server)
- Production-safe: ✅ (dev tool, ne v runtime bundle)
typescript: ^5¶
- License: Apache 2.0
- Účel: TS compiler
- Production-safe: ✅ (dev tool)
eslint: ^9 + eslint-config-next: 16.2.3¶
- License: MIT
- Účel: Linting
- Production-safe: ✅ (dev tool)
vitest: ^4.1.5¶
- License: MIT
- Účel: Test framework (Vite-based)
- Production-safe: ✅ (dev tool)
jsdom: ^29.1.0¶
- License: MIT
- Účel: DOM emulation pro Vitest
- Production-safe: ✅ (dev tool)
@types/*¶
- License: MIT (DefinitelyTyped project)
- Účel: TS type definitions
- Production-safe: ✅ (dev only, no runtime impact)
Cloudflare Workers runtime¶
Bundle size: 6.3 MB / 1.3 MB gzip (po Phase A.1 optimization).
Bundle obsahuje:
- Next.js 16 runtime (server components engine, routing)
- React 19 server + client bundles
- Tailwind CSS (purged, only used classes)
- App-specific code (src/)
- Supabase JS SDK
Žádné AGPL / GPL / problematic licenses v bundle. Vše permissive.
License compliance checklist¶
Pro production deployment:
- Žádné GPL / AGPL
- Všechny direct deps MIT / Apache 2.0
- React + Next.js MIT (Vercel/Meta)
- Supabase SDK MIT
- Žádné CC-NC nebo SSPL
CDN / external runtime resources¶
Frontend nahrává některé runtime resources z CDN:
- rrweb (CodeLens proxy worker — NEPOUŽÍVÁME, jen v CodeLens projektu)
- Tailwind CSS je inline v build (žádný CDN call)
- No Google Fonts (system fonts only — pro performance + GDPR)
Aktuálně frontend NEFETCHUJE žádné JS z external CDN.
Aktualizace strategy¶
Auto-managed¶
- Dependabot security alerts na GitHub repu
Manual review¶
- Next.js minor/major — breaking changes (zejména App Router APIs)
- React major — testing
- Supabase SDK — pravidelně aktualizovat (každý quarter)
Lock file¶
package-lock.json (npm) committed do repa → reproducible builds.
Bundle size monitoring¶
Před každým deploy:
npm run build
# Build output ukáže final bundle size
# Aktuálně 6.3 MB / 1.3 MB gzip — pod 10 MB CF Workers limit
Deploy size optimization tips (pro budoucnost):
- pydantic-ai-slim[google] místo full pydantic-ai[google] (úspora ~50 MB serverside, ale netýká se FE)
- Tailwind purging je auto (PostCSS plugin)
- Tree-shaking v Next.js auto
Tooling¶
License audit¶
# Install
npm install -g license-checker
# Run
license-checker --production --json --out licenses-fe.json
# Check pro problematic
license-checker --production --failOn 'GPL;AGPL;SSPL'
Doporučeno spustit při každém major upgrade (Next 17, React 20 atd.).