chore(dx): consolidate commands behind make + add editor config

- Make is the canonical interface; pnpm scripts wrap turbo, make wraps pnpm
- CI now calls `make ci-web` / `make ci-desktop` so local == CI
- Add .nvmrc (node 24, matches CI) + engines field
- Add .editorconfig and .vscode (extensions + settings)
- Add `pnpm bootstrap` (deps + Playwright Chromium)
- Add `dev:web` / `dev:desktop` shortcuts
- CONTRIBUTING.md: lead with `make bootstrap`/`make dev-web`,
  link Tauri prereqs, fix wrong `pnpm dev` claim
- CLAUDE.md: command table reflects make-first workflow
This commit is contained in:
Offending Commit
2026-05-03 17:18:09 -05:00
parent 4a69c7d2a9
commit 3690cf0814
10 changed files with 145 additions and 32 deletions

19
.editorconfig Normal file
View File

@@ -0,0 +1,19 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
indent_style = tab
indent_size = 2
[*.{md,mdx}]
trim_trailing_whitespace = false
[*.{yml,yaml,toml}]
indent_style = space
indent_size = 2
[*.json]
indent_style = tab

View File

@@ -15,7 +15,7 @@ jobs:
- uses: ./.github/actions/setup - uses: ./.github/actions/setup
- run: pnpm turbo lint typecheck test build --filter=@openconcho/web - run: make ci-web
cargo-check: cargo-check:
name: Rust compile check name: Rust compile check
@@ -36,7 +36,7 @@ jobs:
- uses: ./.github/actions/setup - uses: ./.github/actions/setup
- run: pnpm turbo cargo-check --filter=@openconcho/desktop - run: make ci-desktop
release: release:
name: Release name: Release

1
.gitignore vendored
View File

@@ -15,6 +15,7 @@ dist-ssr
# Editor directories and files # Editor directories and files
.vscode/* .vscode/*
!.vscode/extensions.json !.vscode/extensions.json
!.vscode/settings.json
.idea .idea
.DS_Store .DS_Store
*.suo *.suo

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
24

10
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,10 @@
{
"recommendations": [
"biomejs.biome",
"tauri-apps.tauri-vscode",
"rust-lang.rust-analyzer",
"bradlc.vscode-tailwindcss",
"editorconfig.editorconfig",
"ms-playwright.playwright"
]
}

26
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,26 @@
{
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.biome": "explicit"
},
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
},
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"search.exclude": {
"**/node_modules": true,
"**/dist": true,
"**/.turbo": true,
"**/playwright-report": true,
"**/test-results": true,
"**/src-tauri/target": true,
"**/pnpm-lock.yaml": true,
"packages/web/src/api/schema.d.ts": true,
"packages/web/src/routeTree.gen.ts": true
},
"files.associations": {
".releaserc.json": "jsonc"
}
}

View File

@@ -4,15 +4,19 @@ Frontend UI for self-hosted Honcho instances — browse memories, peers, session
## Commands ## Commands
`make` is the canonical interface; it shells out to pnpm scripts which shell out to turborepo. CI calls the same targets — `make help` lists everything.
| Command | Purpose | | Command | Purpose |
|---------|---------| |---------|---------|
| `pnpm dev` | Launch Tauri desktop app (also starts the web dev server) | | `make bootstrap` | Install deps + Playwright Chromium (run once after clone) |
| `pnpm --filter @openconcho/web dev` | Web-only dev server on http://localhost:5173 | | `make dev-web` | Vite dev server on http://localhost:5173 |
| `pnpm build` | Turbo: build web + desktop | | `make dev-desktop` (or `make dev`) | Tauri desktop app |
| `pnpm lint` | Turbo: Biome check across packages | | `make build` | Turbo: build web + desktop |
| `pnpm typecheck` | Turbo: tsc --noEmit across packages | | `make lint` | Biome check |
| `pnpm test` | Turbo: Vitest (unit + integration), excludes `e2e/` | | `make typecheck` | tsc --noEmit |
| `pnpm test:e2e` | Turbo: Playwright e2e (uncached) | | `make test` | Vitest (unit + integration), excludes `e2e/` |
| `make test-e2e` | Playwright e2e (uncached) |
| `make check` | lint + typecheck + test |
| `pnpm --filter @openconcho/web generate:api` | Regen `src/api/schema.d.ts` from `openapi.json` | | `pnpm --filter @openconcho/web generate:api` | Regen `src/api/schema.d.ts` from `openapi.json` |
## Structure ## Structure

View File

