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",