# --- Core Web Development ---

.PHONY: install dev build deploy-app

install:
	@echo "--> Installing web frontend dependencies..."
	@cd apps/web-dashboard && npm install

dev:
	@echo "--> Ensuring web frontend dependencies are installed..."
	@cd apps/web-dashboard && npm install
	@echo "--> Starting web frontend development server on http://localhost:5173 ..."
	@cd apps/web-dashboard && npm run dev

build:
	@echo "--> Building web frontend for production..."
	@cd apps/web-dashboard && VITE_APP_ENV=$(ENV) npm run build

deploy-app: build
	@echo "--> Deploying Frontend Web App to [$(ENV)] environment..."
	@firebase deploy --only hosting:$(HOSTING_TARGET) --project=$(FIREBASE_ALIAS)
