Skip to content

Commit 2b0844d

Browse files
Merge pull request #6 from offendingcommit/docs/claude-md-refresh
chore(dx): refresh CLAUDE.md, consolidate commands behind make, add editor config
2 parents 7ff16f9 + 3690cf0 commit 2b0844d

10 files changed

Lines changed: 160 additions & 38 deletions

File tree

.editorconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
indent_style = tab
9+
indent_size = 2
10+
11+
[*.{md,mdx}]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml,toml}]
15+
indent_style = space
16+
indent_size = 2
17+
18+
[*.json]
19+
indent_style = tab

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
- uses: ./.github/actions/setup
1717

18-
- run: pnpm turbo lint typecheck test build --filter=@openconcho/web
18+
- run: make ci-web
1919

2020
cargo-check:
2121
name: Rust compile check
@@ -36,7 +36,7 @@ jobs:
3636

3737
- uses: ./.github/actions/setup
3838

39-
- run: pnpm turbo cargo-check --filter=@openconcho/desktop
39+
- run: make ci-desktop
4040

4141
release:
4242
name: Release

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ dist-ssr
1515
# Editor directories and files
1616
.vscode/*
1717
!.vscode/extensions.json
18+
!.vscode/settings.json
1819
.idea
1920
.DS_Store
2021
*.suo

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24

.vscode/extensions.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"recommendations": [
3+
"biomejs.biome",
4+
"tauri-apps.tauri-vscode",
5+
"rust-lang.rust-analyzer",
6+
"bradlc.vscode-tailwindcss",
7+
"editorconfig.editorconfig",
8+
"ms-playwright.playwright"
9+
]
10+
}

.vscode/settings.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"editor.defaultFormatter": "biomejs.biome",
3+
"editor.formatOnSave": true,
4+
"editor.codeActionsOnSave": {
5+
"source.fixAll.biome": "explicit"
6+
},
7+
"[rust]": {
8+
"editor.defaultFormatter": "rust-lang.rust-analyzer"
9+
},
10+
"typescript.tsdk": "node_modules/typescript/lib",
11+
"typescript.enablePromptUseWorkspaceTsdk": true,
12+
"search.exclude": {
13+
"**/node_modules": true,
14+
"**/dist": true,
15+
"**/.turbo": true,
16+
"**/playwright-report": true,
17+
"**/test-results": true,
18+
"**/src-tauri/target": true,
19+
"**/pnpm-lock.yaml": true,
20+
"packages/web/src/api/schema.d.ts": true,
21+
"packages/web/src/routeTree.gen.ts": true
22+
},
23+
"files.associations": {
24+
".releaserc.json": "jsonc"
25+
}
26+
}

CLAUDE.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,37 @@
11
# openconcho
22

3-
Frontend UI for self-hosted Honcho instances — browse memories, peers, sessions, conclusions, and chat with memory context.
3+
Frontend UI for self-hosted Honcho instances — browse memories, peers, sessions, conclusions, and chat with memory context. Ships as a web app (`@openconcho/web`) and a Tauri desktop wrapper (`@openconcho/desktop`).
44

55
## Commands
66

