add justfile for dev workflows and SvelteKit frontend prep

- created justfile with common dev commands for both backend and frontend
- organized commands into groups (backend, frontend, database, development)
- includes recipes for: serve, dev, lint, format, check, test, build, etc.
- cloned HuggingChat (huggingface/chat-ui) to sandbox as SvelteKit reference
- updated CLAUDE.md with SvelteKit frontend notes and justfile usage

ready to scaffold SvelteKit frontend next.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

Changed files
+112 -1
+3 -1
CLAUDE.md
··· 8 8 - **atproto client**: always pass PDS URL at initialization to avoid JWT issues 9 9 - **auth**: using app password authentication for MVP (OAuth support being added upstream) 10 10 - **storage**: filesystem for MVP, will migrate to R2 later 11 - - **database**: delete `relay.db` when Track model changes (no migrations yet) 11 + - **database**: delete `data/relay.db` when Track model changes (no migrations yet) 12 + - **frontend**: SvelteKit - reference project in `sandbox/huggingchat-ui` for patterns 13 + - **justfile**: use `just` for all dev workflows (see `just --list`)
+109
justfile
··· 1 + # relay justfile - common dev workflows 2 + 3 + # default recipe shows all available commands 4 + default: 5 + @just --list 6 + 7 + # ==================== 8 + # backend (python/fastapi) 9 + # ==================== 10 + 11 + # install python dependencies 12 + install: 13 + uv sync 14 + 15 + # run backend dev server 16 + serve: 17 + uv run uvicorn relay.main:app --reload --host 0.0.0.0 --port 8000 18 + 19 + # run pre-commit hooks 20 + lint: 21 + uv run pre-commit run --all-files 22 + 23 + # run python tests 24 + test: 25 + uv run pytest 26 + 27 + # type check python code 28 + typecheck: 29 + uv run pyright 30 + 31 + # ==================== 32 + # frontend (sveltekit) 33 + # ==================== 34 + 35 + # install frontend dependencies 36 + [group('frontend')] 37 + fe-install: 38 + cd frontend && npm install 39 + 40 + # run frontend dev server 41 + [group('frontend')] 42 + fe-dev: 43 + cd frontend && npm run dev 44 + 45 + # build frontend for production 46 + [group('frontend')] 47 + fe-build: 48 + cd frontend && npm run build 49 + 50 + # preview production frontend build 51 + [group('frontend')] 52 + fe-preview: 53 + cd frontend && npm run preview 54 + 55 + # check frontend types and svelte errors 56 + [group('frontend')] 57 + fe-check: 58 + cd frontend && npm run check 59 + 60 + # lint frontend code 61 + [group('frontend')] 62 + fe-lint: 63 + cd frontend && npm run lint 64 + 65 + # format frontend code 66 + [group('frontend')] 67 + fe-format: 68 + cd frontend && npm run format 69 + 70 + # run frontend tests 71 + [group('frontend')] 72 + fe-test: 73 + cd frontend && npm run test 74 + 75 + # ==================== 76 + # database 77 + # ==================== 78 + 79 + # delete database (requires fresh start) 80 + db-reset: 81 + rm -f data/relay.db 82 + @echo "database deleted - will be recreated on next server start" 83 + 84 + # ==================== 85 + # development 86 + # ==================== 87 + 88 + # run both backend and frontend in parallel 89 + dev: 90 + #!/usr/bin/env bash 91 + trap 'kill 0' EXIT 92 + just serve & 93 + just fe-dev & 94 + wait 95 + 96 + # format all code (python + frontend) 97 + format: fe-format 98 + uv run ruff format . 99 + 100 + # check everything (lint + typecheck + test) 101 + check: lint typecheck fe-check fe-lint test fe-test 102 + @echo "✓ all checks passed" 103 + 104 + # clean all generated files 105 + clean: 106 + rm -rf frontend/node_modules frontend/.svelte-kit frontend/build 107 + rm -rf .venv 108 + rm -f data/relay.db 109 + @echo "cleaned all generated files"