summaryrefslogtreecommitdiff
path: root/CLAUDE.md
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2025-05-29 14:08:02 +0700
committerpolwex <polwex@sortug.com>2025-05-29 14:08:02 +0700
commitf243847216279cbd43879de8b5ef6dcceb3a2f1d (patch)
tree1e0be878f164d327762c7bc54f37077d9410dafe /CLAUDE.md
parent4ed3994fb0f6a2a09eb6ac433a62daee2fc01686 (diff)
lets see
Diffstat (limited to 'CLAUDE.md')
-rw-r--r--CLAUDE.md90
1 files changed, 90 insertions, 0 deletions
diff --git a/CLAUDE.md b/CLAUDE.md
new file mode 100644
index 0000000..2b82961
--- /dev/null
+++ b/CLAUDE.md
@@ -0,0 +1,90 @@
+# CLAUDE.md
+
+This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
+
+## Project Overview
+
+This is a language learning application built with React, Waku, and Bun. It focuses on Thai language learning with features for:
+
+- Flashcard-based study using Spaced Repetition System (SRS)
+- Detailed phonetic analysis and syllable breakdown
+- Tone pattern visualization and practice
+- User progress tracking
+- Lessons and organized learning content
+
+## Commands
+
+### Development
+
+```bash
+# Start the development server
+bun run dev
+
+# Build the project
+bun run build
+
+# Start the production server
+bun run start
+```
+
+## Architecture
+
+### Framework and Runtime
+
+- **Waku**: Server-side rendering (SSR) framework
+- **React**: UI framework (v19.1)
+- **Bun**: JavaScript runtime
+- **TypeScript**: Type system
+
+### Database
+
+The project uses SQLite databases (managed in `src/lib/db/`) with schemas for:
+
+- User accounts and progress tracking
+- Language expressions and translations
+- Syllable breakdowns and phonetic information
+- Flashcards and lessons
+- Spaced repetition data
+
+### Key Components
+
+1. **Server Actions** (`src/actions/`)
+ - Server-side functions marked with `"use server";`
+ - Handle database operations and server-side logic
+ - Examples: authentication, database operations, language processing
+
+2. **Client Components** (`src/components/`)
+ - React components marked with `"use client";`
+ - Import and call server actions
+ - Manage UI state and user interactions
+
+3. **SRS System** (`src/lib/services/srs*.ts`)
+ - Implements spaced repetition algorithms
+ - Tracks user progress and schedules reviews
+ - Multiple implementations for different tracking approaches
+
+4. **Language Processing** (`src/lib/lang/`, `src/zoom/`)
+ - Thai language syllable parsing and phonetic analysis
+ - Tone pattern visualization and analysis
+ - Text parsing and hierarchical display
+
+5. **Database Handlers** (`src/lib/db/`)
+ - Connection management
+ - CRUD operations for all entities
+ - Query functions for app features
+
+### Data Flow
+
+1. Server components fetch initial data
+2. Client components render UI and handle user interactions
+3. User actions trigger server actions
+4. Server actions update the database
+5. UI updates with new data from server actions
+
+### Key Files
+
+- `waku.config.ts`: Waku framework configuration
+- `src/lib/db/schema.sql`: Main database schema
+- `src/lib/db/prosodyschema.sql`: Phonetic analysis schema
+- `src/lib/services/srs_streamlined.ts`: Main SRS implementation
+- `src/actions/`: Server actions for various features \ No newline at end of file