Repository Layout
Obsidian Chess Studio follows a monorepo structure with frontend and backend code in separate directories:Frontend Structure (src/)
The frontend is built with React 19, TypeScript, and Vite.
Directory Overview
Feature Module Pattern
Each feature follows a consistent structure:Key Files
App.tsx
App.tsx
Root application component that:
- Initializes Mantine UI
- Sets up TanStack Router
- Configures theme and i18n
- Handles app-level error boundaries
src/App.tsxstate/atoms.ts
state/atoms.ts
Jotai atoms for global state management:
enginesAtom- Chess engine configurationstabsAtom- Open board tabsdatabaseAtom- Active database statesettingsAtom- Application settings
src/state/atoms.tsi18n.ts
i18n.ts
i18next configuration:
- Loads all translation files
- Configures language detection
- Registers custom formatters (dates, chess notation, etc.)
src/i18n.tsbindings/
bindings/
Auto-generated TypeScript types from Rust:
- Generated by
tauri-specta - Provides type-safe Tauri command signatures
- Automatically updated on build
src/bindings/Backend Structure (src-tauri/)
The backend is built with Rust and Tauri 2.
Directory Overview
Key Modules
- Database (db/)
- Chess Engines (chess/)
- PGN Processing
- Platform Abstraction (app/)
Core database functionality using Diesel ORM and SQLite.Key files:
core.rs- Connection pooling, initializationschema.rs- Database schema (Diesel-generated)models.rs- Rust structs for database tablesops.rs- CRUD operationssearch.rs- Position search algorithmsplayer_stats.rs- Statistical queries
Games- Chess games with movesPlayers- Player informationEvents- Tournament/event dataSites- Game locationsPuzzles- Tactical puzzlesComments- Game annotations
Configuration Files
Frontend Configuration
Backend Configuration
Module Organization
Import Aliases
The project uses@/ alias for clean imports:
Dependency Graph
Build Artifacts
Development Build
Production Build
Next Steps
Frontend Architecture
Deep dive into React architecture
Backend Architecture
Explore Rust backend design
Database Schema
Learn about the database layer
Contributing
Start contributing code
