add dev setup/run scripts and Resend test email docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Deeman
2026-02-18 12:16:37 +01:00
parent b99cd3c7d8
commit 77da44f3c8
5 changed files with 251 additions and 1 deletions

62
padelnomics/scripts/dev_run.sh Executable file
View File

@@ -0,0 +1,62 @@
#!/usr/bin/env bash
# Start all Padelnomics dev processes with colored, labeled output.
#
# Usage: ./scripts/dev_run.sh
#
# Starts: app (port 5000), background worker, CSS watcher.
# Ctrl-C stops everything cleanly.
set -euo pipefail
cd "$(dirname "$0")/.."
# -- Colors for each process -------------------------------------------------
COLOR_APP='\033[0;36m' # cyan
COLOR_WORKER='\033[0;33m' # yellow
COLOR_CSS='\033[0;35m' # magenta
NC='\033[0m'
BOLD='\033[1m'
PIDS=()
cleanup() {
echo ""
echo -e "${BOLD}Stopping all processes...${NC}"
for pid in "${PIDS[@]}"; do
kill "$pid" 2>/dev/null || true
done
wait 2>/dev/null || true
echo "Done."
exit 0
}
trap cleanup SIGINT SIGTERM
# Prefix each line of a command's output with a colored label.
# Usage: run_with_label COLOR LABEL COMMAND...
run_with_label() {
local color="$1" label="$2"
shift 2
"$@" 2>&1 | while IFS= read -r line; do
echo -e "${color}[${label}]${NC} ${line}"
done &
PIDS+=($!)
}
# -- Start processes ---------------------------------------------------------
echo -e "${BOLD}Starting Padelnomics dev environment${NC}"
echo ""
echo " app: http://localhost:5000"
echo " admin: http://localhost:5000/admin"
echo " login: http://localhost:5000/auth/dev-login?email=dev@localhost"
echo ""
echo "Press Ctrl-C to stop all processes."
echo ""
run_with_label "$COLOR_APP" "app " uv run python -m padelnomics.app
run_with_label "$COLOR_WORKER" "worker" uv run python -m padelnomics.worker
run_with_label "$COLOR_CSS" "css " make css-watch
wait