mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:21:09 +02:00
- Restructure chat as apps/mobile, apps/web, apps/landing, backend - Add NestJS backend for secure Azure OpenAI API calls - Remove exposed API key from mobile app (security fix) - Add shared chat-types package - Create SvelteKit web app scaffold - Create Astro landing page scaffold - Update pnpm workspace configuration - Add project-level CLAUDE.md documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1.9 KiB
1.9 KiB
Claude's Guide to Chat Mobile App
Commands
- Start app:
pnpm devorpnpm start - iOS:
pnpm ios - Android:
pnpm android - Lint:
pnpm lint - Format:
pnpm format - Build:
pnpm build:dev,pnpm build:preview,pnpm build:prod - Supabase:
pnpm supabase:cli,pnpm supabase:update-models,pnpm supabase:setup
Architecture
Backend Integration
- AI API calls go through the backend - NOT directly from the mobile app
- Backend URL configured via
EXPO_PUBLIC_BACKEND_URLenvironment variable - API keys are stored securely in the backend only
utils/backendApi.ts- Backend client for AI completionsutils/api.ts- API wrapper that routes calls to backend
Key Files
config/azure.ts- Model definitions (NO API keys!)services/openai.ts- Chat service using backendutils/backendApi.ts- Backend API clientutils/supabase.ts- Supabase client for data persistence
Code Style Guidelines
- TypeScript: Strict typing with interfaces for props and state
- Components: Functional components with hooks, located in
/components - Navigation: Expo Router in
/appdirectory - Styling: NativeWind (Tailwind CSS for React Native)
- Imports: Path aliases with
~/*for project root - Formatting: 100 char line limit, 2 space tabs, single quotes
- State: React Context API for global state
- Backend: Uses NestJS backend for AI calls, Supabase for data
- Naming: PascalCase for components, camelCase for functions/variables
- Error Handling: Try/catch with contextual error messages
Environment Variables
EXPO_PUBLIC_SUPABASE_URL=https://...
EXPO_PUBLIC_SUPABASE_ANON_KEY=...
EXPO_PUBLIC_BACKEND_URL=http://localhost:3001
Running with Backend
- Start the backend first:
pnpm dev:chat:backend - Then start the mobile app:
pnpm dev:chat:mobile
The mobile app will connect to the backend for AI completions.