feat: @template/env + over-engineering cleanup + docs - #1
Merged
Conversation
- Add packages/env with Zod env validation (fail-fast typed config) - Replace process.env with validated env in nuxt.config.ts - Shared subscriptions Map for push endpoints (was 3 separate Maps) - Delete usePwaStore/usePwa (reimplements VueUse + @vite-pwa/nuxt) - Delete useLayout (reimplements useMediaQuery from VueUse) - Delete 01-pwa.client.ts plugin (redundant with @vite-pwa/nuxt) - Delete empty uno.config.ts (was only for ESLint plugin) - Add @types/web-push for proper type declarations
- Root README: add env package, validation catalog, catalog rationale - packages/env/README: schema, usage, graceful fallback - packages/eslint-config/README: rules, customization - packages/ui/README: layer usage, UnoCSS presets, components - apps/web/README: PWA flow, push API, composables, env setup Catalog fixes: - Move typescript from core → types (it's a dev tool) - Move @types/web-push from default catalog → types - pnpm-workspace.yaml: remove stale default catalog entry
Nitro auto-imports server/utils/* — explicit imports unnecessary. Top-level await rejected by es2019 target.
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.
What
process.envscattered across configprocess.envwith validatedenvinnuxt.config.tssubscriptionsMap for push endpoints (was 3 separate Maps talking to different instances)Over-engineering cleanup
usePwaStoreuseOnline,useMediaQuery,Notification.permissionusePwacomposableuseLayoutuseMediaQueryfrom VueUse (unused)01-pwa.client.tsplugin@vite-pwa/nuxtauto-registrationuno.config.tsCatalog audit (antfu pattern)
Categorization over version-only management. Each catalog name communicates purpose:
typescriptcatalog:corecatalog:types(it's a dev tool)@types/web-pushcatalog:catalog:typesDocs
packages/env: schema, usage, graceful fallbackpackages/eslint-config: rules, customizationpackages/ui: layer usage, UnoCSS presets, componentsapps/web: PWA flow, push API, composables, env setupAlso
@types/web-pushfor proper type declarationszodto pnpm catalogs