claudeinone-cli 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +16 -1
- package/kit/.claude/.ck.json +9 -0
- package/kit/.claude/.ckignore +12 -0
- package/kit/.claude/agents/accessibility-auditor.md +46 -0
- package/kit/.claude/agents/api-designer.md +43 -0
- package/kit/.claude/agents/backend-developer.md +54 -0
- package/kit/.claude/agents/brainstormer.md +33 -0
- package/kit/.claude/agents/campaign-manager.md +36 -0
- package/kit/.claude/agents/code-reviewer.md +39 -0
- package/kit/.claude/agents/content-creator.md +38 -0
- package/kit/.claude/agents/copywriter.md +42 -0
- package/kit/.claude/agents/database-admin.md +37 -0
- package/kit/.claude/agents/debugger.md +46 -0
- package/kit/.claude/agents/devops-engineer.md +41 -0
- package/kit/.claude/agents/docs-manager.md +33 -0
- package/kit/.claude/agents/email-wizard.md +40 -0
- package/kit/.claude/agents/frontend-developer.md +52 -0
- package/kit/.claude/agents/fullstack-developer.md +55 -0
- package/kit/.claude/agents/git-manager.md +40 -0
- package/kit/.claude/agents/i18n-specialist.md +46 -0
- package/kit/.claude/agents/integration-specialist.md +48 -0
- package/kit/.claude/agents/journal-writer.md +39 -0
- package/kit/.claude/agents/mcp-manager.md +57 -0
- package/kit/.claude/agents/mobile-developer.md +38 -0
- package/kit/.claude/agents/performance-optimizer.md +38 -0
- package/kit/.claude/agents/planner.md +56 -0
- package/kit/.claude/agents/project-manager.md +34 -0
- package/kit/.claude/agents/refactorer.md +43 -0
- package/kit/.claude/agents/researcher.md +45 -0
- package/kit/.claude/agents/risk-analyst.md +33 -0
- package/kit/.claude/agents/scalability-consultant.md +39 -0
- package/kit/.claude/agents/scout.md +25 -0
- package/kit/.claude/agents/security-auditor.md +42 -0
- package/kit/.claude/agents/seo-specialist.md +44 -0
- package/kit/.claude/agents/skill-creator.md +64 -0
- package/kit/.claude/agents/social-media-manager.md +35 -0
- package/kit/.claude/agents/systems-designer.md +35 -0
- package/kit/.claude/agents/technology-strategist.md +43 -0
- package/kit/.claude/agents/tester.md +40 -0
- package/kit/.claude/agents/ui-ux-designer.md +40 -0
- package/kit/.claude/commands/co/ask.md +29 -0
- package/kit/.claude/commands/co/bootstrap-auto-fast.md +28 -0
- package/kit/.claude/commands/co/bootstrap-auto-parallel.md +29 -0
- package/kit/.claude/commands/co/bootstrap-auto.md +30 -0
- package/kit/.claude/commands/co/bootstrap.md +31 -0
- package/kit/.claude/commands/co/brainstorm.md +27 -0
- package/kit/.claude/commands/co/campaign.md +28 -0
- package/kit/.claude/commands/co/changelog.md +25 -0
- package/kit/.claude/commands/co/checkpoint.md +25 -0
- package/kit/.claude/commands/co/ci.md +26 -0
- package/kit/.claude/commands/co/ck-help.md +24 -0
- package/kit/.claude/commands/co/coding-level.md +24 -0
- package/kit/.claude/commands/co/content-cro.md +26 -0
- package/kit/.claude/commands/co/content-enhance.md +26 -0
- package/kit/.claude/commands/co/content-fast.md +24 -0
- package/kit/.claude/commands/co/content-good.md +26 -0
- package/kit/.claude/commands/co/cook.md +33 -0
- package/kit/.claude/commands/co/debug.md +26 -0
- package/kit/.claude/commands/co/deploy.md +25 -0
- package/kit/.claude/commands/co/design-3d.md +27 -0
- package/kit/.claude/commands/co/design-describe.md +25 -0
- package/kit/.claude/commands/co/design-fast.md +25 -0
- package/kit/.claude/commands/co/design-good.md +28 -0
- package/kit/.claude/commands/co/design-screenshot.md +26 -0
- package/kit/.claude/commands/co/design-video.md +26 -0
- package/kit/.claude/commands/co/docker.md +24 -0
- package/kit/.claude/commands/co/docs-api.md +25 -0
- package/kit/.claude/commands/co/docs-init.md +26 -0
- package/kit/.claude/commands/co/docs-readme.md +24 -0
- package/kit/.claude/commands/co/docs-summarize.md +25 -0
- package/kit/.claude/commands/co/docs-update.md +25 -0
- package/kit/.claude/commands/co/env-check.md +25 -0
- package/kit/.claude/commands/co/fix-ci.md +29 -0
- package/kit/.claude/commands/co/fix-fast.md +28 -0
- package/kit/.claude/commands/co/fix-hard.md +33 -0
- package/kit/.claude/commands/co/fix-logs.md +28 -0
- package/kit/.claude/commands/co/fix-types.md +28 -0
- package/kit/.claude/commands/co/fix-ui.md +28 -0
- package/kit/.claude/commands/co/fix.md +27 -0
- package/kit/.claude/commands/co/git-cm.md +26 -0
- package/kit/.claude/commands/co/git-cp.md +26 -0
- package/kit/.claude/commands/co/git-pr.md +26 -0
- package/kit/.claude/commands/co/index.md +24 -0
- package/kit/.claude/commands/co/integrate-polar.md +29 -0
- package/kit/.claude/commands/co/integrate-sepay.md +29 -0
- package/kit/.claude/commands/co/journal.md +27 -0
- package/kit/.claude/commands/co/k8s.md +24 -0
- package/kit/.claude/commands/co/kanban.md +25 -0
- package/kit/.claude/commands/co/lint-fix.md +24 -0
- package/kit/.claude/commands/co/load.md +25 -0
- package/kit/.claude/commands/co/migrate.md +28 -0
- package/kit/.claude/commands/co/mock.md +26 -0
- package/kit/.claude/commands/co/mode.md +24 -0
- package/kit/.claude/commands/co/monitor.md +25 -0
- package/kit/.claude/commands/co/new-feature.md +27 -0
- package/kit/.claude/commands/co/optimize.md +26 -0
- package/kit/.claude/commands/co/plan-archive.md +24 -0
- package/kit/.claude/commands/co/plan-ci.md +28 -0
- package/kit/.claude/commands/co/plan-cro.md +27 -0
- package/kit/.claude/commands/co/plan-fast.md +24 -0
- package/kit/.claude/commands/co/plan-hard.md +27 -0
- package/kit/.claude/commands/co/plan-parallel.md +25 -0
- package/kit/.claude/commands/co/plan-two.md +29 -0
- package/kit/.claude/commands/co/plan-validate.md +27 -0
- package/kit/.claude/commands/co/plan.md +27 -0
- package/kit/.claude/commands/co/pr.md +25 -0
- package/kit/.claude/commands/co/preview.md +26 -0
- package/kit/.claude/commands/co/refactor.md +25 -0
- package/kit/.claude/commands/co/release.md +25 -0
- package/kit/.claude/commands/co/review-a11y.md +24 -0
- package/kit/.claude/commands/co/review-codebase-parallel.md +27 -0
- package/kit/.claude/commands/co/review-codebase.md +27 -0
- package/kit/.claude/commands/co/review-perf.md +24 -0
- package/kit/.claude/commands/co/review-security.md +25 -0
- package/kit/.claude/commands/co/scaffold.md +25 -0
- package/kit/.claude/commands/co/scout.md +26 -0
- package/kit/.claude/commands/co/secure.md +26 -0
- package/kit/.claude/commands/co/seed.md +25 -0
- package/kit/.claude/commands/co/seo-audit.md +24 -0
- package/kit/.claude/commands/co/seo-keywords.md +25 -0
- package/kit/.claude/commands/co/skill-create.md +29 -0
- package/kit/.claude/commands/co/skill-fix-logs.md +28 -0
- package/kit/.claude/commands/co/slide-create.md +24 -0
- package/kit/.claude/commands/co/spawn.md +24 -0
- package/kit/.claude/commands/co/terraform.md +24 -0
- package/kit/.claude/commands/co/test-gen.md +24 -0
- package/kit/.claude/commands/co/test-ui.md +27 -0
- package/kit/.claude/commands/co/test.md +26 -0
- package/kit/.claude/commands/co/use-mcp.md +25 -0
- package/kit/.claude/commands/co/video-script.md +25 -0
- package/kit/.claude/commands/co/watzup.md +25 -0
- package/kit/.claude/commands/co/worktree.md +25 -0
- package/kit/.claude/commands/co/write-blog.md +25 -0
- package/kit/.claude/commands/co/write-copy.md +24 -0
- package/kit/.claude/commands/co/write-email.md +25 -0
- package/kit/.claude/commands/content/content-cro.md +26 -0
- package/kit/.claude/commands/content/content-enhance.md +26 -0
- package/kit/.claude/commands/content/content-fast.md +24 -0
- package/kit/.claude/commands/content/content-good.md +26 -0
- package/kit/.claude/commands/content/enhance.md +26 -0
- package/kit/.claude/commands/content/good.md +26 -0
- package/kit/.claude/commands/core/ask.md +29 -0
- package/kit/.claude/commands/core/bootstrap-auto-fast.md +28 -0
- package/kit/.claude/commands/core/bootstrap-auto-parallel.md +29 -0
- package/kit/.claude/commands/core/bootstrap-auto.md +30 -0
- package/kit/.claude/commands/core/bootstrap.md +31 -0
- package/kit/.claude/commands/core/ck-help.md +24 -0
- package/kit/.claude/commands/core/coding-level.md +24 -0
- package/kit/.claude/commands/core/cook.md +33 -0
- package/kit/.claude/commands/core/debug.md +26 -0
- package/kit/.claude/commands/core/journal.md +27 -0
- package/kit/.claude/commands/core/kanban.md +25 -0
- package/kit/.claude/commands/core/preview.md +26 -0
- package/kit/.claude/commands/core/scout.md +26 -0
- package/kit/.claude/commands/core/test-ui.md +27 -0
- package/kit/.claude/commands/core/test.md +26 -0
- package/kit/.claude/commands/core/use-mcp.md +25 -0
- package/kit/.claude/commands/core/watzup.md +25 -0
- package/kit/.claude/commands/core/worktree.md +25 -0
- package/kit/.claude/commands/design/3d.md +27 -0
- package/kit/.claude/commands/design/design-3d.md +27 -0
- package/kit/.claude/commands/design/design-describe.md +25 -0
- package/kit/.claude/commands/design/design-fast.md +25 -0
- package/kit/.claude/commands/design/design-good.md +28 -0
- package/kit/.claude/commands/design/design-screenshot.md +26 -0
- package/kit/.claude/commands/design/design-video.md +26 -0
- package/kit/.claude/commands/design/good.md +28 -0
- package/kit/.claude/commands/design/video.md +26 -0
- package/kit/.claude/commands/docs/docs-init.md +26 -0
- package/kit/.claude/commands/docs/docs-summarize.md +25 -0
- package/kit/.claude/commands/docs/docs-update.md +25 -0
- package/kit/.claude/commands/docs/init.md +26 -0
- package/kit/.claude/commands/docs/summarize.md +25 -0
- package/kit/.claude/commands/fix/ci.md +29 -0
- package/kit/.claude/commands/fix/fast.md +28 -0
- package/kit/.claude/commands/fix/fix-ci.md +29 -0
- package/kit/.claude/commands/fix/fix-fast.md +28 -0
- package/kit/.claude/commands/fix/fix-hard.md +33 -0
- package/kit/.claude/commands/fix/fix-logs.md +28 -0
- package/kit/.claude/commands/fix/fix-types.md +28 -0
- package/kit/.claude/commands/fix/fix-ui.md +28 -0
- package/kit/.claude/commands/fix/hard.md +33 -0
- package/kit/.claude/commands/fix/logs.md +28 -0
- package/kit/.claude/commands/fix/types.md +28 -0
- package/kit/.claude/commands/fix/ui.md +28 -0
- package/kit/.claude/commands/git/cp.md +26 -0
- package/kit/.claude/commands/git/git-cm.md +26 -0
- package/kit/.claude/commands/git/git-cp.md +26 -0
- package/kit/.claude/commands/git/git-pr.md +26 -0
- package/kit/.claude/commands/integrate/integrate-polar.md +29 -0
- package/kit/.claude/commands/integrate/integrate-sepay.md +29 -0
- package/kit/.claude/commands/integrate/sepay.md +29 -0
- package/kit/.claude/commands/plan/ci.md +28 -0
- package/kit/.claude/commands/plan/cro.md +27 -0
- package/kit/.claude/commands/plan/hard.md +27 -0
- package/kit/.claude/commands/plan/plan-archive.md +24 -0
- package/kit/.claude/commands/plan/plan-ci.md +28 -0
- package/kit/.claude/commands/plan/plan-cro.md +27 -0
- package/kit/.claude/commands/plan/plan-fast.md +24 -0
- package/kit/.claude/commands/plan/plan-hard.md +27 -0
- package/kit/.claude/commands/plan/plan-parallel.md +25 -0
- package/kit/.claude/commands/plan/plan-two.md +29 -0
- package/kit/.claude/commands/plan/plan-validate.md +27 -0
- package/kit/.claude/commands/plan/plan.md +27 -0
- package/kit/.claude/commands/plan/validate.md +27 -0
- package/kit/.claude/commands/skill/fix-logs.md +28 -0
- package/kit/.claude/commands/skill/skill-create.md +29 -0
- package/kit/.claude/commands/skill/skill-fix-logs.md +28 -0
- package/kit/.claude/settings.json +16 -0
- package/kit/.claude/skills/ai-anthropic.md +100 -0
- package/kit/.claude/skills/ai-context-engineering.md +113 -0
- package/kit/.claude/skills/ai-gemini.md +152 -0
- package/kit/.claude/skills/ai-langchain.md +93 -0
- package/kit/.claude/skills/ai-llamaindex.md +179 -0
- package/kit/.claude/skills/ai-mcp-builder.md +101 -0
- package/kit/.claude/skills/ai-openai.md +250 -0
- package/kit/.claude/skills/ai-prompt-engineering.md +173 -0
- package/kit/.claude/skills/ai-rag.md +91 -0
- package/kit/.claude/skills/ai-vectordb.md +215 -0
- package/kit/.claude/skills/analytics-segment.md +161 -0
- package/kit/.claude/skills/api-caching.md +103 -0
- package/kit/.claude/skills/api-documentation.md +50 -0
- package/kit/.claude/skills/api-graphql.md +234 -0
- package/kit/.claude/skills/api-openapi.md +116 -0
- package/kit/.claude/skills/api-pagination-filtering.md +239 -0
- package/kit/.claude/skills/api-rate-limiting.md +179 -0
- package/kit/.claude/skills/api-rest-advanced.md +50 -0
- package/kit/.claude/skills/api-rest.md +217 -0
- package/kit/.claude/skills/api-trpc.md +173 -0
- package/kit/.claude/skills/api-versioning.md +70 -0
- package/kit/.claude/skills/api-webhooks.md +226 -0
- package/kit/.claude/skills/arch-clean-code.md +226 -0
- package/kit/.claude/skills/arch-clean.md +91 -0
- package/kit/.claude/skills/arch-cqrs.md +229 -0
- package/kit/.claude/skills/arch-ddd.md +85 -0
- package/kit/.claude/skills/arch-event-driven.md +189 -0
- package/kit/.claude/skills/arch-microservices.md +80 -0
- package/kit/.claude/skills/arch-monorepo.md +87 -0
- package/kit/.claude/skills/arch-multi-tenant.md +81 -0
- package/kit/.claude/skills/arch-serverless.md +86 -0
- package/kit/.claude/skills/auth-clerk.md +97 -0
- package/kit/.claude/skills/auth-jwt.md +143 -0
- package/kit/.claude/skills/auth-lucia.md +93 -0
- package/kit/.claude/skills/auth-nextauth.md +446 -0
- package/kit/.claude/skills/auth-oauth.md +208 -0
- package/kit/.claude/skills/auth-oauth2.md +110 -0
- package/kit/.claude/skills/auth-passkeys.md +109 -0
- package/kit/.claude/skills/auth-session.md +88 -0
- package/kit/.claude/skills/backend-dotnet.md +414 -0
- package/kit/.claude/skills/backend-express.md +129 -0
- package/kit/.claude/skills/backend-fastify.md +104 -0
- package/kit/.claude/skills/backend-go.md +205 -0
- package/kit/.claude/skills/backend-graphql.md +149 -0
- package/kit/.claude/skills/backend-grpc.md +382 -0
- package/kit/.claude/skills/backend-hono.md +95 -0
- package/kit/.claude/skills/backend-java-spring.md +198 -0
- package/kit/.claude/skills/backend-nodejs-express.md +165 -0
- package/kit/.claude/skills/backend-nodejs.md +143 -0
- package/kit/.claude/skills/backend-php-laravel.md +156 -0
- package/kit/.claude/skills/backend-python-django.md +200 -0
- package/kit/.claude/skills/backend-python-fastapi.md +169 -0
- package/kit/.claude/skills/backend-ruby-rails.md +190 -0
- package/kit/.claude/skills/backend-rust.md +182 -0
- package/kit/.claude/skills/backend-websockets.md +392 -0
- package/kit/.claude/skills/cache-redis.md +195 -0
- package/kit/.claude/skills/caching-strategies.md +100 -0
- package/kit/.claude/skills/cloud-aws.md +165 -0
- package/kit/.claude/skills/cloud-azure.md +187 -0
- package/kit/.claude/skills/cloud-cloudflare.md +74 -0
- package/kit/.claude/skills/cloud-fly.md +94 -0
- package/kit/.claude/skills/cloud-gcp.md +160 -0
- package/kit/.claude/skills/cloud-railway.md +92 -0
- package/kit/.claude/skills/cloud-render.md +70 -0
- package/kit/.claude/skills/cloud-serverless.md +68 -0
- package/kit/.claude/skills/cloud-vercel.md +76 -0
- package/kit/.claude/skills/component-patterns.md +50 -0
- package/kit/.claude/skills/content-management.md +197 -0
- package/kit/.claude/skills/cors-security.md +50 -0
- package/kit/.claude/skills/data-csv-excel.md +210 -0
- package/kit/.claude/skills/database-optimization.md +196 -0
- package/kit/.claude/skills/databases-transactions.md +68 -0
- package/kit/.claude/skills/db-cassandra.md +89 -0
- package/kit/.claude/skills/db-drizzle.md +363 -0
- package/kit/.claude/skills/db-dynamodb.md +83 -0
- package/kit/.claude/skills/db-elasticsearch.md +105 -0
- package/kit/.claude/skills/db-firebase-firestore.md +191 -0
- package/kit/.claude/skills/db-mongodb.md +198 -0
- package/kit/.claude/skills/db-mysql.md +50 -0
- package/kit/.claude/skills/db-neon.md +72 -0
- package/kit/.claude/skills/db-planetscale.md +76 -0
- package/kit/.claude/skills/db-postgresql.md +50 -0
- package/kit/.claude/skills/db-prisma.md +414 -0
- package/kit/.claude/skills/db-redis.md +50 -0
- package/kit/.claude/skills/db-sqlite.md +149 -0
- package/kit/.claude/skills/db-supabase.md +445 -0
- package/kit/.claude/skills/devops-ci-cd.md +271 -0
- package/kit/.claude/skills/devops-database-backup.md +77 -0
- package/kit/.claude/skills/devops-docker.md +93 -0
- package/kit/.claude/skills/devops-github-actions.md +82 -0
- package/kit/.claude/skills/devops-health-checks.md +50 -0
- package/kit/.claude/skills/devops-kubernetes.md +109 -0
- package/kit/.claude/skills/devops-logging.md +163 -0
- package/kit/.claude/skills/devops-monitoring.md +203 -0
- package/kit/.claude/skills/devops-pulumi.md +94 -0
- package/kit/.claude/skills/devops-secrets.md +166 -0
- package/kit/.claude/skills/devops-terraform.md +226 -0
- package/kit/.claude/skills/error-boundaries.md +84 -0
- package/kit/.claude/skills/file-storage.md +50 -0
- package/kit/.claude/skills/frontend-angular.md +104 -0
- package/kit/.claude/skills/frontend-astro.md +94 -0
- package/kit/.claude/skills/frontend-bundle-analysis.md +147 -0
- package/kit/.claude/skills/frontend-forms.md +134 -0
- package/kit/.claude/skills/frontend-htmx.md +86 -0
- package/kit/.claude/skills/frontend-nextjs.md +188 -0
- package/kit/.claude/skills/frontend-pwa.md +105 -0
- package/kit/.claude/skills/frontend-react-hooks.md +238 -0
- package/kit/.claude/skills/frontend-react.md +129 -0
- package/kit/.claude/skills/frontend-remix-advanced.md +106 -0
- package/kit/.claude/skills/frontend-remix.md +101 -0
- package/kit/.claude/skills/frontend-solid.md +99 -0
- package/kit/.claude/skills/frontend-state-management.md +134 -0
- package/kit/.claude/skills/frontend-state.md +106 -0
- package/kit/.claude/skills/frontend-svelte.md +121 -0
- package/kit/.claude/skills/frontend-testing.md +100 -0
- package/kit/.claude/skills/frontend-vite.md +94 -0
- package/kit/.claude/skills/frontend-vue.md +133 -0
- package/kit/.claude/skills/frontend-webpack.md +93 -0
- package/kit/.claude/skills/functional-programming.md +50 -0
- package/kit/.claude/skills/hooks-custom.md +50 -0
- package/kit/.claude/skills/http-server.md +50 -0
- package/kit/.claude/skills/i18n-general.md +89 -0
- package/kit/.claude/skills/i18n-localization.md +191 -0
- package/kit/.claude/skills/i18n-nextjs.md +127 -0
- package/kit/.claude/skills/infrastructure-docker-compose.md +77 -0
- package/kit/.claude/skills/infrastructure-serverless.md +177 -0
- package/kit/.claude/skills/jwt-tokens.md +50 -0
- package/kit/.claude/skills/logging-winston.md +106 -0
- package/kit/.claude/skills/messaging-kafka.md +102 -0
- package/kit/.claude/skills/messaging-rabbitmq.md +50 -0
- package/kit/.claude/skills/mobile-capacitor.md +109 -0
- package/kit/.claude/skills/mobile-expo.md +101 -0
- package/kit/.claude/skills/mobile-flutter.md +259 -0
- package/kit/.claude/skills/mobile-react-native.md +238 -0
- package/kit/.claude/skills/monitoring-apm.md +50 -0
- package/kit/.claude/skills/monitoring-error-tracking.md +217 -0
- package/kit/.claude/skills/nodejs-streams.md +168 -0
- package/kit/.claude/skills/oauth-integration.md +50 -0
- package/kit/.claude/skills/patterns-dependency-injection.md +218 -0
- package/kit/.claude/skills/patterns-factory-singleton.md +209 -0
- package/kit/.claude/skills/patterns-observer-pubsub.md +210 -0
- package/kit/.claude/skills/payment-lemonsqueezy.md +101 -0
- package/kit/.claude/skills/payment-square.md +178 -0
- package/kit/.claude/skills/payment-stripe.md +206 -0
- package/kit/.claude/skills/perf-bundle.md +100 -0
- package/kit/.claude/skills/perf-web-vitals.md +102 -0
- package/kit/.claude/skills/performance-database-connection-pooling.md +67 -0
- package/kit/.claude/skills/performance-metrics.md +73 -0
- package/kit/.claude/skills/performance-optimization.md +208 -0
- package/kit/.claude/skills/performance-web-vitals.md +169 -0
- package/kit/.claude/skills/rate-limiting.md +77 -0
- package/kit/.claude/skills/reactive-programming.md +50 -0
- package/kit/.claude/skills/realtime-database.md +50 -0
- package/kit/.claude/skills/realtime-subscriptions.md +218 -0
- package/kit/.claude/skills/saas-ab-testing.md +90 -0
- package/kit/.claude/skills/saas-analytics.md +113 -0
- package/kit/.claude/skills/saas-billing.md +106 -0
- package/kit/.claude/skills/saas-email.md +88 -0
- package/kit/.claude/skills/saas-feature-flags.md +83 -0
- package/kit/.claude/skills/saas-onboarding.md +96 -0
- package/kit/.claude/skills/saas-user-onboarding.md +207 -0
- package/kit/.claude/skills/security-encryption.md +216 -0
- package/kit/.claude/skills/security-owasp.md +212 -0
- package/kit/.claude/skills/security-secrets-rotation.md +64 -0
- package/kit/.claude/skills/seo-content.md +94 -0
- package/kit/.claude/skills/seo-technical.md +101 -0
- package/kit/.claude/skills/serverless-framework.md +151 -0
- package/kit/.claude/skills/sharding-scaling.md +50 -0
- package/kit/.claude/skills/styling-css-modules.md +219 -0
- package/kit/.claude/skills/styling-styled-components.md +206 -0
- package/kit/.claude/skills/styling-tailwind.md +206 -0
- package/kit/.claude/skills/test-e2e.md +86 -0
- package/kit/.claude/skills/test-integration.md +216 -0
- package/kit/.claude/skills/test-performance.md +162 -0
- package/kit/.claude/skills/test-tdd.md +170 -0
- package/kit/.claude/skills/test-unit.md +301 -0
- package/kit/.claude/skills/testing-accessibility.md +117 -0
- package/kit/.claude/skills/testing-contract.md +75 -0
- package/kit/.claude/skills/testing-e2e-advanced.md +50 -0
- package/kit/.claude/skills/testing-load-stress.md +79 -0
- package/kit/.claude/skills/testing-mutation.md +92 -0
- package/kit/.claude/skills/testing-snapshot.md +50 -0
- package/kit/.claude/skills/testing-vitest.md +172 -0
- package/kit/.claude/skills/tooling-biome.md +91 -0
- package/kit/.claude/skills/tooling-build-tools.md +166 -0
- package/kit/.claude/skills/tooling-bun.md +94 -0
- package/kit/.claude/skills/tooling-eslint.md +103 -0
- package/kit/.claude/skills/tooling-git.md +79 -0
- package/kit/.claude/skills/tooling-monorepo.md +162 -0
- package/kit/.claude/skills/tooling-testing-frameworks.md +207 -0
- package/kit/.claude/skills/tooling-typescript.md +156 -0
- package/kit/.claude/skills/ui-a11y.md +106 -0
- package/kit/.claude/skills/ui-framer.md +106 -0
- package/kit/.claude/skills/ui-gsap.md +102 -0
- package/kit/.claude/skills/ui-radix.md +82 -0
- package/kit/.claude/skills/ui-shadcn.md +463 -0
- package/kit/.claude/skills/ui-tailwind.md +98 -0
- package/kit/.claude/skills/ui-threejs.md +110 -0
- package/kit/.claude/skills/ui-tokens.md +97 -0
- package/kit/.claude/skills/utilities-date-time.md +170 -0
- package/kit/.claude/skills/validation-schemas.md +110 -0
- package/kit/.claude/skills/version-control-git.md +144 -0
- package/kit/.claude/skills/web-accessibility-wcag.md +102 -0
- package/kit/.claude/skills/web-astro.md +197 -0
- package/kit/.claude/skills/web-html-css.md +224 -0
- package/kit/.claude/skills/web-htmx.md +99 -0
- package/kit/.claude/skills/web-nextjs-advanced.md +202 -0
- package/kit/.claude/skills/web-remix.md +194 -0
- package/kit/.claude/skills/web-seo.md +99 -0
- package/kit/.claude/skills/web-svelte.md +234 -0
- package/kit/.claude/skills/websocket-server.md +50 -0
- package/kit/.claude/skills/writing-marketing.md +89 -0
- package/kit/.claude/skills/writing-technical.md +119 -0
- package/kit/CLAUDE.md +206 -0
- package/kit/README.md +150 -0
- package/kit/SKILLS_INDEX.md +188 -0
- package/kit/docs/README.md +3 -0
- package/kit/journals/README.md +3 -0
- package/kit/plans/README.md +3 -0
- package/package.json +3 -1
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# Astro
|
|
2
|
+
|
|
3
|
+
Static site generator with partial hydration for fast, content-focused sites.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm create astro@latest my-site
|
|
9
|
+
cd my-site
|
|
10
|
+
npm install
|
|
11
|
+
npm run dev
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Basic Page
|
|
15
|
+
|
|
16
|
+
```astro
|
|
17
|
+
---
|
|
18
|
+
// src/pages/index.astro
|
|
19
|
+
import Layout from '../layouts/Layout.astro';
|
|
20
|
+
import Card from '../components/Card.astro';
|
|
21
|
+
|
|
22
|
+
const title = 'Welcome';
|
|
23
|
+
const posts = await getCollection('blog');
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
<Layout title={title}>
|
|
27
|
+
<main>
|
|
28
|
+
<h1>{title}</h1>
|
|
29
|
+
|
|
30
|
+
<div class="grid">
|
|
31
|
+
{posts.map(post => (
|
|
32
|
+
<Card title={post.data.title} href={post.slug}>
|
|
33
|
+
{post.data.description}
|
|
34
|
+
</Card>
|
|
35
|
+
))}
|
|
36
|
+
</div>
|
|
37
|
+
</main>
|
|
38
|
+
</Layout>
|
|
39
|
+
|
|
40
|
+
<style>
|
|
41
|
+
.grid {
|
|
42
|
+
display: grid;
|
|
43
|
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
44
|
+
gap: 2rem;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Dynamic Routes
|
|
50
|
+
|
|
51
|
+
```astro
|
|
52
|
+
---
|
|
53
|
+
// src/pages/blog/[...slug].astro
|
|
54
|
+
import { getCollection, getEntry } from 'astro:content';
|
|
55
|
+
|
|
56
|
+
export async function getStaticPaths() {
|
|
57
|
+
const posts = await getCollection('blog');
|
|
58
|
+
return posts.map(post => ({
|
|
59
|
+
params: { slug: post.slug },
|
|
60
|
+
props: { post }
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
interface Props {
|
|
65
|
+
post: any;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const { post } = Astro.props;
|
|
69
|
+
const { Content } = await post.render();
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
<Layout title={post.data.title}>
|
|
73
|
+
<article>
|
|
74
|
+
<h1>{post.data.title}</h1>
|
|
75
|
+
<time>{post.data.pubDate}</time>
|
|
76
|
+
<Content />
|
|
77
|
+
</article>
|
|
78
|
+
</Layout>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## React Components
|
|
82
|
+
|
|
83
|
+
```astro
|
|
84
|
+
---
|
|
85
|
+
// src/pages/interactive.astro
|
|
86
|
+
import Counter from '../components/Counter.jsx';
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
<html>
|
|
90
|
+
<body>
|
|
91
|
+
<!-- Hydrate on client load -->
|
|
92
|
+
<Counter client:load />
|
|
93
|
+
|
|
94
|
+
<!-- Hydrate on interaction -->
|
|
95
|
+
<Counter client:idle />
|
|
96
|
+
|
|
97
|
+
<!-- Hydrate when visible -->
|
|
98
|
+
<Counter client:visible />
|
|
99
|
+
</body>
|
|
100
|
+
</html>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
```jsx
|
|
104
|
+
// src/components/Counter.jsx
|
|
105
|
+
import { useState } from 'react';
|
|
106
|
+
|
|
107
|
+
export default function Counter() {
|
|
108
|
+
const [count, setCount] = useState(0);
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
<div>
|
|
112
|
+
<p>Count: {count}</p>
|
|
113
|
+
<button onClick={() => setCount(count + 1)}>
|
|
114
|
+
Increment
|
|
115
|
+
</button>
|
|
116
|
+
</div>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Content Collections
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
// src/content/config.ts
|
|
125
|
+
import { defineCollection, z } from 'astro:content';
|
|
126
|
+
|
|
127
|
+
const blog = defineCollection({
|
|
128
|
+
type: 'content',
|
|
129
|
+
schema: z.object({
|
|
130
|
+
title: z.string(),
|
|
131
|
+
description: z.string(),
|
|
132
|
+
pubDate: z.coerce.date(),
|
|
133
|
+
author: z.string()
|
|
134
|
+
})
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
export const collections = { blog };
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
```markdown
|
|
141
|
+
---
|
|
142
|
+
# src/content/blog/first-post.md
|
|
143
|
+
title: First Post
|
|
144
|
+
description: My first blog post
|
|
145
|
+
pubDate: 2024-01-01
|
|
146
|
+
author: John Doe
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
# Welcome!
|
|
150
|
+
|
|
151
|
+
This is my first post.
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## API Routes
|
|
155
|
+
|
|
156
|
+
```typescript
|
|
157
|
+
// src/pages/api/posts.json.ts
|
|
158
|
+
import { getCollection } from 'astro:content';
|
|
159
|
+
|
|
160
|
+
export async function GET() {
|
|
161
|
+
const posts = await getCollection('blog');
|
|
162
|
+
|
|
163
|
+
return new Response(JSON.stringify(posts.map(p => ({
|
|
164
|
+
title: p.data.title,
|
|
165
|
+
slug: p.slug
|
|
166
|
+
}))), {
|
|
167
|
+
headers: { 'Content-Type': 'application/json' }
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Integrations
|
|
173
|
+
|
|
174
|
+
```javascript
|
|
175
|
+
// astro.config.mjs
|
|
176
|
+
import { defineConfig } from 'astro/config';
|
|
177
|
+
import react from '@astrojs/react';
|
|
178
|
+
import tailwind from '@astrojs/tailwind';
|
|
179
|
+
|
|
180
|
+
export default defineConfig({
|
|
181
|
+
integrations: [react(), tailwind()],
|
|
182
|
+
output: 'hybrid' // Mix static and SSR
|
|
183
|
+
});
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Best Practices
|
|
187
|
+
|
|
188
|
+
✅ **Islands Architecture** - Minimal JavaScript
|
|
189
|
+
✅ **Content Collections** - Organized content
|
|
190
|
+
✅ **Partial hydration** - Load interactive components on demand
|
|
191
|
+
✅ **Static generation** - Generate at build time
|
|
192
|
+
✅ **Image optimization** - Automatic image optimization
|
|
193
|
+
|
|
194
|
+
## Resources
|
|
195
|
+
|
|
196
|
+
- [Astro Documentation](https://docs.astro.build/)
|
|
197
|
+
- [Integrations](https://astro.build/integrations/)
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
# HTML & CSS Fundamentals
|
|
2
|
+
|
|
3
|
+
Core web technologies for structure and styling.
|
|
4
|
+
|
|
5
|
+
## HTML5 Semantic Markup
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<!DOCTYPE html>
|
|
9
|
+
<html lang="en">
|
|
10
|
+
<head>
|
|
11
|
+
<meta charset="UTF-8">
|
|
12
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
13
|
+
<meta name="description" content="Page description">
|
|
14
|
+
<title>Page Title</title>
|
|
15
|
+
</head>
|
|
16
|
+
<body>
|
|
17
|
+
<header>
|
|
18
|
+
<nav>
|
|
19
|
+
<a href="/">Home</a>
|
|
20
|
+
<a href="/about">About</a>
|
|
21
|
+
</nav>
|
|
22
|
+
</header>
|
|
23
|
+
|
|
24
|
+
<main>
|
|
25
|
+
<article>
|
|
26
|
+
<h1>Article Title</h1>
|
|
27
|
+
<section>
|
|
28
|
+
<h2>Section Heading</h2>
|
|
29
|
+
<p>Content here...</p>
|
|
30
|
+
</section>
|
|
31
|
+
</article>
|
|
32
|
+
|
|
33
|
+
<aside>
|
|
34
|
+
<h3>Related</h3>
|
|
35
|
+
<ul>
|
|
36
|
+
<li>Item 1</li>
|
|
37
|
+
<li>Item 2</li>
|
|
38
|
+
</ul>
|
|
39
|
+
</aside>
|
|
40
|
+
</main>
|
|
41
|
+
|
|
42
|
+
<footer>
|
|
43
|
+
<p>© 2024 Company</p>
|
|
44
|
+
</footer>
|
|
45
|
+
</body>
|
|
46
|
+
</html>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## CSS Flexbox
|
|
50
|
+
|
|
51
|
+
```css
|
|
52
|
+
/* Flexible layout */
|
|
53
|
+
.container {
|
|
54
|
+
display: flex;
|
|
55
|
+
gap: 1rem;
|
|
56
|
+
justify-content: space-between;
|
|
57
|
+
align-items: center;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.item {
|
|
61
|
+
flex: 1; /* Grow equally */
|
|
62
|
+
flex-basis: 200px; /* Minimum size */
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Responsive */
|
|
66
|
+
@media (max-width: 768px) {
|
|
67
|
+
.container {
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## CSS Grid
|
|
74
|
+
|
|
75
|
+
```css
|
|
76
|
+
/* Grid layout */
|
|
77
|
+
.grid {
|
|
78
|
+
display: grid;
|
|
79
|
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
80
|
+
gap: 2rem;
|
|
81
|
+
grid-auto-rows: auto;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.grid-item {
|
|
85
|
+
grid-column: span 1;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* Named grid areas */
|
|
89
|
+
.layout {
|
|
90
|
+
display: grid;
|
|
91
|
+
grid-template-areas:
|
|
92
|
+
"header header header"
|
|
93
|
+
"sidebar main main"
|
|
94
|
+
"footer footer footer";
|
|
95
|
+
grid-template-columns: 200px 1fr 1fr;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
header { grid-area: header; }
|
|
99
|
+
aside { grid-area: sidebar; }
|
|
100
|
+
main { grid-area: main; }
|
|
101
|
+
footer { grid-area: footer; }
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Accessibility (a11y)
|
|
105
|
+
|
|
106
|
+
```html
|
|
107
|
+
<!-- Semantic HTML -->
|
|
108
|
+
<button>Click me</button> <!-- Not <div onClick="..."> -->
|
|
109
|
+
|
|
110
|
+
<!-- ARIA labels -->
|
|
111
|
+
<img src="logo.png" alt="Company Logo">
|
|
112
|
+
<button aria-label="Close menu">×</button>
|
|
113
|
+
|
|
114
|
+
<!-- Form labels -->
|
|
115
|
+
<label for="email">Email:</label>
|
|
116
|
+
<input id="email" type="email" required>
|
|
117
|
+
|
|
118
|
+
<!-- Skip navigation -->
|
|
119
|
+
<a href="#main" class="sr-only">Skip to main</a>
|
|
120
|
+
|
|
121
|
+
<!-- Color contrast -->
|
|
122
|
+
<style>
|
|
123
|
+
body { color: #333; background: #fff; } /* 21:1 ratio */
|
|
124
|
+
</style>
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Responsive Design
|
|
128
|
+
|
|
129
|
+
```css
|
|
130
|
+
/* Mobile-first approach */
|
|
131
|
+
.container {
|
|
132
|
+
width: 100%;
|
|
133
|
+
padding: 1rem;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@media (min-width: 640px) {
|
|
137
|
+
.container {
|
|
138
|
+
width: 90%;
|
|
139
|
+
margin: 0 auto;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@media (min-width: 1024px) {
|
|
144
|
+
.container {
|
|
145
|
+
width: 1000px;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* Responsive typography */
|
|
150
|
+
html {
|
|
151
|
+
font-size: clamp(16px, 2.5vw, 20px);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
h1 {
|
|
155
|
+
font-size: clamp(28px, 8vw, 48px);
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## CSS Custom Properties
|
|
160
|
+
|
|
161
|
+
```css
|
|
162
|
+
:root {
|
|
163
|
+
--primary-color: #3b82f6;
|
|
164
|
+
--secondary-color: #10b981;
|
|
165
|
+
--spacing-unit: 1rem;
|
|
166
|
+
--border-radius: 0.5rem;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
body {
|
|
170
|
+
color: var(--primary-color);
|
|
171
|
+
padding: calc(var(--spacing-unit) * 2);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
button {
|
|
175
|
+
border-radius: var(--border-radius);
|
|
176
|
+
background: var(--primary-color);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/* Dark mode */
|
|
180
|
+
@media (prefers-color-scheme: dark) {
|
|
181
|
+
:root {
|
|
182
|
+
--primary-color: #60a5fa;
|
|
183
|
+
--secondary-color: #34d399;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Performance
|
|
189
|
+
|
|
190
|
+
```css
|
|
191
|
+
/* Optimize animations */
|
|
192
|
+
.animated {
|
|
193
|
+
will-change: transform;
|
|
194
|
+
transform: translateZ(0); /* GPU acceleration */
|
|
195
|
+
animation: slide 0.3s ease-out;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/* Avoid expensive operations */
|
|
199
|
+
/* Bad: Many reflows */
|
|
200
|
+
/* Good: Batch updates */
|
|
201
|
+
.parent {
|
|
202
|
+
contain: layout style paint;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/* Critical CSS inline */
|
|
206
|
+
<style>
|
|
207
|
+
/* Above-fold critical styles */
|
|
208
|
+
</style>
|
|
209
|
+
<link rel="stylesheet" href="main.css">
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Best Practices
|
|
213
|
+
|
|
214
|
+
✅ **Semantic HTML** - Use meaningful tags
|
|
215
|
+
✅ **Mobile-first** - Design for small screens first
|
|
216
|
+
✅ **Accessibility** - WCAG standards
|
|
217
|
+
✅ **Responsive** - Works on all screen sizes
|
|
218
|
+
✅ **Performance** - Minimal CSS, avoid layout thrashing
|
|
219
|
+
|
|
220
|
+
## Resources
|
|
221
|
+
|
|
222
|
+
- [MDN Web Docs](https://developer.mozilla.org/)
|
|
223
|
+
- [CSS Tricks](https://css-tricks.com/)
|
|
224
|
+
- [Web.dev](https://web.dev/)
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# HTMX
|
|
2
|
+
|
|
3
|
+
Modern interactions with HTML attributes.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<script src="https://unpkg.com/htmx.org"></script>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Basic Usage
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<!-- Load content on click -->
|
|
15
|
+
<button hx-get="/api/users" hx-target="#users">
|
|
16
|
+
Load Users
|
|
17
|
+
</button>
|
|
18
|
+
<div id="users"></div>
|
|
19
|
+
|
|
20
|
+
<!-- Form submission -->
|
|
21
|
+
<form hx-post="/api/users" hx-target="#result">
|
|
22
|
+
<input name="email" type="email" required>
|
|
23
|
+
<button type="submit">Add User</button>
|
|
24
|
+
</form>
|
|
25
|
+
<div id="result"></div>
|
|
26
|
+
|
|
27
|
+
<!-- Polling -->
|
|
28
|
+
<div hx-get="/api/status" hx-trigger="every 2s">
|
|
29
|
+
Status will update every 2 seconds
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<!-- Swapping strategies -->
|
|
33
|
+
<div hx-get="/content" hx-swap="innerHTML swap:1s">
|
|
34
|
+
Replace content with 1s animation
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div hx-get="/append" hx-swap="beforeend">
|
|
38
|
+
Append to existing content
|
|
39
|
+
</div>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Server Response
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
app.get('/api/users', (req, res) => {
|
|
46
|
+
const html = `
|
|
47
|
+
<div class="user-list">
|
|
48
|
+
<div class="user">John Doe</div>
|
|
49
|
+
<div class="user">Jane Smith</div>
|
|
50
|
+
</div>
|
|
51
|
+
`;
|
|
52
|
+
res.send(html);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
app.post('/api/users', (req, res) => {
|
|
56
|
+
// Process form data
|
|
57
|
+
const html = '<div class="success">User added!</div>';
|
|
58
|
+
res.send(html);
|
|
59
|
+
});
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Advanced Features
|
|
63
|
+
|
|
64
|
+
```html
|
|
65
|
+
<!-- Validation feedback -->
|
|
66
|
+
<form hx-post="/validate" hx-trigger="change">
|
|
67
|
+
<input name="username" hx-validate="/api/check-username">
|
|
68
|
+
<span id="error"></span>
|
|
69
|
+
</form>
|
|
70
|
+
|
|
71
|
+
<!-- Progress indicator -->
|
|
72
|
+
<form hx-post="/upload" hx-indicator="#spinner">
|
|
73
|
+
<input type="file" name="file">
|
|
74
|
+
<div id="spinner" class="htmx-indicator">Uploading...</div>
|
|
75
|
+
</form>
|
|
76
|
+
|
|
77
|
+
<!-- History -->
|
|
78
|
+
<button hx-push-url="true" hx-get="/page/1">
|
|
79
|
+
Page 1
|
|
80
|
+
</button>
|
|
81
|
+
|
|
82
|
+
<!-- Request headers -->
|
|
83
|
+
<button hx-get="/data" hx-headers='{"X-Custom": "value"}'>
|
|
84
|
+
Get Data
|
|
85
|
+
</button>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Best Practices
|
|
89
|
+
|
|
90
|
+
✅ **Progressive enhancement** - Works without JS
|
|
91
|
+
✅ **Server-side rendering** - Minimal client-side state
|
|
92
|
+
✅ **Accessibility** - Semantic HTML
|
|
93
|
+
✅ **Performance** - Lightweight library (14kb)
|
|
94
|
+
✅ **Simplicity** - HTML-driven interactions
|
|
95
|
+
|
|
96
|
+
## Resources
|
|
97
|
+
|
|
98
|
+
- [HTMX Documentation](https://htmx.org/)
|
|
99
|
+
- [Examples](https://htmx.org/examples/)
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# Next.js Advanced
|
|
2
|
+
|
|
3
|
+
Advanced patterns and optimizations for Next.js applications.
|
|
4
|
+
|
|
5
|
+
## Server Components
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
// app/users/page.tsx
|
|
9
|
+
import { Suspense } from 'react';
|
|
10
|
+
|
|
11
|
+
async function UsersList() {
|
|
12
|
+
const users = await fetch('https://api.example.com/users', {
|
|
13
|
+
next: { revalidate: 3600 } // Cache for 1 hour
|
|
14
|
+
}).then(r => r.json());
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<div>
|
|
18
|
+
{users.map(user => (
|
|
19
|
+
<div key={user.id}>{user.name}</div>
|
|
20
|
+
))}
|
|
21
|
+
</div>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default function UsersPage() {
|
|
26
|
+
return (
|
|
27
|
+
<Suspense fallback={<div>Loading users...</div>}>
|
|
28
|
+
<UsersList />
|
|
29
|
+
</Suspense>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Middleware
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
// middleware.ts
|
|
38
|
+
import { NextRequest, NextResponse } from 'next/server';
|
|
39
|
+
|
|
40
|
+
export function middleware(request: NextRequest) {
|
|
41
|
+
const token = request.cookies.get('session');
|
|
42
|
+
|
|
43
|
+
if (!token && request.nextUrl.pathname.startsWith('/dashboard')) {
|
|
44
|
+
return NextResponse.redirect(new URL('/login', request.url));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Add header
|
|
48
|
+
const response = NextResponse.next();
|
|
49
|
+
response.headers.set('x-request-id', crypto.randomUUID());
|
|
50
|
+
return response;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const config = {
|
|
54
|
+
matcher: ['/dashboard/:path*', '/api/:path*']
|
|
55
|
+
};
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Route Handlers
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
// app/api/users/route.ts
|
|
62
|
+
import { NextRequest, NextResponse } from 'next/server';
|
|
63
|
+
|
|
64
|
+
export async function GET(request: NextRequest) {
|
|
65
|
+
const searchParams = request.nextUrl.searchParams;
|
|
66
|
+
const id = searchParams.get('id');
|
|
67
|
+
|
|
68
|
+
const user = await db.users.findById(id);
|
|
69
|
+
|
|
70
|
+
return NextResponse.json(user);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export async function POST(request: NextRequest) {
|
|
74
|
+
const body = await request.json();
|
|
75
|
+
|
|
76
|
+
const user = await db.users.create(body);
|
|
77
|
+
|
|
78
|
+
return NextResponse.json(user, { status: 201 });
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Incremental Static Regeneration (ISR)
|
|
83
|
+
|
|
84
|
+
```typescript
|
|
85
|
+
// app/blog/[slug]/page.tsx
|
|
86
|
+
export async function generateStaticParams() {
|
|
87
|
+
const posts = await getAllPosts();
|
|
88
|
+
|
|
89
|
+
return posts.map(post => ({
|
|
90
|
+
slug: post.slug
|
|
91
|
+
}));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export async function generateMetadata({ params }: any) {
|
|
95
|
+
const post = await getPost(params.slug);
|
|
96
|
+
|
|
97
|
+
return {
|
|
98
|
+
title: post.title,
|
|
99
|
+
description: post.excerpt
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export default async function PostPage({ params }: any) {
|
|
104
|
+
const post = await getPost(params.slug);
|
|
105
|
+
|
|
106
|
+
return <article>{post.content}</article>;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export const revalidate = 3600; // Revalidate every hour
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Streaming
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
// app/dashboard/page.tsx
|
|
116
|
+
import { Suspense } from 'react';
|
|
117
|
+
|
|
118
|
+
async function Analytics() {
|
|
119
|
+
const data = await fetch('https://api.example.com/analytics', {
|
|
120
|
+
next: { revalidate: 60 }
|
|
121
|
+
}).then(r => r.json());
|
|
122
|
+
|
|
123
|
+
return <div>{data.stats}</div>;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export default function Dashboard() {
|
|
127
|
+
return (
|
|
128
|
+
<div>
|
|
129
|
+
<h1>Dashboard</h1>
|
|
130
|
+
<Suspense fallback={<div>Loading analytics...</div>}>
|
|
131
|
+
<Analytics />
|
|
132
|
+
</Suspense>
|
|
133
|
+
</div>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Image Optimization
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
import Image from 'next/image';
|
|
142
|
+
|
|
143
|
+
export function ProfilePicture() {
|
|
144
|
+
return (
|
|
145
|
+
<Image
|
|
146
|
+
src="/profile.jpg"
|
|
147
|
+
alt="Profile"
|
|
148
|
+
width={400}
|
|
149
|
+
height={400}
|
|
150
|
+
quality={80}
|
|
151
|
+
placeholder="blur"
|
|
152
|
+
blurDataURL="data:image/png;base64,..."
|
|
153
|
+
priority
|
|
154
|
+
/>
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Error Handling
|
|
160
|
+
|
|
161
|
+
```typescript
|
|
162
|
+
// app/error.tsx
|
|
163
|
+
'use client';
|
|
164
|
+
|
|
165
|
+
export default function Error({
|
|
166
|
+
error,
|
|
167
|
+
reset,
|
|
168
|
+
}: {
|
|
169
|
+
error: Error & { digest?: string };
|
|
170
|
+
reset: () => void;
|
|
171
|
+
}) {
|
|
172
|
+
return (
|
|
173
|
+
<div>
|
|
174
|
+
<h2>Something went wrong!</h2>
|
|
175
|
+
<button onClick={() => reset()}>Try again</button>
|
|
176
|
+
</div>
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// app/not-found.tsx
|
|
181
|
+
export default function NotFound() {
|
|
182
|
+
return (
|
|
183
|
+
<div>
|
|
184
|
+
<h2>Not Found</h2>
|
|
185
|
+
<p>Could not find requested resource</p>
|
|
186
|
+
</div>
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Best Practices
|
|
192
|
+
|
|
193
|
+
✅ **Server components by default** - Move data fetching to server
|
|
194
|
+
✅ **Streaming** - Progressive rendering for better UX
|
|
195
|
+
✅ **ISR** - Cache static content, regenerate periodically
|
|
196
|
+
✅ **Image optimization** - Use next/image
|
|
197
|
+
✅ **Error boundaries** - Handle errors gracefully
|
|
198
|
+
|
|
199
|
+
## Resources
|
|
200
|
+
|
|
201
|
+
- [Next.js Documentation](https://nextjs.org/docs)
|
|
202
|
+
- [App Router Guide](https://nextjs.org/docs/app)
|