Skip to content

Commit 92172ec

Browse files
committed
chore: Update CLAUDE.md file.
1 parent 3fb9055 commit 92172ec

3 files changed

Lines changed: 52 additions & 13 deletions

File tree

.claude/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"feature-dev@claude-plugins-official": true,
44
"agents-specialized-domains@buildwithclaude": true,
55
"documentation-generation@claude-code-workflows": true,
6-
"agents-design-experience@buildwithclaude": true
6+
"agents-design-experience@buildwithclaude": true,
7+
"playwright@claude-plugins-official": true
78
}
89
}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
docs/site/
2-
NOTES.md
2+
NOTES.md
3+
firebase-debug.log

CLAUDE.md

Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,26 +42,42 @@ flutter test
4242

4343
### Architecture (`client/lib/`)
4444

45-
- **`main.dart`** - App entry point; initializes Firebase and sets up Provider
46-
- **`config/`** - App configuration (routing via GoRouter)
47-
- **`pages/`** - Full-screen views
48-
- **`providers/`** - State management (ChangeNotifier pattern)
49-
- **`widgets/`** - Reusable UI components
50-
- **`forms/`** - Form widgets
51-
- **`models/`** - Data models
52-
- **`themes/`** - Color schemes (Material 3 light/dark)
45+
- **`main.dart`** - Entry point; Firebase init, MultiProvider setup
46+
- **`config/`** - GoRouter routing (`app_router.dart`)
47+
- **`pages/`** - 20 full-screen views (auth, library, book management, goals, statistics, profile, settings, developer options)
48+
- **`providers/`** - 13 ChangeNotifier providers (auth, library, book details/edit, shelves, goals, statistics, dashboard, annotations, bookmarks, notes, display mode, sidebar)
49+
- **`widgets/`** - 100+ components in 23 feature subdirectories (auth, book, book_details, library, dashboard, shell, goals, statistics, etc.)
50+
- **`models/`** - 16 data models (book, shelf, tag, annotation, bookmark, note, reading session/goal/streak, series, etc.)
51+
- **`data/`** - DataStore (single source of truth ChangeNotifier) + SampleData for offline mode
52+
- **`services/`** - Metadata extraction (`metadata_service.dart`, `file_metadata_service.dart`)
53+
- **`forms/`** - Login and register form state/validation
54+
- **`themes/`** - Material 3 themes (light/dark/e-ink) + design tokens (`design_tokens.dart`)
55+
- **`utils/`** - Responsive layout, color/image utils, search query parser, navigation helpers
5356

5457
### Key Patterns
5558

56-
**State Management**: Provider with ChangeNotifier classes.
59+
**State Management**: Provider with ChangeNotifier classes. DataStore in `data/data_store.dart` is the single source of truth, loaded with SampleData on startup for offline mode.
5760

5861
**Navigation**: GoRouter with nested shell routes:
62+
5963
- Bottom nav: Dashboard, Library, Goals, Statistics, Profile
6064
- Library drawer: Books, Shelves, Topics, Bookmarks, Annotations, Notes
6165
- Routes in `config/app_router.dart`
6266

6367
**Authentication**: Firebase Auth with Google Sign-In.
6468

69+
**Responsive Design**: `utils/responsive.dart` with breakpoints defined in `themes/design_tokens.dart` — mobile (<600), tablet (600-839), desktop (840+), large desktop (1200+). Grid columns, gutters, and margins adapt per breakpoint.
70+
71+
**Design Tokens**: `themes/design_tokens.dart` defines `Spacing`, `ComponentSizes`, `BorderWidths`, `IconSizes`, `AppRadius`, `AppElevation`, and `Breakpoints`.
72+
73+
**E-ink Mode**: Theme-based approach — `AppTheme.eink` handles grayscale colors; widgets use theme colors, not hardcoded values. No separate widget builds. 4 remaining e-ink-specific widgets for structurally different navigation components.
74+
75+
**Widgets**: Feature-based directory organization under `widgets/` (auth/, book/, library/, dashboard/, shell/, etc.). Reuse shared components from `widgets/shared/`.
76+
77+
### Tests
78+
79+
29 test files covering models, providers, widgets, services, and utils. Run with `flutter test` from `client/`.
80+
6581
## Server (Python/FastAPI)
6682

6783
### Commands
@@ -99,8 +115,9 @@ pytest --cov # Run with coverage
99115
### API Documentation
100116

101117
When the server is running:
102-
- OpenAPI UI: http://localhost:8000/docs
103-
- ReDoc: http://localhost:8000/redoc
118+
119+
- OpenAPI UI: <http://localhost:8000/docs>
120+
- ReDoc: <http://localhost:8000/redoc>
104121

105122
## Development Setup
106123

@@ -114,10 +131,12 @@ lefthook install
114131
```
115132

116133
**Pre-commit** (runs in parallel):
134+
117135
- Client: `dart format`, `dart analyze`
118136
- Server: `ruff format`, `ruff check`
119137

120138
**Pre-push** (runs in parallel):
139+
121140
- Client: `flutter test`
122141
- Server: `mypy`, `pytest`
123142

@@ -126,19 +145,23 @@ To skip hooks temporarily: `git commit --no-verify`
126145
### CI/CD Workflows
127146

128147
**Client CI** (`.github/workflows/ci.yml`):
148+
129149
- Triggers on changes to `client/**`
130150
- Runs format check, analysis, and tests
131151

132152
**Client Release** (`.github/workflows/release.yml`):
153+
133154
- Triggers on `v*` tags (e.g., `v1.0.0`)
134155
- Builds Android, Web, Linux, Windows artifacts
135156
- Creates GitHub Release
136157

137158
**Server CI** (`.github/workflows/server-ci.yml`):
159+
138160
- Triggers on changes to `server/**`
139161
- Runs format, lint, type check, and tests with coverage
140162

141163
**Server Release** (`.github/workflows/server-release.yml`):
164+
142165
- Triggers on `server-v*` tags (e.g., `server-v1.0.0`)
143166
- Runs quality checks and creates GitHub Release
144167

@@ -160,6 +183,20 @@ git push origin server-v1.0.0
160183
- Examples: "Apply filters" (not "Apply Filters")
161184
- Exception: Acronyms remain uppercase (PDF, EPUB)
162185

186+
## Visual App Exploration (Chrome MCP)
187+
188+
To visually explore the running Flutter web app using Chrome MCP (`mcp__claude-in-chrome__*`):
189+
190+
1. Start the web server: `flutter run -d web-server --web-port=8080` from `client/`
191+
2. Navigate to `http://localhost:8080` using `mcp__claude-in-chrome__navigate`
192+
3. Use `mcp__claude-in-chrome__computer` with `screenshot` action to capture current state
193+
4. Use `left_click` with coordinates to interact with UI elements
194+
195+
**Notes:**
196+
197+
- Flutter web uses CanvasKit (canvas rendering) — Playwright MCP cannot interact with elements, but Chrome MCP `computer` tool works via coordinate-based clicks
198+
- Click "Use offline mode" on the welcome page to bypass auth for local testing
199+
163200
## Project Resources
164201

165202
- **Documentation**: `docs/` directory, run `mkdocs serve` to browse locally

0 commit comments

Comments
 (0)