@@ -13,26 +13,37 @@ Thanks for your interest in helping out. This is a small, focused project — pl
```bash ```bash
git clone https://github.com/offendingcommit/openconcho.git git clone https://github.com/offendingcommit/openconcho.git
cd openconcho cd openconcho
pnpm install make bootstrap # installs deps + Playwright Chromium
pnpm dev # web dev server at http://localhost:5173 make dev-web # web dev server at http://localhost:5173
``` ```
Run `make help` to see every target. Make is the canonical interface — CI calls
the same targets, so anything that passes locally will pass in CI.
Node 24 is what CI runs (`.nvmrc`); pnpm version is pinned via the
`packageManager` field — `corepack enable` and it just works.
VS Code users: workspace recommends Biome, Tauri, rust-analyzer, Tailwind,
EditorConfig, and Playwright extensions on first open.
For desktop work: For desktop work:
```bash ```bash
pnpm --filter @openconcho/desktop dev make dev-desktop # alias: make dev
``` ```
Tauri needs system dependencies (WebKit, etc.) — see the
[Tauri prerequisites guide](https://tauri.app/start/prerequisites/) for your OS.
## Before opening a PR ## Before opening a PR
```bash ```bash
pnpm lint # Biome lint make check # lint + typecheck + unit/integration tests
pnpm typecheck # tsc --noEmit make test-e2e # Playwright (requires `make bootstrap` first)
pnpm test # Vitest make build # full build
pnpm build # full build
``` ```
All four must pass. CI will block the merge otherwise. CI will block the merge otherwise.
## Coding standards ## Coding standards
@@ -49,7 +60,7 @@ The full standards live in [`.claude/rules/coding-standards.md`](.claude/rules/c
`src/api/schema.d.ts` is generated. Don't edit it by hand — run: `src/api/schema.d.ts` is generated. Don't edit it by hand — run:
```bash ```bash
pnpm generate:api pnpm --filter @openconcho/web generate:api
``` ```
…after updating `openapi.json`. …after updating `openapi.json`.

View File

@@ -1,22 +1,51 @@
.PHONY: dev build test lint lint-fix typecheck install # Single source of truth for repo commands. CI calls these targets too,
# so anything that works in `make` locally works in `make` on a runner.
# Targets delegate to pnpm scripts, which delegate to turborepo.
dev: .PHONY: bootstrap dev dev-web dev-desktop \
pnpm --filter @openconcho/desktop dev build test test-e2e lint lint-fix typecheck check \
ci-web ci-desktop install help
build: help:
pnpm turbo run build @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS=":.*?## "}; {printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}'
test: bootstrap: ## Install deps + Playwright Chromium (run once after clone)
pnpm turbo run test pnpm bootstrap
lint: dev: dev-desktop ## Alias for `dev-desktop`
pnpm turbo run lint
lint-fix: dev-web: ## Vite dev server at http://localhost:5173
pnpm exec biome check --write packages/web/src/ pnpm dev:web
typecheck: dev-desktop: ## Tauri desktop app
pnpm turbo run typecheck pnpm dev:desktop
install: build: ## Turbo: build all packages
pnpm build
test: ## Vitest (unit + integration)
pnpm test
test-e2e: ## Playwright e2e (requires bootstrap)
pnpm test:e2e
lint: ## Biome lint check
pnpm lint
lint-fix: ## Biome lint + format auto-fix
pnpm lint:fix
typecheck: ## tsc --noEmit across packages
pnpm typecheck
check: ## lint + typecheck + test
pnpm check
ci-web: ## CI: lint + typecheck + test + build for @openconcho/web
pnpm ci:web
ci-desktop: ## CI: cargo-check for @openconcho/desktop
pnpm ci:desktop
install: ## pnpm install (no playwright)
pnpm install pnpm install

View File

@@ -3,13 +3,25 @@
"private": true, "private": true,
"version": "0.5.2", "version": "0.5.2",
"packageManager": "pnpm@10.33.2", "packageManager": "pnpm@10.33.2",
"engines": {
"node": ">=22",
"pnpm": ">=10"
},
"scripts": { "scripts": {
"bootstrap": "pnpm install && pnpm exec playwright install --with-deps chromium",
"dev": "pnpm --filter @openconcho/desktop dev", "dev": "pnpm --filter @openconcho/desktop dev",
"dev:web": "pnpm --filter @openconcho/web dev",
"dev:desktop": "pnpm --filter @openconcho/desktop dev",
"build": "turbo run build", "build": "turbo run build",
"lint": "turbo run lint", "lint": "turbo run lint",
"lint:fix": "biome check --write .",
"format": "biome format --write .",
"test": "turbo run test", "test": "turbo run test",
"test:e2e": "turbo run test:e2e", "test:e2e": "turbo run test:e2e",
"typecheck": "turbo run typecheck", "typecheck": "turbo run typecheck",
"check": "turbo run lint typecheck test",
"ci:web": "turbo run lint typecheck test build --filter=@openconcho/web",
"ci:desktop": "turbo run cargo-check --filter=@openconcho/desktop",
"prepare": "husky" "prepare": "husky"
}, },
"devDependencies": { "devDependencies": {