mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-16 13:59:40 +02:00
- Move finance, mail, moodlit to apps-archived for later development - Rename games/voxel-lava to games/voxelava 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
4 KiB
4 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
Moodlit is a React Native mobile application built with Expo Router, targeting iOS and Android platforms. The app creates ambient lighting effects using the device's screen and flashlight with customizable color gradients and animations. It uses NativeWind (TailwindCSS for React Native) for styling and Zustand for state management.
Key Features
- Mood Library: Pre-configured lighting moods (Fire, Breath, Northern Lights, Thunder, etc.) with different color gradients and animation types
- Custom Moods: Create custom lighting effects with personalized colors and animations
- Sequences: Chain multiple moods together with configurable durations and transitions
- Dual Output: Toggle between screen-based lighting and device flashlight
- Settings: Adjustable animation speed, haptic feedback, brightness, and auto-timer functionality
Development Commands
Starting the Development Server
npm start # Start Expo dev server with dev client
npm run ios # Build and run on iOS simulator
npm run android # Build and run on Android emulator
npm run web # Run web version
Building
npm run prebuild # Generate native directories for iOS/Android
npm run build:dev # Build development build via EAS
npm run build:preview # Build preview version via EAS
npm run build:prod # Build production version via EAS
Code Quality
npm run lint # Run ESLint and Prettier check
npm run format # Auto-fix with ESLint and format with Prettier
Architecture
Routing
- Expo Router (file-based routing): Routes are defined by file structure in the
app/directoryapp/_layout.tsx: Root layout component that wraps all screensapp/index.tsx: Home screenapp/details.tsx: Details screen- Route navigation uses
expo-routerLink component with typed routes enabled
State Management
- Zustand: Global state management in
store/store.ts- Store definitions follow a pattern of state + action methods
- Example store structure includes state interface and create function
Backend Integration
- Supabase Client: Configured in
utils/supabase.ts- Uses AsyncStorage for session persistence
- Environment variables required:
EXPO_PUBLIC_SUPABASE_URLEXPO_PUBLIC_SUPABASE_ANON_KEY
- Auto-refresh tokens and persistent sessions enabled
Styling System
- NativeWind: TailwindCSS for React Native
- Global styles imported via
global.cssin root layout - Tailwind config includes
app/**andcomponents/**content paths - Styles defined as string literals with
classNameprop (notstyle) - Example:
className="flex flex-1 bg-white"
- Global styles imported via
Path Aliases
- TypeScript configured with
@/*path alias mapping to root directory - Import components/utils with
@/components/...or@/utils/...
Components Structure
- Reusable components in
components/directory:Button.tsx: Touchable button componentContainer.tsx: Layout wrapperScreenContent.tsx: Screen template with title and separatorEditScreenInfo.tsx: Info display component
Key Configuration Files
app.json: Expo configuration with typed routes and tsconfigPaths experiments enabledtsconfig.json: TypeScript with strict mode and path aliasestailwind.config.js: NativeWind preset with custom content pathsbabel.config.js: Babel configuration for Expometro.config.js: Metro bundler configuration.env: Environment variables (not committed, contains Supabase credentials)
Development Notes
- This project uses React 19.1.0 and React Native 0.81.5
- Expo SDK version 54
- TypeScript strict mode is enabled
- The app requires Expo Dev Client (not Expo Go) due to custom native dependencies
- Web support is available via Metro bundler with static output