Files
Krow-workspace/Makefile
bwnyasse 80cd49deb5 feat(Makefile): install frontend dependencies on dev command
feat(Makefile): patch Layout.jsx queryKey for local development
feat(frontend-web): mock base44 client for local development with role switching
feat(frontend-web): add event assignment modal with conflict detection and bulk assign
feat(frontend-web): add client dashboard with key metrics and quick actions
feat(frontend-web): add layout component with role-based navigation
feat(frontend-web): update various pages to use "@/components" alias
feat(frontend-web): update create event page with ai assistant toggle
feat(frontend-web): update dashboard page with new components
feat(frontend-web): update events page with quick assign popover
feat(frontend-web): update invite vendor page with hover card
feat(frontend-web): update messages page with conversation list and message thread
feat(frontend-web): update operator dashboard page with new components
feat(frontend-web): update partner management page with new components
feat(frontend-web): update permissions page with new components
feat(frontend-web): update procurement dashboard page with new components
feat(frontend-web): update smart vendor onboarding page with new components
feat(frontend-web): update staff directory page with new components
feat(frontend-web): update teams page with new components
feat(frontend-web): update user management page with new components
feat(frontend-web): update vendor compliance page with new components
feat(frontend-web): update main.jsx to include react query provider

feat: add vendor marketplace page
feat: add global import fix to prepare-export script
feat: add patch-layout-query-key script to fix query key
feat: update patch-base44-client script to use a more robust method
2025-11-13 14:56:31 -05:00

89 lines
3.5 KiB
Makefile

# KROW Workforce Project Makefile
# -------------------------------
# This Makefile provides a central place for common project commands.
# It is designed to be the main entry point for developers.
# Use .PHONY to declare targets that are not files, to avoid conflicts.
.PHONY: install dev build prepare-export help
# The default command to run if no target is specified (e.g., just 'make').
.DEFAULT_GOAL := help
# Installs all project dependencies using npm.
install:
@echo "--> Installing web frontend dependencies..."
@cd frontend-web && npm install
# Starts the local development server.
dev:
@echo "--> Ensuring web frontend dependencies are installed..."
@cd frontend-web && npm install
@echo "--> Starting web frontend development server on http://localhost:5173 ..."
@cd frontend-web && npm run dev
# Builds the application for production.
build:
@echo "--> Building web frontend for production..."
@cd frontend-web && npm run build
# Integrates a new Base44 export into the current project.
# It replaces the src directory and the index.html file in the frontend-web directory.
# Prerequisite: The new export must be in a folder named '../krow-workforce-export-latest'.
integrate-export:
@echo "--> Integrating new Base44 export into frontend-web/..."
@if [ ! -d "../krow-workforce-export-latest" ]; then \
echo "❌ Error: Export directory '../krow-workforce-export-latest' not found."; \
exit 1; \
fi
@echo " - Removing old src directory..."
@rm -rf frontend-web/src
@echo " - Copying new src directory..."
@cp -R ../krow-workforce-export-latest/src ./frontend-web/src
@echo " - Copying new index.html..."
@cp ../krow-workforce-export-latest/index.html ./frontend-web/index.html
@echo " - Patching base44Client.js for local development..."
@node scripts/patch-base44-client.js
@echo " - Patching queryKey in Layout.jsx for local development..."
@node scripts/patch-layout-query-key.js
@echo "--> Integration complete. Next step: 'make prepare-export'."
# Applies all necessary patches to a fresh Base44 export to run it locally.
# This is the main command for the hybrid workflow.
prepare-export:
@echo "--> Preparing fresh Base44 export for local development..."
@node scripts/prepare-export.js
@echo "--> Preparation complete. You can now run 'make dev'."
# Shows this help message.
help:
@echo "--------------------------------------------------"
@echo " KROW Workforce - Available Makefile Commands"
@echo "--------------------------------------------------"
@echo " make install - Installs web frontend dependencies."
@echo " make dev - Starts the local web frontend server."
@echo " make build - Builds the web frontend for production."
@echo " make integrate-export - Integrates a new Base44 export from '../krow-workforce-export-latest'."
@echo " make prepare-export - Prepares a fresh Base44 export for local use."
@echo " make help - Shows this help message."
@echo "--------------------------------------------------"
# --- Project Management ---
setup-labels:
@echo "--> Setting up GitHub labels..."
@./scripts/setup-github-labels.sh
export-issues:
@echo "--> Exporting GitHub issues to documentation..."
@./scripts/export_issues.sh
create-issues-from-file:
@echo "--> Creating GitHub issues from file..."
@./scripts/create_issues.py
# --- Development Tools ---
install-git-hooks:
@echo "--> Installing Git hooks..."
@ln -sf ../../scripts/git-hooks/pre-push .git/hooks/pre-push
@echo "✅ pre-push hook installed successfully. Direct pushes to 'main' and 'dev' are now blocked."