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,77 @@
|
|
|
1
|
+
# Database Backup & Recovery
|
|
2
|
+
|
|
3
|
+
Automated backup strategies and recovery procedures.
|
|
4
|
+
|
|
5
|
+
## PostgreSQL Backup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Full backup
|
|
9
|
+
pg_dump -U user -h localhost myapp > backup.sql
|
|
10
|
+
|
|
11
|
+
# Compressed backup
|
|
12
|
+
pg_dump -U user -h localhost -Fc myapp > backup.dump
|
|
13
|
+
|
|
14
|
+
# With data directory
|
|
15
|
+
pg_basebackup -U user -h localhost -D ./backup -Ft -z
|
|
16
|
+
|
|
17
|
+
# Restore from backup
|
|
18
|
+
psql -U user myapp < backup.sql
|
|
19
|
+
|
|
20
|
+
# Restore from compressed
|
|
21
|
+
pg_restore -U user -h localhost -d myapp backup.dump
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Automated Backups
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import cron from 'node-cron';
|
|
28
|
+
import { exec } from 'child_process';
|
|
29
|
+
|
|
30
|
+
// Daily backup at 2 AM
|
|
31
|
+
cron.schedule('0 2 * * *', async () => {
|
|
32
|
+
const timestamp = new Date().toISOString().split('T')[0];
|
|
33
|
+
const filename = `backup-${timestamp}.dump`;
|
|
34
|
+
|
|
35
|
+
const command = `pg_dump -U ${DB_USER} -h ${DB_HOST} ${DB_NAME} | gzip > /backups/${filename}`;
|
|
36
|
+
|
|
37
|
+
exec(command, (error) => {
|
|
38
|
+
if (error) {
|
|
39
|
+
console.error('Backup failed:', error);
|
|
40
|
+
// Alert on failure
|
|
41
|
+
} else {
|
|
42
|
+
console.log(`Backup created: ${filename}`);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Backup Verification
|
|
49
|
+
|
|
50
|
+
```typescript
|
|
51
|
+
async function verifyBackup(backupFile: string) {
|
|
52
|
+
// Restore to test database
|
|
53
|
+
const command = `pg_restore -U test_user -h localhost -d test_db ${backupFile}`;
|
|
54
|
+
|
|
55
|
+
// Run validation queries
|
|
56
|
+
const result = await runQuery('SELECT COUNT(*) FROM users');
|
|
57
|
+
|
|
58
|
+
if (result.rowCount > 0) {
|
|
59
|
+
console.log('Backup verified successfully');
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Best Practices
|
|
68
|
+
|
|
69
|
+
✅ **Regular backups** - Daily minimum
|
|
70
|
+
✅ **Test restores** - Verify backups work
|
|
71
|
+
✅ **Offsite storage** - Protect against data loss
|
|
72
|
+
✅ **Retention policy** - Balance storage costs
|
|
73
|
+
✅ **Encryption** - Secure backup data
|
|
74
|
+
|
|
75
|
+
## Resources
|
|
76
|
+
|
|
77
|
+
- [PostgreSQL Backup & Restore](https://www.postgresql.org/docs/current/backup.html)
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Docker
|
|
2
|
+
|
|
3
|
+
Containerization platform for packaging applications with dependencies.
|
|
4
|
+
|
|
5
|
+
## Dockerfile Basics
|
|
6
|
+
|
|
7
|
+
```dockerfile
|
|
8
|
+
FROM node:18-alpine
|
|
9
|
+
|
|
10
|
+
WORKDIR /app
|
|
11
|
+
|
|
12
|
+
COPY package*.json ./
|
|
13
|
+
RUN npm ci --only=production
|
|
14
|
+
|
|
15
|
+
COPY . .
|
|
16
|
+
|
|
17
|
+
EXPOSE 3000
|
|
18
|
+
|
|
19
|
+
CMD ["node", "server.js"]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Build and Run
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Build image
|
|
26
|
+
docker build -t myapp:1.0 .
|
|
27
|
+
|
|
28
|
+
# Run container
|
|
29
|
+
docker run -p 3000:3000 myapp:1.0
|
|
30
|
+
|
|
31
|
+
# Run with environment variables
|
|
32
|
+
docker run -e DATABASE_URL=postgres://localhost:5432/db myapp:1.0
|
|
33
|
+
|
|
34
|
+
# Run in background
|
|
35
|
+
docker run -d --name myapp-prod -p 80:3000 myapp:1.0
|
|
36
|
+
|
|
37
|
+
# View logs
|
|
38
|
+
docker logs myapp-prod
|
|
39
|
+
|
|
40
|
+
# Stop container
|
|
41
|
+
docker stop myapp-prod
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Docker Compose
|
|
45
|
+
|
|
46
|
+
```yaml
|
|
47
|
+
version: '3.8'
|
|
48
|
+
|
|
49
|
+
services:
|
|
50
|
+
app:
|
|
51
|
+
build: .
|
|
52
|
+
ports:
|
|
53
|
+
- "3000:3000"
|
|
54
|
+
environment:
|
|
55
|
+
DATABASE_URL: postgres://db:5432/myapp
|
|
56
|
+
depends_on:
|
|
57
|
+
- db
|
|
58
|
+
|
|
59
|
+
db:
|
|
60
|
+
image: postgres:15
|
|
61
|
+
environment:
|
|
62
|
+
POSTGRES_DB: myapp
|
|
63
|
+
POSTGRES_PASSWORD: secret
|
|
64
|
+
volumes:
|
|
65
|
+
- postgres_data:/var/lib/postgresql/data
|
|
66
|
+
|
|
67
|
+
volumes:
|
|
68
|
+
postgres_data:
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Start services
|
|
73
|
+
docker-compose up -d
|
|
74
|
+
|
|
75
|
+
# Stop services
|
|
76
|
+
docker-compose down
|
|
77
|
+
|
|
78
|
+
# View logs
|
|
79
|
+
docker-compose logs -f app
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Best Practices
|
|
83
|
+
|
|
84
|
+
✅ **Multi-stage builds** - Reduce image size
|
|
85
|
+
✅ **Use .dockerignore** - Exclude unnecessary files
|
|
86
|
+
✅ **.env for secrets** - Never hardcode credentials
|
|
87
|
+
✅ **Layer caching** - Order commands efficiently
|
|
88
|
+
✅ **Health checks** - Monitor container health
|
|
89
|
+
|
|
90
|
+
## Resources
|
|
91
|
+
|
|
92
|
+
- [Docker Docs](https://docs.docker.com/)
|
|
93
|
+
- [Best Practices](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/)
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# GitHub Actions
|
|
2
|
+
|
|
3
|
+
CI/CD workflow automation for GitHub repositories.
|
|
4
|
+
|
|
5
|
+
## Basic Workflow
|
|
6
|
+
|
|
7
|
+
```yaml
|
|
8
|
+
name: Test and Deploy
|
|
9
|
+
|
|
10
|
+
on:
|
|
11
|
+
push:
|
|
12
|
+
branches: [main]
|
|
13
|
+
pull_request:
|
|
14
|
+
branches: [main]
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
test:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v3
|
|
21
|
+
|
|
22
|
+
- uses: actions/setup-node@v3
|
|
23
|
+
with:
|
|
24
|
+
node-version: '18'
|
|
25
|
+
|
|
26
|
+
- run: npm ci
|
|
27
|
+
- run: npm test
|
|
28
|
+
- run: npm run build
|
|
29
|
+
|
|
30
|
+
deploy:
|
|
31
|
+
needs: test
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
if: github.ref == 'refs/heads/main'
|
|
34
|
+
steps:
|
|
35
|
+
- uses: actions/checkout@v3
|
|
36
|
+
- uses: superfly/flyctl-actions/setup-flyctl@master
|
|
37
|
+
- run: flyctl deploy --remote-only
|
|
38
|
+
env:
|
|
39
|
+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Common Actions
|
|
43
|
+
|
|
44
|
+
```yaml
|
|
45
|
+
# Checkout code
|
|
46
|
+
- uses: actions/checkout@v3
|
|
47
|
+
|
|
48
|
+
# Setup Node
|
|
49
|
+
- uses: actions/setup-node@v3
|
|
50
|
+
with:
|
|
51
|
+
node-version: '18'
|
|
52
|
+
cache: 'npm'
|
|
53
|
+
|
|
54
|
+
# Run tests with coverage
|
|
55
|
+
- run: npm test -- --coverage
|
|
56
|
+
|
|
57
|
+
# Upload artifacts
|
|
58
|
+
- uses: actions/upload-artifact@v3
|
|
59
|
+
with:
|
|
60
|
+
name: coverage
|
|
61
|
+
path: coverage/
|
|
62
|
+
|
|
63
|
+
# Create release
|
|
64
|
+
- uses: actions/create-release@v1
|
|
65
|
+
env:
|
|
66
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
67
|
+
with:
|
|
68
|
+
tag_name: v${{ github.run_number }}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Best Practices
|
|
72
|
+
|
|
73
|
+
✅ **Cache dependencies** - Speed up builds
|
|
74
|
+
✅ **Use secrets** - Never hardcode credentials
|
|
75
|
+
✅ **Run on schedule** - Use cron for periodic tasks
|
|
76
|
+
✅ **Matrix builds** - Test multiple versions
|
|
77
|
+
✅ **Status checks** - Require passing builds
|
|
78
|
+
|
|
79
|
+
## Resources
|
|
80
|
+
|
|
81
|
+
- [GitHub Actions Docs](https://docs.github.com/actions)
|
|
82
|
+
- [Marketplace](https://github.com/marketplace?type=actions)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Production-Ready Skill Implementation
|
|
2
|
+
|
|
3
|
+
## Setup & Installation
|
|
4
|
+
|
|
5
|
+
Detailed installation and configuration steps for the technology.
|
|
6
|
+
|
|
7
|
+
## Core Concepts
|
|
8
|
+
|
|
9
|
+
Fundamental patterns and approaches.
|
|
10
|
+
|
|
11
|
+
## Implementation Examples
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
// Real production code examples
|
|
15
|
+
// with error handling and best practices
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Advanced Patterns
|
|
19
|
+
|
|
20
|
+
Complex scenarios and optimization techniques.
|
|
21
|
+
|
|
22
|
+
## Performance Optimization
|
|
23
|
+
|
|
24
|
+
Tips for maximizing efficiency and speed.
|
|
25
|
+
|
|
26
|
+
## Security Considerations
|
|
27
|
+
|
|
28
|
+
Security best practices specific to this technology.
|
|
29
|
+
|
|
30
|
+
## Testing
|
|
31
|
+
|
|
32
|
+
How to properly test this feature.
|
|
33
|
+
|
|
34
|
+
## Monitoring & Debugging
|
|
35
|
+
|
|
36
|
+
Tools and techniques for production support.
|
|
37
|
+
|
|
38
|
+
## Best Practices
|
|
39
|
+
|
|
40
|
+
✅ Key recommendations
|
|
41
|
+
✅ Common pitfalls to avoid
|
|
42
|
+
✅ Performance considerations
|
|
43
|
+
✅ Security measures
|
|
44
|
+
✅ Production readiness
|
|
45
|
+
|
|
46
|
+
## Resources
|
|
47
|
+
|
|
48
|
+
- Official documentation
|
|
49
|
+
- Community guides
|
|
50
|
+
- Performance benchmarks
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Kubernetes
|
|
2
|
+
|
|
3
|
+
Container orchestration platform for deploying and scaling containerized applications.
|
|
4
|
+
|
|
5
|
+
## Kubernetes Basics
|
|
6
|
+
|
|
7
|
+
```yaml
|
|
8
|
+
# Pod
|
|
9
|
+
apiVersion: v1
|
|
10
|
+
kind: Pod
|
|
11
|
+
metadata:
|
|
12
|
+
name: myapp-pod
|
|
13
|
+
spec:
|
|
14
|
+
containers:
|
|
15
|
+
- name: myapp
|
|
16
|
+
image: myapp:1.0
|
|
17
|
+
ports:
|
|
18
|
+
- containerPort: 3000
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Deployment
|
|
22
|
+
|
|
23
|
+
```yaml
|
|
24
|
+
apiVersion: apps/v1
|
|
25
|
+
kind: Deployment
|
|
26
|
+
metadata:
|
|
27
|
+
name: myapp
|
|
28
|
+
spec:
|
|
29
|
+
replicas: 3
|
|
30
|
+
selector:
|
|
31
|
+
matchLabels:
|
|
32
|
+
app: myapp
|
|
33
|
+
template:
|
|
34
|
+
metadata:
|
|
35
|
+
labels:
|
|
36
|
+
app: myapp
|
|
37
|
+
spec:
|
|
38
|
+
containers:
|
|
39
|
+
- name: myapp
|
|
40
|
+
image: myapp:1.0
|
|
41
|
+
ports:
|
|
42
|
+
- containerPort: 3000
|
|
43
|
+
env:
|
|
44
|
+
- name: DATABASE_URL
|
|
45
|
+
valueFrom:
|
|
46
|
+
secretKeyRef:
|
|
47
|
+
name: db-secret
|
|
48
|
+
key: url
|
|
49
|
+
resources:
|
|
50
|
+
requests:
|
|
51
|
+
memory: "256Mi"
|
|
52
|
+
cpu: "250m"
|
|
53
|
+
limits:
|
|
54
|
+
memory: "512Mi"
|
|
55
|
+
cpu: "500m"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Service
|
|
59
|
+
|
|
60
|
+
```yaml
|
|
61
|
+
apiVersion: v1
|
|
62
|
+
kind: Service
|
|
63
|
+
metadata:
|
|
64
|
+
name: myapp-service
|
|
65
|
+
spec:
|
|
66
|
+
type: LoadBalancer
|
|
67
|
+
selector:
|
|
68
|
+
app: myapp
|
|
69
|
+
ports:
|
|
70
|
+
- protocol: TCP
|
|
71
|
+
port: 80
|
|
72
|
+
targetPort: 3000
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## kubectl Commands
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# Apply configuration
|
|
79
|
+
kubectl apply -f deployment.yaml
|
|
80
|
+
|
|
81
|
+
# Check deployments
|
|
82
|
+
kubectl get deployments
|
|
83
|
+
kubectl get pods
|
|
84
|
+
|
|
85
|
+
# View logs
|
|
86
|
+
kubectl logs -f deployment/myapp
|
|
87
|
+
|
|
88
|
+
# Scale deployment
|
|
89
|
+
kubectl scale deployment myapp --replicas=5
|
|
90
|
+
|
|
91
|
+
# Update image
|
|
92
|
+
kubectl set image deployment/myapp myapp=myapp:2.0
|
|
93
|
+
|
|
94
|
+
# Delete deployment
|
|
95
|
+
kubectl delete deployment myapp
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Best Practices
|
|
99
|
+
|
|
100
|
+
✅ **Use namespaces** - Organize resources
|
|
101
|
+
✅ **Resource limits** - Set CPU and memory
|
|
102
|
+
✅ **Liveness/readiness probes** - Health checks
|
|
103
|
+
✅ **ConfigMaps for config** - Externalize configuration
|
|
104
|
+
✅ **Secrets for sensitive data** - Never hardcode secrets
|
|
105
|
+
|
|
106
|
+
## Resources
|
|
107
|
+
|
|
108
|
+
- [Kubernetes Docs](https://kubernetes.io/docs/)
|
|
109
|
+
- [kubectl Reference](https://kubernetes.io/docs/reference/kubectl/)
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# Logging & Log Management
|
|
2
|
+
|
|
3
|
+
Centralized logging, log aggregation, and analysis.
|
|
4
|
+
|
|
5
|
+
## Winston Logger
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import winston from 'winston';
|
|
9
|
+
|
|
10
|
+
const logger = winston.createLogger({
|
|
11
|
+
defaultMeta: { service: 'my-api' },
|
|
12
|
+
format: winston.format.combine(
|
|
13
|
+
winston.format.timestamp(),
|
|
14
|
+
winston.format.errors({ stack: true }),
|
|
15
|
+
winston.format.json()
|
|
16
|
+
),
|
|
17
|
+
transports: [
|
|
18
|
+
new winston.transports.File({ filename: 'error.log', level: 'error' }),
|
|
19
|
+
new winston.transports.File({ filename: 'combined.log' })
|
|
20
|
+
]
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
24
|
+
logger.add(new winston.transports.Console({
|
|
25
|
+
format: winston.format.simple()
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Usage
|
|
30
|
+
logger.info('User logged in', { userId: '123' });
|
|
31
|
+
logger.error('Database error', { error: err.message });
|
|
32
|
+
logger.warn('Deprecated API called', { endpoint: '/api/v1/users' });
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Express Integration
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
import expressWinston from 'express-winston';
|
|
39
|
+
|
|
40
|
+
app.use(expressWinston.logger({
|
|
41
|
+
transports: [
|
|
42
|
+
new winston.transports.File({ filename: 'requests.log' })
|
|
43
|
+
],
|
|
44
|
+
format: winston.format.combine(
|
|
45
|
+
winston.format.timestamp(),
|
|
46
|
+
winston.format.json()
|
|
47
|
+
),
|
|
48
|
+
meta: true,
|
|
49
|
+
msg: 'HTTP {{req.method}} {{req.url}}',
|
|
50
|
+
expressFormat: true
|
|
51
|
+
}));
|
|
52
|
+
|
|
53
|
+
// Error logging
|
|
54
|
+
app.use(expressWinston.errorLogger({
|
|
55
|
+
transports: [
|
|
56
|
+
new winston.transports.File({ filename: 'errors.log' })
|
|
57
|
+
]
|
|
58
|
+
}));
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Structured Logging
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
// Bad: Unstructured logs
|
|
65
|
+
logger.info('User with ID ' + userId + ' logged in at ' + timestamp);
|
|
66
|
+
|
|
67
|
+
// Good: Structured logs
|
|
68
|
+
logger.info('User login', {
|
|
69
|
+
userId,
|
|
70
|
+
timestamp: new Date().toISOString(),
|
|
71
|
+
ipAddress: req.ip,
|
|
72
|
+
userAgent: req.headers['user-agent']
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// Query logs easily
|
|
76
|
+
// All user logins: { message: 'User login', action: 'login' }
|
|
77
|
+
// Errors from service X: { service: 'auth-service', level: 'error' }
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Log Aggregation (ELK Stack)
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# Docker Compose for ELK
|
|
84
|
+
version: '3'
|
|
85
|
+
services:
|
|
86
|
+
elasticsearch:
|
|
87
|
+
image: docker.elastic.co/elasticsearch/elasticsearch:8.0.0
|
|
88
|
+
environment:
|
|
89
|
+
- xpack.security.enabled=false
|
|
90
|
+
ports:
|
|
91
|
+
- "9200:9200"
|
|
92
|
+
|
|
93
|
+
logstash:
|
|
94
|
+
image: docker.elastic.co/logstash/logstash:8.0.0
|
|
95
|
+
volumes:
|
|
96
|
+
- ./logstash.conf:/usr/share/logstash/pipeline/logstash.conf
|
|
97
|
+
ports:
|
|
98
|
+
- "5000:5000"
|
|
99
|
+
|
|
100
|
+
kibana:
|
|
101
|
+
image: docker.elastic.co/kibana/kibana:8.0.0
|
|
102
|
+
ports:
|
|
103
|
+
- "5601:5601"
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Send Logs to Elasticsearch
|
|
107
|
+
|
|
108
|
+
```typescript
|
|
109
|
+
import * as Elasticsearch from 'winston-elasticsearch';
|
|
110
|
+
|
|
111
|
+
const logger = winston.createLogger({
|
|
112
|
+
transports: [
|
|
113
|
+
new Elasticsearch.ElasticsearchTransport({
|
|
114
|
+
level: 'info',
|
|
115
|
+
clientOpts: { node: 'http://localhost:9200' },
|
|
116
|
+
index: 'logs'
|
|
117
|
+
})
|
|
118
|
+
]
|
|
119
|
+
});
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## CloudWatch Logs (AWS)
|
|
123
|
+
|
|
124
|
+
```typescript
|
|
125
|
+
import { CloudWatchTransport } from 'winston-cloudwatch';
|
|
126
|
+
|
|
127
|
+
const logger = winston.createLogger({
|
|
128
|
+
transports: [
|
|
129
|
+
new CloudWatchTransport({
|
|
130
|
+
logGroupName: '/aws/lambda/my-function',
|
|
131
|
+
logStreamName: 'execution',
|
|
132
|
+
awsAccessKeyId: process.env.AWS_ACCESS_KEY_ID,
|
|
133
|
+
awsSecretKey: process.env.AWS_SECRET_ACCESS_KEY,
|
|
134
|
+
awsRegion: 'us-east-1'
|
|
135
|
+
})
|
|
136
|
+
]
|
|
137
|
+
});
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Log Levels
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
// 0 error, 1 warn, 2 info, 3 http, 4 debug
|
|
144
|
+
logger.error('Critical failure'); // Always logged
|
|
145
|
+
logger.warn('Deprecated API usage'); // Production logging
|
|
146
|
+
logger.info('User action'); // Standard operations
|
|
147
|
+
logger.http('API request'); // HTTP details
|
|
148
|
+
logger.debug('Variable value'); // Development only
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Best Practices
|
|
152
|
+
|
|
153
|
+
✅ **Structured format** - JSON for easy parsing
|
|
154
|
+
✅ **Log levels** - Use appropriate severity
|
|
155
|
+
✅ **Correlation IDs** - Track requests across services
|
|
156
|
+
✅ **Retention** - Balance storage and compliance
|
|
157
|
+
✅ **PII handling** - Never log sensitive data
|
|
158
|
+
|
|
159
|
+
## Resources
|
|
160
|
+
|
|
161
|
+
- [Winston Documentation](https://github.com/winstonjs/winston)
|
|
162
|
+
- [Elastic Stack](https://www.elastic.co/elastic-stack/)
|
|
163
|
+
- [CloudWatch Logs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/)
|