Overview
The frontend is built with React 19, TypeScript, and Vite, providing a modern, performant user interface for chess analysis and game management.Technology Stack
Core Framework
- React 19 - UI library
- TypeScript - Type safety
- Vite 7 - Build tool & dev server
- React Hooks - State and effects
UI Components
- Mantine UI 8 - Component library
- Chessground - Chess board rendering
- Vanilla Extract - CSS-in-JS
- Tabler Icons - Icon set
State Management
- Jotai - Atomic state
- Zustand - Complex stores
- TanStack Query - Server state
- React Context - Local state
Routing & Data
- TanStack Router - Type-safe routing
- React Router - Navigation
- i18next - Internationalization
- Zod - Runtime validation
Project Structure
Component Architecture
Feature-Based Organization
Each feature follows a modular structure:Component Patterns
- Functional Components
- Custom Hooks
- Component Composition
All components use functional components with hooks:Key patterns:
- Named exports (no default exports)
- TypeScript interfaces for props
useCallbackfor event handlersuseMemofor expensive computations
State Management
Obsidian Chess Studio uses a multi-layered state management approach.Jotai Atoms (Global State)
Used for global application state that persists across routes.Zustand Stores (Complex State)
Used for complex state with middleware (persistence, devtools).TanStack Query (Server State)
Used for fetching and caching server data from Tauri commands.Routing
TanStack Router
Obsidian Chess Studio uses TanStack Router for type-safe routing.Tauri Integration
Invoking Backend Commands
Event Listening
File System Operations
Styling
Mantine UI Theme
Vanilla Extract CSS
Performance Optimization
Code Splitting
Vite automatically code-splits routes:
Memoization
Use
useMemo and useCallback:Virtual Lists
Render large lists efficiently:
Debouncing
Debounce search inputs:
Next Steps
Backend Architecture
Learn about the Rust backend
Database Schema
Explore the database layer
