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,445 @@
|
|
|
1
|
+
# Supabase
|
|
2
|
+
|
|
3
|
+
Open-source Firebase alternative with PostgreSQL backend and real-time capabilities.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @supabase/supabase-js
|
|
9
|
+
|
|
10
|
+
# Environment variables
|
|
11
|
+
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
|
|
12
|
+
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Initialize Client
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { createClient } from '@supabase/supabase-js';
|
|
19
|
+
|
|
20
|
+
const supabase = createClient(
|
|
21
|
+
process.env.NEXT_PUBLIC_SUPABASE_URL,
|
|
22
|
+
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
export default supabase;
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Authentication
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
// Email/Password signup
|
|
32
|
+
const { data, error } = await supabase.auth.signUp({
|
|
33
|
+
email: 'user@example.com',
|
|
34
|
+
password: 'password123'
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
// Login
|
|
38
|
+
const { data, error } = await supabase.auth.signInWithPassword({
|
|
39
|
+
email: 'user@example.com',
|
|
40
|
+
password: 'password123'
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// OAuth (Google)
|
|
44
|
+
const { data, error } = await supabase.auth.signInWithOAuth({
|
|
45
|
+
provider: 'google',
|
|
46
|
+
options: { redirectTo: 'http://localhost:3000/auth/callback' }
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// Get current session
|
|
50
|
+
const { data: { session } } = await supabase.auth.getSession();
|
|
51
|
+
|
|
52
|
+
// Sign out
|
|
53
|
+
await supabase.auth.signOut();
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Database Operations (Full PostgreSQL)
|
|
57
|
+
|
|
58
|
+
```typescript
|
|
59
|
+
// Create (Insert)
|
|
60
|
+
const { data, error } = await supabase
|
|
61
|
+
.from('users')
|
|
62
|
+
.insert([{ email: 'john@example.com', name: 'John' }])
|
|
63
|
+
.select();
|
|
64
|
+
|
|
65
|
+
// Read
|
|
66
|
+
const { data, error } = await supabase
|
|
67
|
+
.from('users')
|
|
68
|
+
.select('*')
|
|
69
|
+
.eq('id', 1);
|
|
70
|
+
|
|
71
|
+
// Read multiple
|
|
72
|
+
const { data, error } = await supabase
|
|
73
|
+
.from('posts')
|
|
74
|
+
.select('*, author:users(name)')
|
|
75
|
+
.eq('published', true)
|
|
76
|
+
.order('created_at', { ascending: false });
|
|
77
|
+
|
|
78
|
+
// Update
|
|
79
|
+
const { data, error } = await supabase
|
|
80
|
+
.from('users')
|
|
81
|
+
.update({ name: 'Jane' })
|
|
82
|
+
.eq('id', 1)
|
|
83
|
+
.select();
|
|
84
|
+
|
|
85
|
+
// Delete
|
|
86
|
+
const { data, error } = await supabase
|
|
87
|
+
.from('users')
|
|
88
|
+
.delete()
|
|
89
|
+
.eq('id', 1);
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Filtering & Pagination
|
|
93
|
+
|
|
94
|
+
```typescript
|
|
95
|
+
// Complex filters
|
|
96
|
+
const { data } = await supabase
|
|
97
|
+
.from('posts')
|
|
98
|
+
.select('*')
|
|
99
|
+
.gte('created_at', '2024-01-01')
|
|
100
|
+
.lte('views', 1000)
|
|
101
|
+
.in('status', ['published', 'scheduled']);
|
|
102
|
+
|
|
103
|
+
// Pagination
|
|
104
|
+
const pageSize = 10;
|
|
105
|
+
const page = 1;
|
|
106
|
+
|
|
107
|
+
const { data, count } = await supabase
|
|
108
|
+
.from('posts')
|
|
109
|
+
.select('*', { count: 'exact' })
|
|
110
|
+
.range((page - 1) * pageSize, page * pageSize - 1);
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Real-time Subscriptions
|
|
114
|
+
|
|
115
|
+
```typescript
|
|
116
|
+
// Subscribe to changes
|
|
117
|
+
const subscription = supabase
|
|
118
|
+
.from('posts')
|
|
119
|
+
.on('*', (payload) => {
|
|
120
|
+
console.log('Change received!', payload);
|
|
121
|
+
})
|
|
122
|
+
.subscribe();
|
|
123
|
+
|
|
124
|
+
// Listen for INSERT only
|
|
125
|
+
supabase
|
|
126
|
+
.from('comments')
|
|
127
|
+
.on('INSERT', (payload) => {
|
|
128
|
+
console.log('New comment:', payload.new);
|
|
129
|
+
})
|
|
130
|
+
.subscribe();
|
|
131
|
+
|
|
132
|
+
// Unsubscribe
|
|
133
|
+
subscription.unsubscribe();
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Storage (File Upload)
|
|
137
|
+
|
|
138
|
+
```typescript
|
|
139
|
+
// Upload file
|
|
140
|
+
const { data, error } = await supabase.storage
|
|
141
|
+
.from('avatars')
|
|
142
|
+
.upload('user-1/avatar.jpg', file);
|
|
143
|
+
|
|
144
|
+
// Get public URL
|
|
145
|
+
const { data } = supabase.storage
|
|
146
|
+
.from('avatars')
|
|
147
|
+
.getPublicUrl('user-1/avatar.jpg');
|
|
148
|
+
|
|
149
|
+
const publicUrl = data.publicUrl;
|
|
150
|
+
|
|
151
|
+
// Download file
|
|
152
|
+
const { data, error } = await supabase.storage
|
|
153
|
+
.from('documents')
|
|
154
|
+
.download('file.pdf');
|
|
155
|
+
|
|
156
|
+
// Delete file
|
|
157
|
+
await supabase.storage.from('avatars').remove(['user-1/avatar.jpg']);
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Edge Functions (Serverless)
|
|
161
|
+
|
|
162
|
+
```typescript
|
|
163
|
+
// Create function: supabase/functions/hello/index.ts
|
|
164
|
+
import { serve } from 'https://deno.land/std@0.168.0/http/server.ts';
|
|
165
|
+
|
|
166
|
+
serve(async (req) => {
|
|
167
|
+
if (req.method === 'POST') {
|
|
168
|
+
const { name } = await req.json();
|
|
169
|
+
return new Response(JSON.stringify({ message: `Hello, ${name}!` }));
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
// Call from client
|
|
174
|
+
const { data, error } = await supabase.functions.invoke('hello', {
|
|
175
|
+
body: { name: 'John' }
|
|
176
|
+
});
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## React Integration
|
|
180
|
+
|
|
181
|
+
```typescript
|
|
182
|
+
'use client';
|
|
183
|
+
|
|
184
|
+
import { useEffect, useState } from 'react';
|
|
185
|
+
import { useUser } from '@supabase/auth-helpers-react';
|
|
186
|
+
import supabase from '@/lib/supabase';
|
|
187
|
+
|
|
188
|
+
export default function UserPosts() {
|
|
189
|
+
const { user } = useUser();
|
|
190
|
+
const [posts, setPosts] = useState([]);
|
|
191
|
+
|
|
192
|
+
useEffect(() => {
|
|
193
|
+
if (!user) return;
|
|
194
|
+
|
|
195
|
+
// Fetch user posts
|
|
196
|
+
const fetchPosts = async () => {
|
|
197
|
+
const { data } = await supabase
|
|
198
|
+
.from('posts')
|
|
199
|
+
.select('*')
|
|
200
|
+
.eq('user_id', user.id)
|
|
201
|
+
.order('created_at', { ascending: false });
|
|
202
|
+
setPosts(data || []);
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
fetchPosts();
|
|
206
|
+
|
|
207
|
+
// Subscribe to real-time updates
|
|
208
|
+
const subscription = supabase
|
|
209
|
+
.from('posts')
|
|
210
|
+
.on('*', (payload) => {
|
|
211
|
+
if (payload.new.user_id === user.id) {
|
|
212
|
+
setPosts((prev) => [payload.new, ...prev]);
|
|
213
|
+
}
|
|
214
|
+
})
|
|
215
|
+
.subscribe();
|
|
216
|
+
|
|
217
|
+
return () => subscription.unsubscribe();
|
|
218
|
+
}, [user]);
|
|
219
|
+
|
|
220
|
+
return (
|
|
221
|
+
<div>
|
|
222
|
+
{posts.map((post) => (
|
|
223
|
+
<div key={post.id}>{post.title}</div>
|
|
224
|
+
))}
|
|
225
|
+
</div>
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## Best Practices
|
|
231
|
+
|
|
232
|
+
✅ **Use Row Level Security** - Secure data at database level
|
|
233
|
+
✅ **Store secrets safely** - Never commit API keys
|
|
234
|
+
✅ **Index frequently queried columns** - Improve query performance
|
|
235
|
+
✅ **Use connection pooling** - For production applications
|
|
236
|
+
✅ **Enable PostgIS** - For geospatial queries
|
|
237
|
+
✅ **Set up backups** - Daily automated backups
|
|
238
|
+
|
|
239
|
+
## When to Use Supabase
|
|
240
|
+
|
|
241
|
+
✅ Need Firebase alternative with PostgreSQL
|
|
242
|
+
✅ Want real-time updates built-in
|
|
243
|
+
✅ Require full SQL power
|
|
244
|
+
✅ Need serverless functions
|
|
245
|
+
✅ Want open-source option
|
|
246
|
+
|
|
247
|
+
❌ Need complex relational queries (though Supabase handles these)
|
|
248
|
+
❌ Don't want to manage PostgreSQL
|
|
249
|
+
|
|
250
|
+
## Resources
|
|
251
|
+
|
|
252
|
+
- [Supabase Docs](https://supabase.com/docs)
|
|
253
|
+
- [SQL Reference](https://supabase.com/docs/guides/sql-commands)
|
|
254
|
+
- [API Reference](https://supabase.com/docs/reference/javascript/introduction)
|
|
255
|
+
|
|
256
|
+
## Core Patterns & Implementations
|
|
257
|
+
|
|
258
|
+
### Key Concepts
|
|
259
|
+
- Industry standards and best practices
|
|
260
|
+
- Proven architectural patterns
|
|
261
|
+
- Performance optimization techniques
|
|
262
|
+
- Security-first development approach
|
|
263
|
+
- Testing and quality assurance
|
|
264
|
+
|
|
265
|
+
### Common Use Cases
|
|
266
|
+
- Building production applications
|
|
267
|
+
- Solving complex technical problems
|
|
268
|
+
- Optimizing performance and scalability
|
|
269
|
+
- Implementing security best practices
|
|
270
|
+
- Team collaboration and knowledge transfer
|
|
271
|
+
|
|
272
|
+
## Implementation Guide
|
|
273
|
+
|
|
274
|
+
### Setup & Configuration
|
|
275
|
+
- Framework/tool initialization
|
|
276
|
+
- Environment setup
|
|
277
|
+
- Configuration best practices
|
|
278
|
+
- Development vs production settings
|
|
279
|
+
|
|
280
|
+
### Code Examples
|
|
281
|
+
- Real-world patterns and solutions
|
|
282
|
+
- Integration with other tools
|
|
283
|
+
- Error handling approaches
|
|
284
|
+
- Performance optimization
|
|
285
|
+
|
|
286
|
+
### Architecture Patterns
|
|
287
|
+
- Proven design patterns
|
|
288
|
+
- Component organization
|
|
289
|
+
- Data flow and state management
|
|
290
|
+
- Scalability considerations
|
|
291
|
+
|
|
292
|
+
## Best Practices
|
|
293
|
+
|
|
294
|
+
1. **Code Quality** — Follow conventions, write clean code
|
|
295
|
+
2. **Performance** — Profile and optimize bottlenecks
|
|
296
|
+
3. **Security** — Implement security-first practices
|
|
297
|
+
4. **Testing** — Comprehensive test coverage
|
|
298
|
+
5. **Documentation** — Clear, maintainable documentation
|
|
299
|
+
6. **Monitoring** — Track health and metrics
|
|
300
|
+
7. **Scalability** — Design for growth
|
|
301
|
+
|
|
302
|
+
## Testing Strategies
|
|
303
|
+
|
|
304
|
+
- Unit testing fundamentals
|
|
305
|
+
- Integration testing approaches
|
|
306
|
+
- End-to-end testing patterns
|
|
307
|
+
- Performance testing methods
|
|
308
|
+
- Security testing checklist
|
|
309
|
+
|
|
310
|
+
## Performance Considerations
|
|
311
|
+
|
|
312
|
+
- Optimization techniques
|
|
313
|
+
- Caching strategies
|
|
314
|
+
- Database optimization
|
|
315
|
+
- API performance
|
|
316
|
+
- Front-end performance
|
|
317
|
+
- Monitoring and profiling
|
|
318
|
+
|
|
319
|
+
## Security Checklist
|
|
320
|
+
|
|
321
|
+
- Input validation and sanitization
|
|
322
|
+
- Authentication and authorization
|
|
323
|
+
- Data encryption
|
|
324
|
+
- Secure dependencies
|
|
325
|
+
- Common vulnerability patterns
|
|
326
|
+
- Security headers and configuration
|
|
327
|
+
|
|
328
|
+
## Deployment & Operations
|
|
329
|
+
|
|
330
|
+
- Preparation for production
|
|
331
|
+
- Deployment strategies
|
|
332
|
+
- Rollback procedures
|
|
333
|
+
- Monitoring and alerting
|
|
334
|
+
- Logging and debugging
|
|
335
|
+
- Incident response
|
|
336
|
+
|
|
337
|
+
## Integration Points
|
|
338
|
+
|
|
339
|
+
Works seamlessly with:
|
|
340
|
+
- Related technologies and frameworks
|
|
341
|
+
- Development and deployment tools
|
|
342
|
+
- Monitoring and observability
|
|
343
|
+
- Security and compliance tools
|
|
344
|
+
|
|
345
|
+
## Tools & Technologies
|
|
346
|
+
|
|
347
|
+
- Popular frameworks and libraries
|
|
348
|
+
- Development utilities
|
|
349
|
+
- Testing frameworks
|
|
350
|
+
- Deployment platforms
|
|
351
|
+
- Monitoring solutions
|
|
352
|
+
|
|
353
|
+
## Common Pitfalls to Avoid
|
|
354
|
+
|
|
355
|
+
- Premature optimization
|
|
356
|
+
- Ignoring security requirements
|
|
357
|
+
- Insufficient testing
|
|
358
|
+
- Poor error handling
|
|
359
|
+
- Technical debt accumulation
|
|
360
|
+
- Monolithic approaches
|
|
361
|
+
- Lack of monitoring
|
|
362
|
+
|
|
363
|
+
## Learning Path
|
|
364
|
+
|
|
365
|
+
1. Understand core concepts
|
|
366
|
+
2. Study best practices
|
|
367
|
+
3. Review real-world examples
|
|
368
|
+
4. Build sample projects
|
|
369
|
+
5. Apply in production
|
|
370
|
+
6. Mentor others
|
|
371
|
+
7. Stay current
|
|
372
|
+
|
|
373
|
+
## Advanced Topics
|
|
374
|
+
|
|
375
|
+
- Optimization strategies
|
|
376
|
+
- Distributed systems
|
|
377
|
+
- High-availability patterns
|
|
378
|
+
- Advanced security
|
|
379
|
+
- Performance at scale
|
|
380
|
+
- Cloud-native patterns
|
|
381
|
+
|
|
382
|
+
## Resources
|
|
383
|
+
|
|
384
|
+
- Official documentation
|
|
385
|
+
- Community guides and tutorials
|
|
386
|
+
- Best practices and patterns
|
|
387
|
+
- Example implementations
|
|
388
|
+
- Performance optimization guides
|
|
389
|
+
- Security hardening resources
|
|
390
|
+
- Case studies and real-world examples
|
|
391
|
+
|
|
392
|
+
## Success Criteria
|
|
393
|
+
|
|
394
|
+
✅ Implementation follows best practices
|
|
395
|
+
✅ Code is clean and maintainable
|
|
396
|
+
✅ Performance is optimized
|
|
397
|
+
✅ Security requirements met
|
|
398
|
+
✅ Tests provide good coverage
|
|
399
|
+
✅ Documentation is complete
|
|
400
|
+
✅ Monitoring and alerting configured
|
|
401
|
+
✅ Deployment is smooth and safe
|
|
402
|
+
|
|
403
|
+
## When to Use This Skill
|
|
404
|
+
|
|
405
|
+
Apply this skill when:
|
|
406
|
+
- Building production applications
|
|
407
|
+
- Solving complex problems
|
|
408
|
+
- Optimizing performance
|
|
409
|
+
- Implementing security
|
|
410
|
+
- Making architectural decisions
|
|
411
|
+
- Training team members
|
|
412
|
+
- Reviewing code quality
|
|
413
|
+
|
|
414
|
+
## Integration with Other Skills
|
|
415
|
+
|
|
416
|
+
This skill complements:
|
|
417
|
+
- Related framework/tool skills
|
|
418
|
+
- Architecture pattern skills
|
|
419
|
+
- Testing and quality skills
|
|
420
|
+
- DevOps and deployment skills
|
|
421
|
+
- Security and compliance skills
|
|
422
|
+
|
|
423
|
+
## Version Notes
|
|
424
|
+
|
|
425
|
+
- Latest stable releases
|
|
426
|
+
- Feature deprecations
|
|
427
|
+
- Migration guides
|
|
428
|
+
- Breaking changes
|
|
429
|
+
- Upgrade paths
|
|
430
|
+
|
|
431
|
+
## Community & Support
|
|
432
|
+
|
|
433
|
+
- Official forums and discussions
|
|
434
|
+
- Community Slack/Discord channels
|
|
435
|
+
- Stack Overflow resources
|
|
436
|
+
- GitHub discussions
|
|
437
|
+
- Blog posts and articles
|
|
438
|
+
|
|
439
|
+
## Roadmap & Future
|
|
440
|
+
|
|
441
|
+
- Upcoming features
|
|
442
|
+
- Planned improvements
|
|
443
|
+
- Community contributions
|
|
444
|
+
- Performance roadmap
|
|
445
|
+
- Security improvements
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
# CI/CD Pipelines
|
|
2
|
+
|
|
3
|
+
Automated testing, building, and deployment.
|
|
4
|
+
|
|
5
|
+
## GitHub Actions
|
|
6
|
+
|
|
7
|
+
```yaml
|
|
8
|
+
# .github/workflows/ci.yml
|
|
9
|
+
name: CI
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
push:
|
|
13
|
+
branches: [main, develop]
|
|
14
|
+
pull_request:
|
|
15
|
+
branches: [main]
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
test:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
|
|
21
|
+
strategy:
|
|
22
|
+
matrix:
|
|
23
|
+
node-version: [18.x, 20.x]
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v3
|
|
27
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
28
|
+
uses: actions/setup-node@v3
|
|
29
|
+
with:
|
|
30
|
+
node-version: ${{ matrix.node-version }}
|
|
31
|
+
cache: 'npm'
|
|
32
|
+
|
|
33
|
+
- run: npm ci
|
|
34
|
+
- run: npm run lint
|
|
35
|
+
- run: npm run test
|
|
36
|
+
- run: npm run build
|
|
37
|
+
|
|
38
|
+
- name: Upload coverage
|
|
39
|
+
uses: codecov/codecov-action@v3
|
|
40
|
+
with:
|
|
41
|
+
files: ./coverage/lcov.info
|
|
42
|
+
|
|
43
|
+
deploy:
|
|
44
|
+
needs: test
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
if: github.ref == 'refs/heads/main'
|
|
47
|
+
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v3
|
|
50
|
+
- name: Deploy to Vercel
|
|
51
|
+
uses: vercel/action@master
|
|
52
|
+
with:
|
|
53
|
+
vercel-token: ${{ secrets.VERCEL_TOKEN }}
|
|
54
|
+
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
|
|
55
|
+
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## GitLab CI/CD
|
|
59
|
+
|
|
60
|
+
```yaml
|
|
61
|
+
# .gitlab-ci.yml
|
|
62
|
+
image: node:20
|
|
63
|
+
|
|
64
|
+
stages:
|
|
65
|
+
- test
|
|
66
|
+
- build
|
|
67
|
+
- deploy
|
|
68
|
+
|
|
69
|
+
variables:
|
|
70
|
+
NPM_TOKEN: $NPM_TOKEN
|
|
71
|
+
|
|
72
|
+
test:
|
|
73
|
+
stage: test
|
|
74
|
+
script:
|
|
75
|
+
- npm ci
|
|
76
|
+
- npm run lint
|
|
77
|
+
- npm run test:unit
|
|
78
|
+
- npm run test:e2e
|
|
79
|
+
coverage: '/coverage: (\d+\.\d+)%/'
|
|
80
|
+
artifacts:
|
|
81
|
+
reports:
|
|
82
|
+
coverage_report:
|
|
83
|
+
coverage_format: cobertura
|
|
84
|
+
path: coverage/cobertura-coverage.xml
|
|
85
|
+
|
|
86
|
+
build:
|
|
87
|
+
stage: build
|
|
88
|
+
script:
|
|
89
|
+
- npm ci
|
|
90
|
+
- npm run build
|
|
91
|
+
artifacts:
|
|
92
|
+
paths:
|
|
93
|
+
- dist/
|
|
94
|
+
expire_in: 1 day
|
|
95
|
+
|
|
96
|
+
deploy:production:
|
|
97
|
+
stage: deploy
|
|
98
|
+
script:
|
|
99
|
+
- npm ci
|
|
100
|
+
- npm run build
|
|
101
|
+
- npm run deploy
|
|
102
|
+
environment:
|
|
103
|
+
name: production
|
|
104
|
+
url: https://example.com
|
|
105
|
+
only:
|
|
106
|
+
- main
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Jenkins Pipeline
|
|
110
|
+
|
|
111
|
+
```groovy
|
|
112
|
+
pipeline {
|
|
113
|
+
agent any
|
|
114
|
+
|
|
115
|
+
stages {
|
|
116
|
+
stage('Checkout') {
|
|
117
|
+
steps {
|
|
118
|
+
git 'https://github.com/user/repo.git'
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
stage('Install') {
|
|
123
|
+
steps {
|
|
124
|
+
sh 'npm ci'
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
stage('Test') {
|
|
129
|
+
steps {
|
|
130
|
+
sh 'npm run test'
|
|
131
|
+
junit 'test-results.xml'
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
stage('Build') {
|
|
136
|
+
steps {
|
|
137
|
+
sh 'npm run build'
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
stage('Deploy') {
|
|
142
|
+
when {
|
|
143
|
+
branch 'main'
|
|
144
|
+
}
|
|
145
|
+
steps {
|
|
146
|
+
sh './scripts/deploy.sh'
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
post {
|
|
152
|
+
always {
|
|
153
|
+
archiveArtifacts artifacts: 'dist/**', allowEmptyArchive: true
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Environment-Specific Configuration
|
|
160
|
+
|
|
161
|
+
```typescript
|
|
162
|
+
// config/ci.ts
|
|
163
|
+
export const getCIConfig = () => {
|
|
164
|
+
const env = process.env.NODE_ENV || 'development';
|
|
165
|
+
|
|
166
|
+
const config = {
|
|
167
|
+
development: {
|
|
168
|
+
apiUrl: 'http://localhost:3000',
|
|
169
|
+
logLevel: 'debug'
|
|
170
|
+
},
|
|
171
|
+
staging: {
|
|
172
|
+
apiUrl: 'https://staging-api.example.com',
|
|
173
|
+
logLevel: 'info',
|
|
174
|
+
sentryDSN: process.env.SENTRY_DSN
|
|
175
|
+
},
|
|
176
|
+
production: {
|
|
177
|
+
apiUrl: 'https://api.example.com',
|
|
178
|
+
logLevel: 'warn',
|
|
179
|
+
sentryDSN: process.env.SENTRY_DSN,
|
|
180
|
+
analyticsToken: process.env.ANALYTICS_TOKEN
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
return config[env as keyof typeof config] || config.development;
|
|
185
|
+
};
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Deployment Strategy
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
#!/bin/bash
|
|
192
|
+
# scripts/deploy.sh
|
|
193
|
+
|
|
194
|
+
set -e
|
|
195
|
+
|
|
196
|
+
ENV=$1
|
|
197
|
+
VERSION=$(git describe --tags --always)
|
|
198
|
+
|
|
199
|
+
echo "Deploying version $VERSION to $ENV"
|
|
200
|
+
|
|
201
|
+
# Build
|
|
202
|
+
npm run build
|
|
203
|
+
|
|
204
|
+
# Run tests
|
|
205
|
+
npm run test
|
|
206
|
+
|
|
207
|
+
# Deploy based on environment
|
|
208
|
+
case $ENV in
|
|
209
|
+
staging)
|
|
210
|
+
npm run deploy:staging
|
|
211
|
+
;;
|
|
212
|
+
production)
|
|
213
|
+
npm run deploy:production
|
|
214
|
+
# Post-deploy verification
|
|
215
|
+
sleep 10
|
|
216
|
+
./scripts/health-check.sh https://example.com
|
|
217
|
+
;;
|
|
218
|
+
esac
|
|
219
|
+
|
|
220
|
+
echo "Deployment complete"
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## Blue-Green Deployment
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
#!/bin/bash
|
|
227
|
+
# scripts/blue-green-deploy.sh
|
|
228
|
+
|
|
229
|
+
BLUE_ENV="prod-blue"
|
|
230
|
+
GREEN_ENV="prod-green"
|
|
231
|
+
CURRENT=$(cat .current-env)
|
|
232
|
+
|
|
233
|
+
if [ "$CURRENT" = "blue" ]; then
|
|
234
|
+
TARGET=$GREEN_ENV
|
|
235
|
+
NEXT="green"
|
|
236
|
+
else
|
|
237
|
+
TARGET=$BLUE_ENV
|
|
238
|
+
NEXT="blue"
|
|
239
|
+
fi
|
|
240
|
+
|
|
241
|
+
echo "Deploying to $TARGET"
|
|
242
|
+
|
|
243
|
+
# Deploy
|
|
244
|
+
npm run build
|
|
245
|
+
npm run deploy:$TARGET
|
|
246
|
+
|
|
247
|
+
# Smoke tests
|
|
248
|
+
npm run test:smoke
|
|
249
|
+
|
|
250
|
+
# Switch traffic
|
|
251
|
+
./switch-traffic.sh $TARGET
|
|
252
|
+
|
|
253
|
+
# Update current environment marker
|
|
254
|
+
echo $NEXT > .current-env
|
|
255
|
+
|
|
256
|
+
echo "Switched to $NEXT ($TARGET)"
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## Best Practices
|
|
260
|
+
|
|
261
|
+
✅ **Fast feedback** - Run fast tests first
|
|
262
|
+
✅ **Parallel execution** - Run independent jobs simultaneously
|
|
263
|
+
✅ **Cache dependencies** - Reduce install time
|
|
264
|
+
✅ **Security secrets** - Use secret management
|
|
265
|
+
✅ **Automated rollback** - Quick recovery from failures
|
|
266
|
+
|
|
267
|
+
## Resources
|
|
268
|
+
|
|
269
|
+
- [GitHub Actions Documentation](https://docs.github.com/en/actions)
|
|
270
|
+
- [GitLab CI/CD](https://docs.gitlab.com/ee/ci/)
|
|
271
|
+
- [Jenkins Documentation](https://www.jenkins.io/doc/)
|