Thanks for being interested. This is a small project; the bar is correctness + taste, not paperwork.
# Backend with auto-reload
py -m uvicorn server.main:app --reload --port 8765
# Frontend dev (hot reload, proxies /api and /ws to 8765)
cd web
npm run devOpen http://localhost:5173 — Vite proxies API and WebSocket calls to the FastAPI on 8765.
- Lint / typecheck the frontend:
cd web && npm run buildmust pass cleanly (TS strict). - Don't commit secrets: anything under
server/data/except*.example.*and.gitkeepis gitignored — keep it that way. - Don't commit binaries:
bin/gallery-dl.exeis fetched byscripts/setup.ps1. - Bilingual README: if you change
README.mdsubstantively, mirror the change inREADME.zh-CN.md(or note in the PR that it's a follow-up).
- Type hints on public functions.
- Module docstrings explain why the module exists; let function names explain what they do.
- Long functions (>80 lines) → split.
subprocess.Popenfor anygallery-dlcall — never.run()/.communicate(). Streaming is the entire point.
- Functional components only.
- One Zustand store (
web/src/lib/store.ts); avoid prop drilling. - Tailwind utility classes; reuse the named primitives in
web/src/index.css(panel,btn-primary,btn-ghost,input,chip,label) before inventing new ones. - Single accent color (emerald‑400). Reds for errors, ambers for warnings. Don't introduce a third hue.
- Monospace for any data: usernames, paths, log lines, raw numbers.
- Imperative mood: "fix progress bar sweep range" not "fixed" or "fixes".
- One concern per commit; rebase / squash before opening the PR if helpful.
Open an issue with:
- What you expected vs. what happened.
server.logtail (redact cookies if any leak in).- Browser console output (open DevTools).
- gallery‑dl version (
./bin/gallery-dl.exe --version) and InstaHam commit SHA.
- macOS / Linux launcher scripts (currently Windows‑only).
- Concurrent per‑user downloads (right now
concurrencyis a hint, not enforced —core/gallery_dl.pyruns serially). - Localization beyond zh‑CN / en.
- Pyinstaller single‑exe packaging.
- Tests for
output_parser.pyagainst captured gallery‑dl logs.