diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 000000000..8fdddb682 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,51 @@ +name: Bug report +description: Something isn't working correctly +labels: [bug] +body: + - type: textarea + id: description + attributes: + label: Description + description: What happened? What did you expect instead? + validations: + required: true + + - type: textarea + id: steps + attributes: + label: Steps to reproduce + description: Minimal steps to trigger the bug. + placeholder: | + 1. Open a .fig file with … + 2. Click on … + 3. See error + + - type: textarea + id: file + attributes: + label: File + description: If the bug involves a specific .fig file, attach it or link to the original Figma file. + + - type: dropdown + id: platform + attributes: + label: Platform + options: + - Web (app.openpencil.dev) + - macOS (Tauri) + - Windows (Tauri) + - Linux (Tauri) + validations: + required: true + + - type: input + id: browser + attributes: + label: Browser (web only) + placeholder: Chrome 131, Safari 18, Firefox 133 + + - type: textarea + id: screenshots + attributes: + label: Screenshots + description: If applicable, add screenshots or screen recordings. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..0086358db --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 000000000..16cf7af92 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,23 @@ +name: Feature request +description: Suggest an improvement or new capability +labels: [enhancement] +body: + - type: textarea + id: description + attributes: + label: Description + description: What would you like to see? How would it work? + validations: + required: true + + - type: textarea + id: use-case + attributes: + label: Use case + description: What problem does this solve? How do you work around it today? + + - type: textarea + id: figma-reference + attributes: + label: Figma reference + description: If this exists in Figma, describe how it works there. Screenshots welcome. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..63e63514a --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +Fixes # + +--- + +**Checklist:** +- [ ] `bun run check` passes (lint + typecheck) +- [ ] Tests added or updated +- [ ] CHANGELOG.md updated (if user-facing) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..65cd5c553 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: CI + +on: + pull_request: + branches: [master] + paths-ignore: + - 'packages/docs/**' + - 'openspec/**' + - '*.md' + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: oven-sh/setup-bun@v2 + + - uses: actions/cache@v4 + with: + path: ~/.bun/install/cache + key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }} + restore-keys: bun-${{ runner.os }}- + + - run: bun install --frozen-lockfile + + - name: Lint + run: bun run lint + + - name: Typecheck + run: bunx tsgo --noEmit + + - name: Unit tests + run: bun test tests/engine/ + + - name: Copy-paste detection + run: bun run test:dupes diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..972042af9 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,52 @@ +# Contributing + +## Setup + +```bash +git clone https://github.com/open-pencil/open-pencil.git +cd open-pencil +bun install +``` + +## Development + +```bash +bun run dev # Vite dev server on localhost:1420 +bun run tauri dev # Tauri desktop app with hot reload +``` + +## Quality checks + +Run all of these before submitting a PR: + +```bash +bun run check # oxlint + typecheck +bun run format # oxfmt with import sorting +bun run test:dupes # jscpd < 3% duplication +bun test tests/engine/ # unit tests +bun run test # Playwright E2E (requires dev server) +``` + +## Project structure + +- `packages/core` — scene graph, renderer, layout, codec (zero DOM deps) +- `packages/cli` — headless CLI for .fig inspection and export +- `packages/mcp` — MCP server for AI tools (stdio + HTTP) +- `src/` — Tauri/Vite desktop editor + +## Conventions + +- Bun runtime, not Node +- Tailwind 4 for styles, no inline CSS or `