- 根目录加入 docker-compose、Caddyfile、文档等原本不在仓库里的文件 - 前后端两份 GitHub Actions 合并成根目录的一个 deploy workflow: 构建前端上传到 build/,再在服务器上 git pull 并重建容器 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 inaccount/,task/,submission/,prompt/, andutils/.client/contains the Vue 3 + TypeScript SPA. Route views are inclient/src/pages/, shared UI inclient/src/components/, state inclient/src/store/, and helpers/types inclient/src/utils/.client/public/stores browser assets.build/,data/,media/, andredis/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 inbuild/.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.