askill
local-dev-workflow

local-dev-workflowSafety 95Repository

Local development workflow: Makefiles, port conventions, running services, and environment setup. Trigger: When adding new services, updating Makefiles, configuring local ports, or setting up local development.

0 stars
1.2k downloads
Updated 2/9/2026

Package Files

Loading files...
SKILL.md

When to Use

  • Adding a new microservice to api/
  • Updating or creating Makefiles
  • Changing port assignments
  • Modifying docker-compose services
  • Setting up a developer's local environment

Port Convention

Every service gets a unique local port. In Docker, all services use :8080 internally.

ServiceLocal portDocker internalpg-{service} host port
gateway80808080
auth808180805433
booking808280805434
caregiver808380805435
payment808480805436
notification808580805437
pet808680805438

Rule: next service = next sequential port. Never reuse ports.

Environment Modes

ModeAPP_ENVDB_PROVIDERHow to run
Local (no Docker)localmemorymake run or make run-{service}
Local + PostgreSQLdevelopmentpostgresmake run-{service}-pg (needs Docker for DB)
Docker full stackdevelopmentpostgresmake up
StagingstagingpostgresCloud deployment
ProductionproductionpostgresCloud deployment

Root Makefile Commands

make run            # Start ALL services in background (in-memory)
make stop           # Stop all background services
make logs           # Tail all service logs
make run-{service}  # Start single service
make test           # Run all tests
make test-{service} # Test single service
make build          # Build all binaries
make up             # docker-compose up -d
make down           # docker-compose down -v
make sqlc           # Regenerate sqlc code for all services

Per-Service Makefile Template

When creating a new service, its Makefile MUST follow the template in assets/service.Makefile.

Replace {name}, {assigned port from table}, {pg host port from table}, {service_name}, and {domain} with actual values.

Checklist: Adding a New Service

When adding a new service to the project:

  1. Assign next sequential port in the port table above
  2. Create api/{service}/Makefile following the template
  3. Add run-{service} and test-{service} targets to root Makefile
  4. Add pg-{service} container to docker-compose.yml
  5. Add service container to docker-compose.yml
  6. Add service URL env var to gateway in docker-compose.yml
  7. Add proxy route in gateway's main.go
  8. Add {SERVICE}_SERVICE_URL to gateway's config.go
  9. Update this skill's port table if needed

Docker-Compose: Database per Service Pattern

Each service gets its own PostgreSQL container following the template in assets/docker-compose.service.yml.

Replace {service} and {host port} with actual values from the port table.

Critical: dev passwords are service name (e.g. auth/auth). Production uses secrets management.

File Locations

api/Makefile                      # API orchestrator — runs all services
api/gateway/Makefile              # Gateway service
api/auth/Makefile                 # Auth service
api/{service}/Makefile            # Future services
api/docker-compose.yml            # Docker full stack
api/logs/                         # Local dev log files (gitignored)
api/.pids/                        # Background process PIDs (gitignored)

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

78/100Analyzed 2/19/2026

Well-structured local development workflow skill with clear trigger, comprehensive port/environment tables, actionable checklist for adding services, and organized Makefile documentation. Highly specific to the project (specific services, ports, conventions) which limits broader reusability. Located in proper skills folder with good metadata. Minor gap: references external template files without including them. Good reference skill for this specific project but would need adaptation for other contexts.

95
90
55
75
85

Metadata

Licenseunknown
Version-
Updated2/9/2026
Publisher333-333-333

Tags

apici-cddatabasesecuritytesting