Files
web/AGENTS.md
T
xuyueandClaude Opus 5.5 47d4679984 chore: 合并为单仓库,统一部署流程
- 根目录加入 docker-compose、Caddyfile、文档等原本不在仓库里的文件
- 前后端两份 GitHub Actions 合并成根目录的一个 deploy workflow:
  构建前端上传到 build/,再在服务器上 git pull 并重建容器

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 16:02:12 +08:00

2.1 KiB

Repository Guidelines

Project Structure & Module Organization

WebPreview is a Django API plus Vue 3 client.

  • api/ contains the Django project. api/api/ holds settings and URLs; feature apps live in account/, task/, submission/, prompt/, and utils/.
  • client/ contains the Vue 3 + TypeScript SPA. Route views are in client/src/pages/, shared UI in client/src/components/, state in client/src/store/, and helpers/types in client/src/utils/.
  • client/public/ stores browser assets. build/, data/, media/, and redis/ are generated or runtime directories.
  • docs/ stores design and implementation plans.

Build and Development Commands

  • ./dev.sh: starts the Django API and Rsbuild frontend together for local development.
  • cd api && uv run manage.py runserver: run only the backend.
  • cd api && uv run manage.py migrate: apply Django migrations.
  • cd client && npm run start: start the frontend dev server.
  • cd client && npm run build: create the production client build in build/.
  • cd client && npm run fmt: format frontend source with Prettier.
  • docker compose up -d --build: rebuild and start the Docker stack.

Coding Style & Naming Conventions

Use 4-space indentation for Python and follow Django app conventions: models in models.py, handlers in api.py or router files, schemas in schemas.py, and migrations in migrations/. Use snake_case for functions and variables.

Frontend code uses Vue single-file components, TypeScript strict mode, and Prettier. Name components/pages in PascalCase.vue, and keep store modules domain-based, such as submission.ts.

Commit & Pull Request Guidelines

This checkout lacks readable Git history, so use concise imperative commit messages such as Add showcase management view. Pull requests should describe the behavior change, list build/manual verification steps, link issues or plans, and include screenshots for visible UI changes.

Security & Configuration Tips

Keep secrets in .env and do not commit credentials or generated runtime data. The API uses environment-driven settings for database, Redis, and LLM provider configuration.