You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+
## Common Development Commands
6
+
7
+
### Development Server
8
+
-`npm run dev` - Start development server on port 3000 (local mode)
9
+
-`npm run dev:e2e` - Start development server in integration mode for E2E testing
10
+
11
+
### Building and Deployment
12
+
-`npm run build` - Build the Astro application for production
13
+
-`npm run preview` - Preview the built application locally
14
+
15
+
### Code Quality
16
+
-`npm run lint` - Lint and fix TypeScript/Astro files
17
+
-`npm run lint:check` - Check linting without fixing
18
+
-`npm run format` - Format code with Prettier
19
+
-`npm run format:check` - Check formatting without fixing
20
+
21
+
### Testing
22
+
-`npm run test` - Run unit tests with Vitest
23
+
-`npm run test:watch` - Run tests in watch mode
24
+
-`npm run test:ui` - Run tests with UI interface
25
+
-`npm run test:coverage` - Generate test coverage report
26
+
-`npm run test:e2e` - Run end-to-end tests with Playwright
27
+
-`npm run test:e2e:ui` - Run E2E tests with UI
28
+
-`npm run test:e2e:codegen` - Generate test code with Playwright
29
+
30
+
### Special Scripts
31
+
-`npm run generate-rules` - Generate rules JSON from TypeScript definitions
32
+
33
+
## Architecture Overview
34
+
35
+
### Technology Stack
36
+
-**Framework**: Astro 5 with React 18.3 integration
37
+
-**Styling**: Tailwind CSS 4
38
+
-**State Management**: Zustand for client-side state
39
+
-**Database**: Supabase (PostgreSQL with real-time features)
40
+
-**Testing**: Vitest for unit tests, Playwright for E2E tests
41
+
-**Authentication**: Supabase Auth with email/password and password reset
42
+
43
+
### Project Structure
44
+
45
+
#### Core Application (`src/`)
46
+
-`pages/` - Astro pages with API routes under `api/`
47
+
-`components/` - React components organized by feature
48
+
-`data/` - Static data including AI rules definitions in `rules/` subdirectory
49
+
-`services/` - Business logic services, notably `RulesBuilderService`
50
+
-`store/` - Zustand stores for state management
51
+
-`hooks/` - Custom React hooks
52
+
53
+
#### Key Components Architecture
54
+
-**Rules System**: Rules are organized by technology stacks (frontend, backend, database, etc.) and stored in `src/data/rules/`
55
+
-**Rules Builder Service**: Core service in `src/services/rules-builder/` that generates markdown content using strategy pattern (single-file vs multi-file output)
56
+
-**Collections System**: User can save and manage rule collections via `collectionsStore`
57
+
-**Feature Flags**: Environment-based feature toggling system in `src/features/featureFlags.ts`
58
+
59
+
#### MCP Server (`mcp-server/`)
60
+
Standalone Cloudflare Worker implementing Model Context Protocol for programmatic access to AI rules. Provides tools:
61
+
-`listAvailableRules` - Get available rule categories
62
+
-`getRuleContent` - Fetch specific rule content
63
+
64
+
### State Management Pattern
65
+
The application uses Zustand with multiple specialized stores:
66
+
-`techStackStore` - Manages selected libraries and tech stack
67
+
-`collectionsStore` - Handles saved rule collections with dirty state tracking
0 commit comments