@brunosps00/dev-workflow 0.7.0 → 0.8.1

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.
Files changed (50) hide show
  1. package/README.md +20 -4
  2. package/lib/constants.js +8 -0
  3. package/lib/install-deps.js +13 -0
  4. package/package.json +1 -1
  5. package/scaffold/en/commands/dw-deps-audit.md +326 -0
  6. package/scaffold/en/commands/dw-dockerize.md +321 -0
  7. package/scaffold/en/commands/dw-find-skills.md +158 -0
  8. package/scaffold/en/commands/dw-fix-qa.md +34 -13
  9. package/scaffold/en/commands/dw-help.md +4 -0
  10. package/scaffold/en/commands/dw-new-project.md +350 -0
  11. package/scaffold/en/commands/dw-run-qa.md +124 -23
  12. package/scaffold/en/templates/project-onepager.md +129 -0
  13. package/scaffold/pt-br/commands/dw-deps-audit.md +326 -0
  14. package/scaffold/pt-br/commands/dw-dockerize.md +321 -0
  15. package/scaffold/pt-br/commands/dw-find-skills.md +158 -0
  16. package/scaffold/pt-br/commands/dw-fix-qa.md +34 -13
  17. package/scaffold/pt-br/commands/dw-help.md +4 -0
  18. package/scaffold/pt-br/commands/dw-new-project.md +350 -0
  19. package/scaffold/pt-br/commands/dw-run-qa.md +124 -23
  20. package/scaffold/pt-br/templates/project-onepager.md +129 -0
  21. package/scaffold/skills/api-testing-recipes/SKILL.md +104 -0
  22. package/scaffold/skills/api-testing-recipes/recipes/dotnet-webapp-factory.md +168 -0
  23. package/scaffold/skills/api-testing-recipes/recipes/http-rest-client.md +130 -0
  24. package/scaffold/skills/api-testing-recipes/recipes/pytest-httpx.md +157 -0
  25. package/scaffold/skills/api-testing-recipes/recipes/rust-reqwest.md +173 -0
  26. package/scaffold/skills/api-testing-recipes/recipes/supertest-node.md +153 -0
  27. package/scaffold/skills/api-testing-recipes/references/auth-patterns.md +138 -0
  28. package/scaffold/skills/api-testing-recipes/references/log-conventions.md +117 -0
  29. package/scaffold/skills/api-testing-recipes/references/matrix-conventions.md +68 -0
  30. package/scaffold/skills/api-testing-recipes/references/openapi-driven.md +97 -0
  31. package/scaffold/skills/docker-compose-recipes/SKILL.md +84 -0
  32. package/scaffold/skills/docker-compose-recipes/references/compose-composition.md +91 -0
  33. package/scaffold/skills/docker-compose-recipes/references/env-conventions.md +51 -0
  34. package/scaffold/skills/docker-compose-recipes/references/healthcheck-patterns.md +54 -0
  35. package/scaffold/skills/docker-compose-recipes/references/prod-vs-dev.md +85 -0
  36. package/scaffold/skills/docker-compose-recipes/services/elasticsearch.yml +34 -0
  37. package/scaffold/skills/docker-compose-recipes/services/jaeger.yml +24 -0
  38. package/scaffold/skills/docker-compose-recipes/services/localstack.yml +30 -0
  39. package/scaffold/skills/docker-compose-recipes/services/mailhog.yml +23 -0
  40. package/scaffold/skills/docker-compose-recipes/services/mailpit.yml +27 -0
  41. package/scaffold/skills/docker-compose-recipes/services/meilisearch.yml +28 -0
  42. package/scaffold/skills/docker-compose-recipes/services/memcached.yml +19 -0
  43. package/scaffold/skills/docker-compose-recipes/services/minio.yml +30 -0
  44. package/scaffold/skills/docker-compose-recipes/services/mysql.yml +30 -0
  45. package/scaffold/skills/docker-compose-recipes/services/postgres.yml +30 -0
  46. package/scaffold/skills/docker-compose-recipes/services/rabbitmq.yml +29 -0
  47. package/scaffold/skills/docker-compose-recipes/services/redis.yml +25 -0
  48. package/scaffold/skills/docker-compose-recipes/services/smtp4dev.yml +27 -0
  49. package/scaffold/skills/docker-compose-recipes/services/traefik.yml +42 -0
  50. package/scaffold/skills/docker-compose-recipes/services/typesense.yml +25 -0
