搜索

PythonReactSEOPDF
GitHub Skill

project-setup

Standards for project structure, tooling, and configuration (justfile, uv, ruff, etc).

mschulkind☆ 1 仓库 Stars0 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Project Setup & Configuration Skill

This skill outlines the standard procedure for setting up and maintaining the kitchen project environment. It mandates specific tools for dependency management, task running, and code quality.

1. Directory Structure

  • docs/: Documentation root.
    • docs/plans/: Active planning documents and specifications.
    • docs/plans/decisions/: Architecture Decision Records (ADRs).
  • src/: Source code.
    • src/api/: Python FastAPI backend.
    • src/mobile/: React Native (Expo) frontend.
  • tests/: Test suites.
    • tests/api/: Backend unit/integration tests (pytest).
    • tests/web/: Frontend E2E tests (Playwright).
  • infra/docker/: Docker Compose configuration and volume templates.
  • phase0_flow/: Legacy recipe data and PDF generation (Phase 0).
  • scripts/: Utility scripts (e.g., mermaid linting).

2. Tooling Stack

  • Task Runner: just - The primary entry point for all developer tasks.
  • Python Management: uv - Fast package installer and resolver.
  • Node/JS Management: npm - Used for frontend dependencies and documentation tools.
  • Process Manager: hivemind - For running full-stack development environment (via Procfile.dev).
  • Environment Management: .mise.toml - Manages tool versions (python, node, uv).

3. Configuration Files

pyproject.toml (Python)

Configures ruff (linting/formatting), pytest (testing), and mypy (type checking).

[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["."]
asyncio_mode = "auto"
# Strict warnings policy
filterwarnings = ["error", "ignore::DeprecationWarning:hypothesis.*"]

[tool.ruff]
line-length = 100
target-version = "py313"

[tool.ruff.lint]
select = ["E", "W", "F", "I", "B", "C4", "UP", "ARG", "SIM"]
ignore = ["E501", "B008", "ARG002"] # ARG002 allows unused args in interfaces

[tool.mypy]
python_version = "3.13"
plugins = ["pydantic.mypy"]
disallow_untyped_defs = true # Strict typing
package.json (Root)

Handles markdown linting and diagram validation.

{
  "scripts": {
    "lint": "markdownlint '**/*.md' --ignore '**/node_modules/**'"
  }
}
justfile (Key Commands)

Use just <command> for all common tasks.

  • Setup: just setup (installs all python/js dependencies).
  • Dev (Full Stack): just dev-all (starts API, DB, and Frontend via Hivemind).
  • Dev (Frontend): just web (starts Expo web).
  • Dev (Backend): just dev-api (starts FastAPI with reload).
  • Infrastructure: just up (starts Docker stack), just down (stops it).
  • Quality: just check (runs lint, test, and typecheck).
  • Testing: just test (all), just test-py (backend), just test-e2e (frontend).

4. Workflow Standards

Development Loop
  1. Start Infra: just up-infra (or just dev-all for full stack).
  2. Code: Make changes in src/.
  3. Verify: Run just check before committing. This enforces:
    • Linting: ruff (Python), markdownlint (Docs), lint_mermaid.py (Diagrams).
    • Formatting: ruff format.
    • Type Checking: mypy (Strict mode).
    • Tests: pytest (Backend).
Database Management
  • Supabase Studio: Access local admin UI via just studio (http://localhost:5303).
  • Reset: just reset-stack wipes the database and restarts containers (Use with caution).
Documentation
  • Linting: All markdown files are linted. Mermaid diagrams within markdown are validated.
  • Structure: Keep the root clean. New documentation goes into docs/.

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-26
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!