From aa37ecfcd33bc460afd9e31f0291838fab0f6bc8 Mon Sep 17 00:00:00 2001 From: Eric Gullickson <16152721+ericgullickson@users.noreply.github.com> Date: Sat, 20 Dec 2025 12:47:18 -0600 Subject: [PATCH] Add local development build workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add Makefile targets: install, type-check, lint, build-local - Add type-check script to backend/package.json - Create backend/.gitignore for build artifacts Enables quick TypeScript error detection without Docker rebuilds. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- Makefile | 52 +++++++++++++++++++++++++++++++++++++++++++- backend/.gitignore | 22 +++++++++++++++++++ backend/package.json | 3 ++- 3 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 backend/.gitignore diff --git a/Makefile b/Makefile index 06ffee2..c3e9265 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: help setup start stop clean logs shell-backend shell-frontend migrate rebuild traefik-dashboard traefik-logs service-discovery network-inspect health-check-all mobile-setup db-shell-app +.PHONY: help setup start stop clean logs shell-backend shell-frontend migrate rebuild traefik-dashboard traefik-logs service-discovery network-inspect health-check-all mobile-setup db-shell-app install type-check lint build-local help: @echo "MotoVaultPro - Simplified 5-Container Architecture" @@ -25,6 +25,12 @@ help: @echo "" @echo "Database Access (Container-Only):" @echo " make db-shell-app - Application database shell" + @echo "" + @echo "Local Development (No Docker):" + @echo " make install - Install npm dependencies locally" + @echo " make type-check - Run TypeScript type checks" + @echo " make lint - Run ESLint on all code" + @echo " make build-local - Build frontend and backend locally" setup: @echo "Setting up MotoVaultPro K8s-ready development environment..." @@ -194,3 +200,47 @@ db-import-file: db-backup: @echo "Creating database backup..." @./scripts/export-database.sh --output backup_$(shell date +%Y%m%d_%H%M%S) + +# ============================================================================= +# Local Development (No Docker Required) +# ============================================================================= +# Use these commands to quickly check for TypeScript errors and linting issues +# without rebuilding Docker containers. + +.PHONY: install type-check lint build-local + +install: + @echo "Installing dependencies locally..." + @cd frontend && npm install + @cd backend && npm install + @echo "Dependencies installed!" + +type-check: + @echo "Running TypeScript type checks..." + @echo "Frontend:" + @cd frontend && npm run type-check + @echo "" + @echo "Backend:" + @cd backend && npm run type-check + @echo "" + @echo "Type checks complete!" + +lint: + @echo "Running linters..." + @echo "Frontend:" + @cd frontend && npm run lint + @echo "" + @echo "Backend:" + @cd backend && npm run lint + @echo "" + @echo "Linting complete!" + +build-local: + @echo "Building frontend and backend locally..." + @echo "Frontend:" + @cd frontend && npm run build + @echo "" + @echo "Backend:" + @cd backend && npm run build + @echo "" + @echo "Build complete! Check frontend/dist and backend/dist" diff --git a/backend/.gitignore b/backend/.gitignore new file mode 100644 index 0000000..525a0ca --- /dev/null +++ b/backend/.gitignore @@ -0,0 +1,22 @@ +# Dependencies +node_modules/ + +# Build output +dist/ + +# Test coverage +coverage/ +.nyc_output/ + +# Logs +*.log +npm-debug.log* + +# Environment +.env.local +.env.*.local + +# Editor +.DS_Store +*.swp +*.swo diff --git a/backend/package.json b/backend/package.json index 792b92a..e9292f3 100644 --- a/backend/package.json +++ b/backend/package.json @@ -14,7 +14,8 @@ "migrate:all": "ts-node src/_system/migrations/run-all.ts", "migrate:feature": "ts-node src/_system/migrations/run-feature.ts", "schema:generate": "ts-node src/_system/schema/generate.ts", - "lint": "eslint src" + "lint": "eslint src", + "type-check": "tsc --noEmit" }, "dependencies": { "pg": "^8.13.1",