7+
`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.
8+
79
| Command | Purpose |
810
|---------|---------|
9-
| `pnpm dev` | Start Vite dev server (http://localhost:5173) |
10-
| `pnpm build` | Production build to `dist/` |
11-
| `pnpm lint` | Biome lint check |
12-
| `pnpm lint:fix` | Biome lint + auto-fix |
13-
| `pnpm format` | Biome format check |
14-
| `pnpm test` | Run Vitest tests |
15-
| `pnpm generate:api` | Regenerate `src/api/schema.d.ts` from `openapi.json` |
11+
| `make bootstrap` | Install deps + Playwright Chromium (run once after clone) |
12+
| `make dev-web` | Vite dev server on http://localhost:5173 |
13+
| `make dev-desktop` (or `make dev`) | Tauri desktop app |
14+
| `make build` | Turbo: build web + desktop |
15+
| `make lint` | Biome check |
16+
| `make typecheck` | tsc --noEmit |
17+
| `make test` | Vitest (unit + integration), excludes `e2e/` |
18+
| `make test-e2e` | Playwright e2e (uncached) |
19+
| `make check` | lint + typecheck + test |
20+
| `pnpm --filter @openconcho/web generate:api` | Regen `src/api/schema.d.ts` from `openapi.json` |
1621

1722
## Structure
1823

1924
| Path | Purpose |
2025
|------|---------|
21-
| `src/routes/` | TanStack Router file-based routes (flat-route syntax) |
22-
| `src/components/` | Feature components grouped by domain |
23-
| `src/api/` | openapi-fetch client + TanStack Query hooks |
24-
| `src/lib/` | Config (localStorage) + theme utilities |
25-
| `src/hooks/` | Custom React hooks |
26+
| `packages/web/` | Vite + React 19 + TanStack Router/Query SPA |
27+
| `packages/web/src/routes/` | TanStack Router file-based routes (flat-route syntax) |
28+
| `packages/web/src/components/` | Feature components grouped by domain |
29+
| `packages/web/src/api/` | openapi-fetch client + TanStack Query hooks |
30+
| `packages/web/src/lib/` | Config (localStorage) + theme utilities |
31+
| `packages/web/src/hooks/` | Custom React hooks |
32+
| `packages/web/src/test/` | Vitest unit/integration tests + setup |
33+
| `packages/web/e2e/` | Playwright e2e specs |
34+
| `packages/desktop/` | Tauri shell that bundles the built web app |
2635
| `.claude/rules/` | Coding conventions (auto-loaded) |
2736
| `docs/` | Architecture and references |
2837

@@ -45,3 +54,7 @@ Read `docs/architecture.md` for component overview, data flow, and design decisi
4554
- **`framer-motion` Variants typing** — import `type Variants` and annotate objects; never use `as const` on variant objects
4655
- **Auth is optional** — token header only sent when non-empty; `checkConnection()` detects if auth is required
4756
- **CSS variables only** — no Tailwind color utilities for theme-aware colors; use `var(--text-1)` etc.
57+
- **Shared deps via pnpm catalog** — version-pinned in `pnpm-workspace.yaml`; reference as `"catalog:"` in package.json
58+
- **Conventional commits enforced** — commitlint runs in husky `commit-msg`; body lines must be ≤100 chars
59+
- **Releases via semantic-release**`.releaserc.json`; commits land on `main`, no manual version bumps
60+
- **GitHub account** — push under `offendingcommit` (`gh auth switch` if needed)

CONTRIBUTING.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,37 @@ Thanks for your interest in helping out. This is a small, focused project — pl
1313
```bash
1414
git clone https://github.com/offendingcommit/openconcho.git
1515
cd openconcho
16-
pnpm install
17-
pnpm dev # web dev server at http://localhost:5173
16+
make bootstrap # installs deps + Playwright Chromium
17+
make dev-web # web dev server at http://localhost:5173
1818
```
1919

20+
Run `make help` to see every target. Make is the canonical interface — CI calls
21+
the same targets, so anything that passes locally will pass in CI.
22+
23+
Node 24 is what CI runs (`.nvmrc`); pnpm version is pinned via the
24+
`packageManager` field — `corepack enable` and it just works.
25+
26+
VS Code users: workspace recommends Biome, Tauri, rust-analyzer, Tailwind,
27+
EditorConfig, and Playwright extensions on first open.
28+
2029
For desktop work:
2130

2231
```bash
23-
pnpm --filter @openconcho/desktop dev
32+
make dev-desktop # alias: make dev
2433
```
2534

35+
Tauri needs system dependencies (WebKit, etc.) — see the
36+
[Tauri prerequisites guide](https://tauri.app/start/prerequisites/) for your OS.
37+
2638
## Before opening a PR
2739

2840
```bash
29-
pnpm lint # Biome lint
30-
pnpm typecheck # tsc --noEmit
31-
pnpm test # Vitest
32-
pnpm build # full build
41+
make check # lint + typecheck + unit/integration tests
42+
make test-e2e # Playwright (requires `make bootstrap` first)
43+
make build # full build
3344
```
3445

35-
All four must pass. CI will block the merge otherwise.
46+
CI will block the merge otherwise.
3647

3748
## Coding standards
3849

@@ -49,7 +60,7 @@ The full standards live in [`.claude/rules/coding-standards.md`](.claude/rules/c
4960
`src/api/schema.d.ts` is generated. Don't edit it by hand — run:
5061

5162
```bash
52-
pnpm generate:api
63+
pnpm --filter @openconcho/web generate:api
5364
```
5465

5566
…after updating `openapi.json`.

Makefile

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,51 @@
1-
.PHONY: dev build test lint lint-fix typecheck install
1+
# Single source of truth for repo commands. CI calls these targets too,
2+
# so anything that works in `make` locally works in `make` on a runner.
3+
# Targets delegate to pnpm scripts, which delegate to turborepo.
24

3-
dev:
4-
pnpm --filter @openconcho/desktop dev
5+
.PHONY: bootstrap dev dev-web dev-desktop \
6+
build test test-e2e lint lint-fix typecheck check \
7+
ci-web ci-desktop install help
58

6-
build:
7-
pnpm turbo run build
9+
help:
10+
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS=":.*?## "}; {printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}'
811

9-
test:
10-
pnpm turbo run test
12+
bootstrap: ## Install deps + Playwright Chromium (run once after clone)
13+
pnpm bootstrap
1114

12-
lint:
13-
pnpm turbo run lint
15+
dev: dev-desktop ## Alias for `dev-desktop`
1416

15-
lint-fix:
16-
pnpm exec biome check --write packages/web/src/
17+
dev-web: ## Vite dev server at http://localhost:5173
18+
pnpm dev:web
1719

18-
typecheck:
19-
pnpm turbo run typecheck
20+
dev-desktop: ## Tauri desktop app
21+
pnpm dev:desktop
2022

21-
install:
23+
build: ## Turbo: build all packages
24+
pnpm build
25+
26+
test: ## Vitest (unit + integration)
27+
pnpm test
28+
29+
test-e2e: ## Playwright e2e (requires bootstrap)
30+
pnpm test:e2e
31+
32+
lint: ## Biome lint check
33+
pnpm lint
34+
35+
lint-fix: ## Biome lint + format auto-fix
36+
pnpm lint:fix
37+
38+
typecheck: ## tsc --noEmit across packages
39+
pnpm typecheck
40+
41+
check: ## lint + typecheck + test
42+
pnpm check
43+
44+
ci-web: ## CI: lint + typecheck + test + build for @openconcho/web
45+
pnpm ci:web
46+
47+
ci-desktop: ## CI: cargo-check for @openconcho/desktop
48+
pnpm ci:desktop
49+
50+
install: ## pnpm install (no playwright)
2251
pnpm install

package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,25 @@
33
"private": true,
44
"version": "0.5.3",
55
"packageManager": "pnpm@10.33.2",
6+
"engines": {
7+
"node": ">=22",
8+
"pnpm": ">=10"
9+
},
610
"scripts": {
11+
"bootstrap": "pnpm install && pnpm exec playwright install --with-deps chromium",
712
"dev": "pnpm --filter @openconcho/desktop dev",
13+
"dev:web": "pnpm --filter @openconcho/web dev",
14+
"dev:desktop": "pnpm --filter @openconcho/desktop dev",
815
"build": "turbo run build",
916
"lint": "turbo run lint",
17+
"lint:fix": "biome check --write .",
18+
"format": "biome format --write .",
1019
"test": "turbo run test",
1120
"test:e2e": "turbo run test:e2e",
1221
"typecheck": "turbo run typecheck",
22+
"check": "turbo run lint typecheck test",
23+
"ci:web": "turbo run lint typecheck test build --filter=@openconcho/web",
24+
"ci:desktop": "turbo run cargo-check --filter=@openconcho/desktop",
1325
"prepare": "husky"
1426
},
1527
"devDependencies": {

0 commit comments

Comments
 (0)