@@ -0,0 +1,30 @@
1
+ # MinIO — S3-compatible object storage (dev replacement for AWS S3)
2
+ # Env vars: MINIO_ROOT_USER, MINIO_ROOT_PASSWORD, MINIO_API_PORT (default 9000), MINIO_UI_PORT (default 9001)
3
+ # Application-side: AWS_ENDPOINT_URL=http://minio:9000; AWS_ACCESS_KEY_ID=${MINIO_ROOT_USER}; AWS_SECRET_ACCESS_KEY=${MINIO_ROOT_PASSWORD}
4
+
5
+ minio:
6
+ image: minio/minio:latest
7
+ restart: unless-stopped
8
+ command: server /data --console-address ":9001"
9
+ environment:
10
+ MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minio}
11
+ MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-minio12345}
12
+ ports:
13
+ - "${MINIO_API_PORT:-9000}:9000"
14
+ - "${MINIO_UI_PORT:-9001}:9001"
15
+ volumes:
16
+ - minio_data:/data
17
+ healthcheck:
18
+ test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
19
+ interval: 10s
20
+ timeout: 5s
21
+ retries: 5
22
+ start_period: 5s
23
+
24
+ # volumes:
25
+ # minio_data: {}
26
+ #
27
+ # Prod notes:
28
+ # - In prod, replace with real S3 (or another managed object store). MinIO is great in dev,
29
+ # acceptable in prod only if you understand the operational requirements (HA, erasure coding, replication).
30
+ # - Always rotate MINIO_ROOT_PASSWORD; default credentials must NOT survive past local dev.
@@ -0,0 +1,30 @@
1
+ # MySQL 8 — relational DB
2
+ # Env vars referenced: MYSQL_ROOT_PASSWORD, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE, MYSQL_PORT (default 3306)
3
+ # Application-side: DATABASE_URL=mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@mysql:3306/${MYSQL_DATABASE}
4
+
5
+ mysql:
6
+ image: mysql:8.4
7
+ restart: unless-stopped
8
+ command: --default-authentication-plugin=mysql_native_password
9
+ environment:
10
+ MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-root}
11
+ MYSQL_USER: ${MYSQL_USER:-app}
12
+ MYSQL_PASSWORD: ${MYSQL_PASSWORD:-app}
13
+ MYSQL_DATABASE: ${MYSQL_DATABASE:-app}
14
+ ports:
15
+ - "${MYSQL_PORT:-3306}:3306"
16
+ volumes:
17
+ - mysql_data:/var/lib/mysql
18
+ healthcheck:
19
+ test: ["CMD-SHELL", "mysqladmin ping -h localhost -u${MYSQL_USER:-app} -p${MYSQL_PASSWORD:-app}"]
20
+ interval: 5s
21
+ timeout: 3s
22
+ retries: 10
23
+ start_period: 15s
24
+
25
+ # volumes:
26
+ # mysql_data: {}
27
+ #
28
+ # Prod notes:
29
+ # - Use secrets for MYSQL_ROOT_PASSWORD and MYSQL_PASSWORD; drop public port.
30
+ # - Consider Percona or MariaDB as drop-in alternatives if licensing is a concern.
@@ -0,0 +1,30 @@
1
+ # Postgres 16 — relational DB
2
+ # Env vars referenced: POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB, POSTGRES_PORT (default 5432)
3
+ # Application-side: derive DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
4
+
5
+ postgres:
6
+ image: postgres:16-alpine
7
+ restart: unless-stopped
8
+ environment:
9
+ POSTGRES_USER: ${POSTGRES_USER:-app}
10
+ POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-app}
11
+ POSTGRES_DB: ${POSTGRES_DB:-app}
12
+ ports:
13
+ - "${POSTGRES_PORT:-5432}:5432"
14
+ volumes:
15
+ - postgres_data:/var/lib/postgresql/data
16
+ healthcheck:
17
+ test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-app} -d ${POSTGRES_DB:-app}"]
18
+ interval: 5s
19
+ timeout: 3s
20
+ retries: 10
21
+ start_period: 5s
22
+
23
+ # volumes block to merge:
24
+ # volumes:
25
+ # postgres_data: {}
26
+ #
27
+ # Prod notes:
28
+ # - Move POSTGRES_PASSWORD to a secret (file_env or external secrets manager).
29
+ # - Drop the public port mapping; expose only via internal network or a bastion.
30
+ # - Pin to a specific patch version in production manifests (e.g., postgres:16.4-alpine).
@@ -0,0 +1,29 @@
1
+ # RabbitMQ 3 (management) — message broker + UI
2
+ # Env vars: RABBITMQ_USER, RABBITMQ_PASSWORD, RABBITMQ_PORT (default 5672), RABBITMQ_UI_PORT (default 15672)
3
+ # Application-side: AMQP_URL=amqp://${RABBITMQ_USER}:${RABBITMQ_PASSWORD}@rabbitmq:5672/
4
+
5
+ rabbitmq:
6
+ image: rabbitmq:3-management-alpine
7
+ restart: unless-stopped
8
+ environment:
9
+ RABBITMQ_DEFAULT_USER: ${RABBITMQ_USER:-app}
10
+ RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASSWORD:-app}
11
+ ports:
12
+ - "${RABBITMQ_PORT:-5672}:5672"
13
+ - "${RABBITMQ_UI_PORT:-15672}:15672"
14
+ volumes:
15
+ - rabbitmq_data:/var/lib/rabbitmq
16
+ healthcheck:
17
+ test: ["CMD", "rabbitmq-diagnostics", "ping"]
18
+ interval: 10s
19
+ timeout: 5s
20
+ retries: 10
21
+ start_period: 30s
22
+
23
+ # volumes:
24
+ # rabbitmq_data: {}
25
+ #
26
+ # Prod notes:
27
+ # - Drop the management UI port (15672) or put it behind a reverse proxy with auth.
28
+ # - Use rabbitmq:3-alpine (no management) in prod; manage via the cluster API.
29
+ # - Mount a custom rabbitmq.conf for clustering, queue limits, and TLS.
@@ -0,0 +1,25 @@
1
+ # Redis 7 — cache, pub/sub, BullMQ backend
2
+ # Env vars: REDIS_PORT (default 6379), REDIS_PASSWORD (optional in dev)
3
+ # Application-side: REDIS_URL=redis://redis:6379 or redis://:${REDIS_PASSWORD}@redis:6379
4
+
5
+ redis:
6
+ image: redis:7-alpine
7
+ restart: unless-stopped
8
+ command: ${REDIS_PASSWORD:+redis-server --requirepass ${REDIS_PASSWORD}}
9
+ ports:
10
+ - "${REDIS_PORT:-6379}:6379"
11
+ volumes:
12
+ - redis_data:/data
13
+ healthcheck:
14
+ test: ["CMD", "redis-cli", "ping"]
15
+ interval: 5s
16
+ timeout: 3s
17
+ retries: 10
18
+ start_period: 3s
19
+
20
+ # volumes:
21
+ # redis_data: {}
22
+ #
23
+ # Prod notes:
24
+ # - Always set REDIS_PASSWORD in prod. Drop public port; expose only on internal network.
25
+ # - For persistence in prod, mount a Redis config file with appendonly yes and tune save points.
@@ -0,0 +1,27 @@
1
+ # smtp4dev — Windows-friendly SMTP capture, .NET-based
2
+ # Env vars: SMTP4DEV_SMTP_PORT (default 2525), SMTP4DEV_UI_PORT (default 5000)
3
+ # Application-side SMTP config:
4
+ # SMTP_HOST=smtp4dev ; SMTP_PORT=25 (internal) ; SMTP_USER= ; SMTP_PASSWORD= ; SMTP_SECURE=false
5
+
6
+ smtp4dev:
7
+ image: rnwood/smtp4dev:v3
8
+ restart: unless-stopped
9
+ ports:
10
+ - "${SMTP4DEV_SMTP_PORT:-2525}:25"
11
+ - "${SMTP4DEV_UI_PORT:-5000}:80"
12
+ environment:
13
+ ServerOptions__HostName: smtp4dev
14
+ volumes:
15
+ - smtp4dev_data:/smtp4dev
16
+ healthcheck:
17
+ test: ["CMD", "wget", "--quiet", "--spider", "http://localhost:80"]
18
+ interval: 10s
19
+ timeout: 3s
20
+ retries: 5
21
+ start_period: 5s
22
+
23
+ # volumes:
24
+ # smtp4dev_data: {}
25
+ #
26
+ # Prod notes:
27
+ # - DEV ONLY. Do not ship to prod.
@@ -0,0 +1,42 @@
1
+ # Traefik 3 — reverse proxy + dev TLS via mkcert
2
+ # Env vars: TRAEFIK_HTTP_PORT (default 80), TRAEFIK_HTTPS_PORT (default 443), TRAEFIK_DASHBOARD_PORT (default 8080)
3
+ # Use Docker labels on other services to route traffic, e.g.:
4
+ # labels:
5
+ # - "traefik.enable=true"
6
+ # - "traefik.http.routers.web.rule=Host(`web.localhost`)"
7
+ # - "traefik.http.services.web.loadbalancer.server.port=3000"
8
+
9
+ traefik:
10
+ image: traefik:v3.1
11
+ restart: unless-stopped
12
+ command:
13
+ - "--api.insecure=true"
14
+ - "--providers.docker=true"
15
+ - "--providers.docker.exposedbydefault=false"
16
+ - "--entrypoints.web.address=:80"
17
+ - "--entrypoints.websecure.address=:443"
18
+ ports:
19
+ - "${TRAEFIK_HTTP_PORT:-80}:80"
20
+ - "${TRAEFIK_HTTPS_PORT:-443}:443"
21
+ - "${TRAEFIK_DASHBOARD_PORT:-8080}:8080"
22
+ volumes:
23
+ - /var/run/docker.sock:/var/run/docker.sock:ro
24
+ - traefik_certs:/certs
25
+ healthcheck:
26
+ test: ["CMD", "wget", "--quiet", "--spider", "http://localhost:8080/ping"]
27
+ interval: 10s
28
+ timeout: 3s
29
+ retries: 5
30
+ start_period: 5s
31
+
32
+ # volumes:
33
+ # traefik_certs: {}
34
+ #
35
+ # Dev TLS notes:
36
+ # - Run `mkcert -install && mkcert localhost '*.localhost'` once on the host, mount the certs
37
+ # into traefik_certs, and configure tls.options for HTTPS routes.
38
+ #
39
+ # Prod notes:
40
+ # - REMOVE --api.insecure=true. Bind the dashboard to a private network or behind basic auth.
41
+ # - Replace Docker provider with file/Kubernetes provider for prod orchestration.
42
+ # - Use ACME/Let's Encrypt resolver for prod TLS (configure --certificatesresolvers.le.acme.*).
@@ -0,0 +1,25 @@
1
+ # Typesense — alternative to Meilisearch, focus on typo tolerance and ranking
2
+ # Env vars: TYPESENSE_API_KEY, TYPESENSE_PORT (default 8108)
3
+ # Application-side: TYPESENSE_HOST=typesense; TYPESENSE_PORT=8108; TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
4
+
5
+ typesense:
6
+ image: typesense/typesense:0.27.1
7
+ restart: unless-stopped
8
+ command: --data-dir /data --api-key=${TYPESENSE_API_KEY:-typesense-dev-key} --enable-cors
9
+ ports:
10
+ - "${TYPESENSE_PORT:-8108}:8108"
11
+ volumes:
12
+ - typesense_data:/data
13
+ healthcheck:
14
+ test: ["CMD", "curl", "-f", "http://localhost:8108/health"]
15
+ interval: 10s
16
+ timeout: 3s
17
+ retries: 5
18
+ start_period: 5s
19
+
20
+ # volumes:
21
+ # typesense_data: {}
22
+ #
23
+ # Prod notes:
24
+ # - Generate a strong TYPESENSE_API_KEY; rotate periodically.
25
+ # - For HA, run a 3-node cluster (see Typesense docs for clustering).