Skip to content

Commit 787e8aa

Browse files
aster-voidclaude
andcommitted
treewide: cleanup storybook, playwright, and consolidate env
- Remove Storybook configuration and dependencies - Remove Playwright e2e test setup - Remove legacy Procfiles (replaced by devenv) - Consolidate env config into root .env.sample - Add typed env.ts for server environment variables - Update CLAUDE.md and README.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 5cfe0ce commit 787e8aa

File tree

16 files changed

+55
-146
lines changed

16 files changed

+55
-146
lines changed

.env.sample

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
# Application
2+
PORT=3000
3+
CORS_ORIGIN=http://localhost:5173
4+
PUBLIC_API_BASE_URL=http://localhost:3000
15
# Database
2-
DATABASE_URL=postgres://user:password@localhost:5432/prism
3-
4-
# JWT Secret
6+
DATABASE_URL=postgres://localhost:5432/prism
7+
# JWT
58
JWT_SECRET=your-secret-key

CLAUDE.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
1111
- **Desktop**: Tauri (optional)
1212
- **Package Manager**: Bun
1313
- **Monorepo**: Workspaces (`apps/*`)
14+
- **Dev Environment**: devenv (logs: `.devenv/processes.log`)
1415

1516
## Directory Structure
1617

@@ -33,7 +34,9 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
3334
│ └── api-client/ # Shared API types
3435
├── docs/
3536
│ └── skills/ # Agent skill docs
36-
└── tasks/ # Procfile for dev
37+
├── tasks/ # Procfile for dev
38+
├── .env.sample # environment variable samples.
39+
└── .env # all environment variables in here. pls don't read
3740
```
3841

3942
## Import Aliases
@@ -93,7 +96,7 @@ await client.products.post({ name: "bar", price: 100 }); // POST
9396
## Code Quality
9497

9598
- **FILE LENGTH**: 30-50 lines recommended, 100 MAX
96-
- **CHECK**: Always run `bun check` after writing code
99+
- **TIDY**: Run `bun tidy` after writing code (auto-fix + check)
97100
- **DOCUMENTATION**: Document behavior, not implementation
98101

99102
## Svelte Rules
@@ -122,3 +125,15 @@ UI [.svelte] → controller [.svelte.ts] → processor [.svelte.ts] → utility
122125
| UI Design | `docs/skills/ui-design.md` | UI実装、デザイン判断 |
123126

124127
</skills>
128+
129+
<debugging>
130+
131+
## Debugging
132+
133+
サーバーエラー時は **最初に** ログを確認する:
134+
135+
```bash
136+
tail -100 .devenv/processes.log
137+
```
138+
139+
</debugging>

README.md

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,49 +6,28 @@ Prism では、 Monorepo 構成を採用しており、 `apps/` にそれぞれ
66

77
### セットアップ
88

9-
- インストール:
10-
- Bun >= v1.2
11-
- Hivemind <https://github.com/DarthSim/hivemind>
12-
- PostgreSQL
13-
- 実行: `bun install --frozen-lockfile`
9+
devenv を使用してください。
1410

15-
### 開発用サーバー
11+
### 環境変数
1612

17-
- Server (`bun run:server`)
18-
- Elysia API server at <http://localhost:3000>
19-
- Web Client (`bun run:web`)
20-
- depends on Server
21-
- <http://localhost:5173>
22-
- Storybook (`bun dev:storybook`)
23-
- <http://localhost:6006>
24-
- Tauri (`bun dev:tauri`)
25-
- depends on Server
26-
- conflicts with web client
13+
`.env.sample``.env` にコピーし、値を設定してください。
2714

2815
```sh
29-
bun dev
16+
cp .env.sample .env
3017
```
3118

32-
でアプリケーションの動作に必要なものだけ (Server + Web Client) を起動します。
33-
34-
#### Storybook
19+
`JWT_SECRET` の生成 (32バイト = 256ビット推奨):
3520

3621
```sh
37-
bun dev:storybook
22+
openssl rand -base64 32
3823
```
3924

40-
で上に加え Storybook が起動します。
41-
42-
#### Tauri
43-
44-
Tauri はコンパイルに時間と計算資源を使うので、
25+
### 開発用サーバー
4526

4627
```sh
47-
bun dev:tauri
28+
devenv up
4829
```
4930

50-
で明示的に起動しないと起動しません。
51-
5231
## 注意点
5332

5433
### Pre-Commit Hook について

apps/desktop/.storybook/main.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.

apps/desktop/.storybook/preview.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

apps/desktop/package.json

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,15 @@
99
"build": "bun vite build",
1010
"build:tauri": "bun run tauri build",
1111
"sync": "svelte-kit sync",
12-
"check": "bun sync && svelte-check --tsconfig ./tsconfig.json",
13-
"check:watch": "bun sync && svelte-check --tsconfig ./tsconfig.json --watch",
14-
"test:e2e": "playwright test",
15-
"test": "bun run test:e2e",
16-
"storybook": "storybook dev -p 6006",
17-
"build-storybook": "storybook build"
12+
"check": "bun sync && svelte-check --tsconfig ./tsconfig.json"
1813
},
1914
"devDependencies": {
20-
"@chromatic-com/storybook": "^4.1.3",
21-
"@storybook/addon-a11y": "^10.1.4",
22-
"@storybook/addon-docs": "^10.1.4",
23-
"@storybook/addon-svelte-csf": "^5.0.10",
24-
"@storybook/addon-vitest": "^10.1.4",
25-
"@storybook/sveltekit": "^10.1.4",
26-
"@storybook/test": "^8.6.14",
2715
"@sveltejs/adapter-auto": "^7.0.0",
2816
"@sveltejs/adapter-cloudflare": "^7.2.4",
2917
"@sveltejs/kit": "^2.49.1",
3018
"@sveltejs/vite-plugin-svelte": "^6.2.1",
3119
"@tailwindcss/vite": "^4.1.17",
3220
"@tauri-apps/cli": "^2.9.5",
33-
"@vitest/browser": "^4.0.15",
34-
"@vitest/coverage-v8": "^4.0.15",
3521
"daisyui": "^5.5.8",
3622
"svelte": "^5.45.2",
3723
"svelte-check": "^4.3.4",
@@ -52,7 +38,6 @@
5238
"@codemirror/view": "^6.38.8",
5339
"@iconify-json/mdi": "^1.2.3",
5440
"@lezer/highlight": "^1.2.3",
55-
"@playwright/test": "^1.57.0",
5641
"@sveltejs/adapter-static": "^3.0.10",
5742
"@tauri-apps/api": "^2.9.1",
5843
"@tauri-apps/plugin-opener": "^2.5.2",

apps/desktop/playwright.config.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

apps/desktop/src/routes/+layout.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
55
const { children } = $props();
66
7-
// Initialize API client
8-
setupApi("http://localhost:3000");
7+
// Initialize API client (uses PUBLIC_API_BASE_URL env var)
8+
setupApi();
99
</script>
1010

1111
{@render children()}

apps/desktop/tests/e2e/demo.test.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

apps/server/.env.example

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)