Technology foundation
Core framework
- Next.js 16.1.1+: React framework with App Router
- React 19.2.1+: UI library with experimental compiler
- TypeScript 5.9.3+: Type-safe development
- Tailwind CSS 4.x: Utility-first styling
Key decision: Static export mode
Yasumu uses Next.js in static export mode, meaning:- Desktop apps don’t need SSR
- Simpler deployment (just static files)
- Faster startup (no Next.js server)
- All routes are client-side
Project structure
The frontend lives inapps/yasumu/:
State management
Yasumu uses a hybrid state management approach:Server state: TanStack Query
For data fetched from the RPC layer:- Automatic caching
- Background refetching
- Optimistic updates
- Loading/error states
Client state: Zustand
For UI-only state:- Active tab/panel state
- Modal open/close state
- Theme preferences
- UI preferences (sidebar collapsed, etc.)
URL state: nuqs
For state that should persist in the URL:- Shareable URLs
- Browser back/forward navigation
- State persists across refreshes
RPC integration
The frontend communicates with Tanxium via a type-safe RPC layer:Setting up the client
Making RPC calls
- Full TypeScript type safety
- Auto-completion in IDEs
- Compile-time error checking
- Runtime validation
Component architecture
Design system: shadcn/ui
Yasumu uses shadcn/ui for base components:src/components/ui/ and can be customized:
Component patterns
Yasumu follows these patterns:1. Feature-based organization
2. Compound components
3. Custom hooks for logic
Monaco Editor integration
Yasumu uses Monaco Editor for code editing:Custom languages
For.ysl files, Yasumu registers a custom Monaco language:
Styling approach
Tailwind CSS
Most styling uses Tailwind utilities:CSS variables for themes
Theme switching
Performance optimizations
React Compiler
Yasumu uses the experimental React Compiler:useMemo and useCallback in most cases.
Code splitting
Dynamic imports for heavy components:Virtualization
Large lists use virtualization:Build configuration
Next steps
- RPC layer - Learn about type-safe frontend-backend communication
- Tauri shell - Understand the desktop wrapper
- Tanxium runtime - Explore the backend runtime