- Add uload project with apps/web structure
- Reorganize from flat to monorepo structure
- Remove PocketBase binary and local data
- Update to pnpm and @uload/web namespace
- Add picture project to monorepo
- Remove embedded git repository
- Unify all package names to @{project}/{app} schema:
- @maerchenzauber/* (was @storyteller/*)
- @manacore/* (was manacore-*, manacore)
- @manadeck/* (was web, backend, manadeck)
- @memoro/* (was memoro-web, landing, memoro)
- @picture/* (already unified)
- @uload/web
- Add convenient dev scripts for all apps:
- pnpm dev:{project}:web
- pnpm dev:{project}:landing
- pnpm dev:{project}:mobile
- pnpm dev:{project}:backend
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
4.8 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
This is the mobile app within the "picture" monorepo. It's an Expo React Native application built with TypeScript, using Expo Router for navigation and NativeWind (Tailwind CSS) for styling. The app integrates with Supabase for backend services and uses Zustand for state management.
Monorepo Structure
This app is part of a PNPM workspace monorepo:
picture/
├── apps/
│ ├── mobile/ # This React Native app (Expo)
│ ├── web/ # SvelteKit web app
│ └── landing/ # Astro landing page
├── packages/
│ └── shared/ # Shared code (Supabase types, API client)
└── pnpm-workspace.yaml
Shared Package (@picture/shared)
The shared package provides:
- Supabase Database Types - Auto-generated TypeScript types from database schema
- Supabase Client - Configured API client for all apps
- Shared Utilities - Common helper functions and types
Import from shared package:
import { supabase } from '@picture/shared';
import type { Database } from '@picture/shared/types';
Development Commands
⚠️ WICHTIG: Alle Commands müssen vom Root-Verzeichnis ausgeführt werden!
Running the App
pnpm dev:mobile- Start mobile dev server (from root)pnpm dev:web- Start web dev server (from root)pnpm dev:landing- Start landing page dev server (from root)pnpm dev- Start ALL apps in parallel (from root)
Building for Deployment
pnpm build:mobile- Build mobile app via EAS Buildpnpm build:web- Build web apppnpm build:landing- Build landing pagepnpm build- Build all apps
Code Quality
pnpm lint- Run ESLint and Prettier checks (all apps)pnpm type-check- Run TypeScript checks (all apps)
Other Commands
pnpm install- Install dependencies for all workspace packagespnpm clean- Remove all node_modules and build artifacts
Architecture & Structure
Navigation
The app uses Expo Router (file-based routing):
app/_layout.tsx- Root layout with Stack navigatorapp/(tabs)/_layout.tsx- Tab navigator with two tabsapp/(tabs)/index.tsx- First tab screenapp/(tabs)/two.tsx- Second tab screenapp/modal.tsx- Modal screen
State Management
Zustand store in store/store.ts - Currently contains a sample "bears" store that should be replaced with actual app state.
Backend Integration
Supabase client is imported from @picture/shared:
import { supabase } from '@picture/shared';
- Shared client configured with AsyncStorage for auth persistence
- Environment variables managed at root level
- MCP server configured for Supabase integration (see root
.mcp.json) - Database types auto-generated in shared package
Styling
- NativeWind (Tailwind CSS for React Native) configured
- Global styles in
global.css - Tailwind config in
tailwind.config.js
UI Components
- WICHTIG: Immer
Pressableverwenden, NICHTTouchableOpacityPressablebietet bessere Performance und mehr Flexibilität- Unterstützt
pressedState für visuelle Feedbacks - Beispiel:
<Pressable onPress={handlePress} className={({ pressed }) => `${pressed ? 'opacity-70' : 'opacity-100'}`} > <Text>Button</Text> </Pressable>
Key Dependencies
- Navigation: expo-router, react-navigation
- UI: NativeWind, @expo/vector-icons
- Backend: @supabase/supabase-js
- State: zustand
- Development: expo-dev-client for custom native builds
Environment Variables
Required environment variables (in .env or similar):
EXPO_PUBLIC_SUPABASE_URL- Supabase project URLEXPO_PUBLIC_SUPABASE_ANON_KEY- Supabase anonymous key
EAS Build Configuration
The project is configured for EAS Build with:
- Development builds with dev client
- Preview builds for internal distribution
- Production builds with auto-incrementing version numbers
- Project ID:
a74891be-7ff7-420c-9ff0-d33c37a59e5a
Supabase Edge Functions
WICHTIG: Workflow für Edge Function Änderungen
⚠️ KRITISCH: Bevor du eine Edge Function änderst, MUSS folgender Workflow eingehalten werden:
-
ERST Commit erstellen
git add . git commit -m "Before Edge Function changes" -
DANN lokale Änderungen vornehmen
- Bearbeite die Function in
supabase/functions/[function-name]/ - Teste lokal mit:
npx supabase functions serve [function-name]
- Bearbeite die Function in
-
ZULETZT auf Supabase deployen
npx supabase functions deploy [function-name]
Edge Functions Struktur
supabase/
└── functions/
└── [function-name]/
├── index.ts # Function Code
└── README.md # Dokumentation