Docker-First & Image-First Architecture Skill
This skill defines the official architectural guidelines, containerization blueprints, and publishing standards across all services in the personal projects ecosystem. It enforces a **Docker-First and Image-First** doctrine to guarantee infrastructure portability from Vercel/Render edge environments to AWS (Terraform + ECS/EKS) and sovereign self-hosting.
1. Overview & Objective
Every service—regardless of language or framework—must be fully containerized, reproducible, and published to Docker Hub (`shardendumishra22/*`).
Portability Roadmap
2. Core Directives & Toolchain Standards
**OPTIMAL TOOLCHAIN MANDATE**: Always employ the fastest, most deterministic tools: - **Node.js / TypeScript**: `pnpm` exclusively (via Corepack). Never use `npm` or legacy `yarn`. - **Python**: `uv` exclusively (`ghcr.io/astral-sh/uv:latest`). Never use plain `pip` or slow virtualenv setups. - **Go**: Static compilation (`CGO_ENABLED=0`, `-ldflags="-w -s"`). Never deploy dynamic glibc-dependent Go binaries. - **Static Frontends (Preact / Svelte / React)**: Multi-stage `pnpm` builder with `nginx:alpine` runner.
Mandatory Container Hardening Rules:
3. Technology Blueprints
Blueprint A: Next.js 16 Standalone (Node 22 + pnpm)
Blueprint B: Static SPAs (Preact / Svelte 5 / Vite + Nginx)
Blueprint C: Go 1.25 API / Microservice
Blueprint D: Python 3.12 AI / API Service (FastAPI + uv)
Blueprint E: Express 5 + TypeScript + Drizzle API
4. Verification & Testing Runbook
# 1. Validate Docker daemon is operational
docker info
# 2. Build image locally with Buildx
docker build -t shardendumishra22/<service-name>:local .
# 3. Test local container execution & healthcheck
docker run -d --name test-<service-name> -p <port>:<port> shardendumishra22/<service-name>:local
sleep 5
docker ps --filter name=test-<service-name>
curl -f http://localhost:<port>/health || exit 1
docker rm -f test-<service-name>
# 4. Verify Compose environment
docker compose up -d
docker compose ps
docker compose down