backend/FastAPI proxy service; entryapp.py, settingsconfig.py, logic inservices/, routes inrouters/, helpers inutils/.frontend/Vue 3 + TypeScript dashboard; pages inviews/, shared UI incomponents/, API wrappers inservices/, stores instores/, composables incomposables/, styles instyle.css.static/holds built frontend assets;env/stores deploy configs like.env.headers.json;docs/,scripts/,tests/contain docs, tooling, and Python checks.
- Backend setup and run:
pip install -r backend/requirements.txt python -m backend.app # start server at :8088 # or hot reload uvicorn backend.app:app --reload --port 8088
- Frontend workflow (prefers pnpm because
pnpm-lock.yamlis present):cd frontend pnpm install pnpm dev # Vite dev server pnpm build # outputs to ../static for backend to serve pnpm preview # preview production build pnpm type-check # TypeScript only
- Tests and checks (run from repo root):
python tests/test_encoding.py # encoding utility coverage python tests/test_imports.py # module import/syntax sanity python tests/test_integration.py # end-to-end structure chain
- Docker:
docker-compose up -dto start full stack; rebuild withdocker-compose up -d --build --remove-orphans.
- Python: 4-space indent, type hints, routing in
routers/, request shaping inservices/; avoid global mutable state; load config from.env. Helpers belong inutils/. - Vue/TS: 2-space indent,
<script setup lang="ts">, PascalCase component files (Dashboard.vue), composablesuseX, Pinia storesuseNameStore, API clients underservices/returning typed results. Prefer single quotes and no semicolons. - Built assets in
static/stay untracked; keep env values inenv/and.env.example.
- Keep backend checks lightweight under
tests/with print-based reporting. - Extend
test_imports.pyfor import coverage and add focused scripts similar totest_encoding.py. - Frontend changes should at least pass
pnpm type-check; add targeted tests for logic-heavy modules.
- Use Conventional Commit prefixes seen in history:
feat: ...,feat(scope): ...,docs: ...,test: ...; keep messages concise. - PRs should summarize changes, list manual test steps or scripts run, link issues, and include screenshots/GIFs for UI updates.
- Never commit secrets; keep runtime values in
.envand header overrides inenv/.env.headers.json(copy from.env.headers.json.example). Document proxy variables (HTTP_PROXY,HTTPS_PROXY) when needed. - Validate upstream targets via
API_BASE_URL; keep admin panel (/admin) behind appropriate network controls.