-
Notifications
You must be signed in to change notification settings - Fork 0
Change branding #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kingsley-ijomah
wants to merge
2
commits into
main
Choose a base branch
from
change-branding
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,160 @@ | ||
| # Pandora Jewelry Store - Makefile | ||
| # FastAPI Backend + Angular Frontend | ||
|
|
||
| .PHONY: help install install-backend install-frontend dev start start-backend start-frontend build test test-backend test-frontend lint format clean | ||
|
|
||
| # Virtual environment path | ||
| VENV := backend/venv | ||
| PYTHON := $(VENV)/bin/python | ||
| PIP := $(VENV)/bin/pip | ||
|
|
||
| # Default target | ||
| help: | ||
| @echo "Pandora Jewelry Store - Development Commands" | ||
| @echo "" | ||
| @echo "Setup:" | ||
| @echo " make install - Install all dependencies (backend + frontend)" | ||
| @echo " make install-backend - Create venv and install backend Python dependencies" | ||
| @echo " make install-frontend - Install frontend Node.js dependencies" | ||
| @echo "" | ||
| @echo "Development:" | ||
| @echo " make dev - Start both backend and frontend (parallel)" | ||
| @echo " make start-backend - Start backend server only (port 8000)" | ||
| @echo " make start-frontend - Start frontend dev server only (port 4210)" | ||
| @echo "" | ||
| @echo "Build & Test:" | ||
| @echo " make build - Build frontend for production" | ||
| @echo " make test - Run all tests" | ||
| @echo " make test-backend - Run backend tests only" | ||
| @echo " make test-frontend - Run frontend tests only" | ||
| @echo "" | ||
| @echo "Code Quality:" | ||
| @echo " make lint - Run linters on both projects" | ||
| @echo " make format - Format code in both projects" | ||
| @echo "" | ||
| @echo "Cleanup:" | ||
| @echo " make clean - Remove build artifacts and caches" | ||
|
|
||
| # ============================================================================ | ||
| # Installation | ||
| # ============================================================================ | ||
|
|
||
| install: install-backend install-frontend | ||
| @echo "All dependencies installed successfully!" | ||
|
|
||
| # Create virtual environment if it doesn't exist | ||
| $(VENV)/bin/activate: | ||
| @echo "Creating virtual environment..." | ||
| python3 -m venv $(VENV) | ||
|
|
||
| install-backend: $(VENV)/bin/activate | ||
| @echo "Installing backend dependencies in virtual environment..." | ||
| $(PIP) install --upgrade pip | ||
| $(PIP) install -r backend/requirements.txt | ||
| @echo "Backend dependencies installed in $(VENV)" | ||
|
|
||
| install-frontend: | ||
| @echo "Installing frontend dependencies..." | ||
| cd frontend && npm install | ||
|
|
||
| # ============================================================================ | ||
| # Development | ||
| # ============================================================================ | ||
|
|
||
| # Start both services in parallel | ||
| # Note: This uses background processes - use Ctrl+C to stop both | ||
| dev: | ||
| @echo "Starting development servers..." | ||
| @echo "Backend: http://localhost:8000" | ||
| @echo "Frontend: http://localhost:4210" | ||
| @echo "API Docs: http://localhost:8000/docs" | ||
| @echo "" | ||
| @echo "Press Ctrl+C to stop both servers" | ||
| @trap 'kill 0' INT; \ | ||
| (cd backend && ../$(VENV)/bin/python main.py) & \ | ||
| (cd frontend && npm start) & \ | ||
| wait | ||
|
|
||
| start-backend: | ||
| @echo "Starting backend server on http://localhost:8000..." | ||
| cd backend && ../$(VENV)/bin/python main.py | ||
|
|
||
| start-frontend: | ||
| @echo "Starting frontend dev server on http://localhost:4210..." | ||
| cd frontend && npm start | ||
|
|
||
| # ============================================================================ | ||
| # Build | ||
| # ============================================================================ | ||
|
|
||
| build: | ||
| @echo "Building frontend for production..." | ||
| cd frontend && npm run build | ||
| @echo "Build complete! Output in frontend/dist/" | ||
|
|
||
| # ============================================================================ | ||
| # Testing | ||
| # ============================================================================ | ||
|
|
||
| test: test-backend test-frontend | ||
| @echo "All tests completed!" | ||
|
|
||
| test-backend: | ||
| @echo "Running backend tests..." | ||
| cd backend && ../$(VENV)/bin/pytest -v | ||
|
|
||
| test-frontend: | ||
| @echo "Running frontend tests..." | ||
| cd frontend && npm test -- --watch=false --browsers=ChromeHeadless | ||
|
|
||
| # ============================================================================ | ||
| # Code Quality | ||
| # ============================================================================ | ||
|
|
||
| lint: lint-backend lint-frontend | ||
| @echo "Linting completed!" | ||
|
|
||
| lint-backend: | ||
| @echo "Linting backend..." | ||
| cd backend && ../$(VENV)/bin/python -m flake8 app/ --max-line-length=100 || true | ||
| cd backend && ../$(VENV)/bin/python -m mypy app/ --ignore-missing-imports || true | ||
|
|
||
| lint-frontend: | ||
| @echo "Linting frontend..." | ||
| cd frontend && npm run lint || true | ||
|
|
||
| format: format-backend format-frontend | ||
| @echo "Formatting completed!" | ||
|
|
||
| format-backend: | ||
| @echo "Formatting backend..." | ||
| cd backend && ../$(VENV)/bin/python -m black app/ tests/ || true | ||
| cd backend && ../$(VENV)/bin/python -m isort app/ tests/ || true | ||
|
|
||
| format-frontend: | ||
| @echo "Formatting frontend..." | ||
| @# Add prettier or other formatter if configured | ||
|
|
||
| # ============================================================================ | ||
| # Cleanup | ||
| # ============================================================================ | ||
|
|
||
| clean: | ||
| @echo "Cleaning up build artifacts..." | ||
| # Frontend | ||
| rm -rf frontend/dist | ||
| rm -rf frontend/node_modules/.cache | ||
| rm -rf frontend/.angular | ||
| # Backend | ||
| find backend -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true | ||
| find backend -type d -name .pytest_cache -exec rm -rf {} + 2>/dev/null || true | ||
| find backend -type d -name htmlcov -exec rm -rf {} + 2>/dev/null || true | ||
| find backend -type f -name "*.pyc" -delete 2>/dev/null || true | ||
| find backend -type f -name ".coverage" -delete 2>/dev/null || true | ||
| @echo "Cleanup complete!" | ||
|
|
||
| clean-all: clean | ||
| @echo "Removing virtual environment and node_modules..." | ||
| rm -rf $(VENV) | ||
| rm -rf frontend/node_modules | ||
| @echo "Full cleanup complete!" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent branding: The help text still references "Pandora Jewelry Store" but should be updated to match the new tea store branding.