Add local development build workflow

- 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 <noreply@anthropic.com>
This commit is contained in:
Eric Gullickson
2025-12-20 12:47:18 -06:00
parent 513df9c027
commit aa37ecfcd3
3 changed files with 75 additions and 2 deletions

View File

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