From 248137ec436101c3415cc748e036ba11057fd82a Mon Sep 17 00:00:00 2001 From: Till JS Date: Mon, 20 Apr 2026 15:31:47 +0200 Subject: [PATCH] =?UTF-8?q?chore(mobile):=20remove=206=20of=207=20mobile?= =?UTF-8?q?=20apps=20=E2=80=94=20keep=20only=20memoro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Six Expo mobile apps lagged behind their web counterparts and haven't shipped updates. Keeping them in the repo kept CI noisy (the context/ mobile type errors were only unmasked after yesterday's postinstall fix), and they blocked other cleanup (parallel lockfile entries, dead scripts). Removing them since the web surface under mana.how is the active product. Deleted (~175 MB, ~700 files): - apps/cards/apps/mobile - apps/chat/apps/mobile - apps/context/apps/mobile (the one still failing type-check) - apps/mana/apps/mobile - apps/picture/apps/mobile - apps/traces/apps/mobile Kept: apps/memoro/apps/mobile (the only actively-developed mobile app, tied to the audio-recording native module). Cleanup: - Dropped 6 `dev:*:mobile` scripts from root package.json that pointed at the deleted apps. Other `dev:*:mobile` entries (quotes, contacts, calendar, mail, moodlit, finance, figgos) already pointed at non-existent apps before this change — out of scope, a separate dead-script sweep. - Root CLAUDE.md: updated the "per-product mobile apps exist" prose and the repo-layout diagram to reflect the memoro-only reality. - apps/mana/CLAUDE.md: removed the `mobile/` entry from the apps/ layout box, noted the deletion date, and updated the tech-stack table to point at the memoro mobile app as the sole Expo surface. No CI workflow or turbo.json references touched — none existed. Co-Authored-By: Claude Opus 4.7 (1M context) --- CLAUDE.md | 7 +- apps/cards/apps/mobile/.env.example | 8 - apps/cards/apps/mobile/.env.production | 7 - apps/cards/apps/mobile/.gitignore | 6 - apps/cards/apps/mobile/.mcp.json | 11 - apps/cards/apps/mobile/CLAUDE.md | 138 - .../mobile/Docs/AI-Implementation-Plan.md | 483 -- .../apps/mobile/Docs/EXPO_NATIVE_TABS.md | 456 -- apps/cards/apps/mobile/Docs/EXPO_UI_DOCS.md | 936 ---- .../mobile/Docs/EXPO_UI_OFFFICIAL_DOCS.md | 293 - .../apps/mobile/Docs/GLASS_HEADER_GUIDE.md | 200 - .../apps/mobile/Docs/HEADER_STYLING_GUIDE.md | 382 -- .../apps/mobile/Docs/NATIVE_TAB_BEHAVIOR.md | 157 - apps/cards/apps/mobile/Docs/database.md | 183 - .../mobile/Docs/expo-sdk-54-upgrade-guide.md | 237 - .../apps/mobile/Docs/expo-sdk-54-upgrade.md | 270 - .../mobile/Docs/frontend-components-plan.md | 501 -- .../Docs/next-steps-implementation-plan.md | 244 - .../mobile/Docs/phase-3-card-system-plan.md | 378 -- .../Docs/samples/create-system-user.sql | 65 - .../samples/sample-deck-english-basics.sql | 168 - .../sample-deck-german-basics-simple.sql | 128 - .../samples/sample-deck-german-basics.sql | 661 --- .../samples/sample-deck-history-world.sql | 215 - .../Docs/samples/sample-deck-math-basics.sql | 216 - .../apps/mobile/Docs/spaced-repetition.md | 276 - .../mobile/Docs/user-guides/deck-creation.md | 154 - .../user-guides/public-deck-suggestions.md | 278 - apps/cards/apps/mobile/SPACING_MIGRATION.md | 126 - .../Setup_Docs/SupabaseMCPClaudeCodeSetup.md | 88 - apps/cards/apps/mobile/app-env.d.ts | 2 - apps/cards/apps/mobile/app.config.ts | 53 - apps/cards/apps/mobile/app.json | 62 - apps/cards/apps/mobile/app/(auth)/_layout.tsx | 16 - .../mobile/app/(auth)/forgot-password.tsx | 171 - apps/cards/apps/mobile/app/(auth)/login.tsx | 139 - .../cards/apps/mobile/app/(auth)/register.tsx | 174 - apps/cards/apps/mobile/app/(tabs)/_layout.tsx | 34 - .../apps/mobile/app/(tabs)/decks/_layout.tsx | 13 - .../apps/mobile/app/(tabs)/decks/index.tsx | 359 -- .../mobile/app/(tabs)/explore/_layout.tsx | 13 - .../apps/mobile/app/(tabs)/explore/index.tsx | 142 - apps/cards/apps/mobile/app/(tabs)/index.tsx | 5 - .../mobile/app/(tabs)/profile/_layout.tsx | 13 - .../apps/mobile/app/(tabs)/profile/index.tsx | 358 -- .../mobile/app/(tabs)/progress/_layout.tsx | 13 - .../apps/mobile/app/(tabs)/progress/index.tsx | 401 -- apps/cards/apps/mobile/app/+html.tsx | 46 - apps/cards/apps/mobile/app/+not-found.tsx | 24 - apps/cards/apps/mobile/app/_layout.tsx | 75 - apps/cards/apps/mobile/app/card/[id].tsx | 95 - apps/cards/apps/mobile/app/card/create.tsx | 677 --- apps/cards/apps/mobile/app/card/edit/[id].tsx | 556 -- apps/cards/apps/mobile/app/deck/[id].tsx | 187 - .../cards/apps/mobile/app/deck/[id]/cards.tsx | 623 --- apps/cards/apps/mobile/app/deck/[id]/edit.tsx | 271 - apps/cards/apps/mobile/app/deck/create.tsx | 181 - apps/cards/apps/mobile/app/index.tsx | 5 - apps/cards/apps/mobile/app/modal.tsx | 13 - .../apps/mobile/app/study/session/[id].tsx | 385 -- .../apps/mobile/app/study/summary/[id].tsx | 208 - .../apps/mobile/assets/adaptive-icon.png | Bin 17547 -> 0 bytes apps/cards/apps/mobile/assets/favicon.png | Bin 1466 -> 0 bytes apps/cards/apps/mobile/assets/icon.png | Bin 22380 -> 0 bytes apps/cards/apps/mobile/assets/splash.png | Bin 47346 -> 0 bytes apps/cards/apps/mobile/babel.config.js | 16 - apps/cards/apps/mobile/cesconfig.jsonc | 46 - .../apps/mobile/components/EditScreenInfo.tsx | 29 - .../apps/mobile/components/ErrorBoundary.tsx | 79 - .../apps/mobile/components/HeaderButton.tsx | 33 - .../components/InsufficientCreditsModal.tsx | 176 - .../apps/mobile/components/ScreenContent.tsx | 25 - .../apps/mobile/components/TabBarIcon.tsx | 13 - .../apps/mobile/components/ThemeProvider.tsx | 35 - .../apps/mobile/components/ThemeWrapper.tsx | 47 - .../mobile/components/ai/ImageCardCreator.tsx | 198 - .../mobile/components/ai/SmartCardCreator.tsx | 416 -- .../apps/mobile/components/card/CardList.tsx | 392 -- .../components/card/CardTypeSelector.tsx | 175 - .../apps/mobile/components/card/CardView.tsx | 458 -- .../apps/mobile/components/deck/DeckCard.tsx | 203 - .../components/progress/DeckProgressCard.tsx | 146 - .../components/progress/HeatmapCalendar.tsx | 133 - .../components/progress/ProgressChart.tsx | 163 - .../mobile/components/progress/StreakCard.tsx | 213 - .../components/study/StudyModeSelector.tsx | 205 - .../apps/mobile/components/ui/Button.tsx | 236 - apps/cards/apps/mobile/components/ui/Card.tsx | 95 - .../apps/mobile/components/ui/FilterBar.tsx | 108 - .../components/ui/FloatingActionButton.tsx | 60 - apps/cards/apps/mobile/components/ui/Icon.tsx | 40 - .../cards/apps/mobile/components/ui/Input.tsx | 112 - .../apps/mobile/components/ui/PageHeader.tsx | 43 - .../mobile/components/ui/SettingsItem.tsx | 88 - .../mobile/components/ui/SettingsSection.tsx | 37 - .../apps/mobile/components/ui/Switch.tsx | 26 - apps/cards/apps/mobile/components/ui/Text.tsx | 46 - .../apps/mobile/components/ui/ThemeDebug.tsx | 34 - .../mobile/components/ui/ThemeSwitcher.tsx | 201 - apps/cards/apps/mobile/eas.json | 28 - apps/cards/apps/mobile/eslint.config.mjs | 12 - .../mobile/examples/DeckCreationExample.tsx | 238 - apps/cards/apps/mobile/global.css | 131 - apps/cards/apps/mobile/hooks/useCredits.ts | 49 - .../mobile/hooks/useInsufficientCredits.ts | 61 - apps/cards/apps/mobile/metro.config.js | 8 - apps/cards/apps/mobile/nativewind-env.d.ts | 3 - apps/cards/apps/mobile/package.json | 78 - apps/cards/apps/mobile/prettier.config.js | 10 - apps/cards/apps/mobile/services/apiClient.ts | 334 -- .../cards/apps/mobile/services/authService.ts | 247 - .../apps/mobile/services/creditService.ts | 39 - .../apps/mobile/services/tokenManager.ts | 51 - apps/cards/apps/mobile/store/aiStore.ts | 197 - apps/cards/apps/mobile/store/authStore.ts | 168 - apps/cards/apps/mobile/store/cardStore.ts | 368 -- apps/cards/apps/mobile/store/deckStore.ts | 216 - apps/cards/apps/mobile/store/progressStore.ts | 489 -- apps/cards/apps/mobile/store/store.ts | 15 - apps/cards/apps/mobile/store/studyStore.ts | 471 -- apps/cards/apps/mobile/store/themeStore.tsx | 186 - apps/cards/apps/mobile/tailwind.config.js | 38 - apps/cards/apps/mobile/themes/default.ts | 45 - apps/cards/apps/mobile/themes/forest.ts | 45 - apps/cards/apps/mobile/themes/index.ts | 14 - apps/cards/apps/mobile/themes/sunset.ts | 45 - apps/cards/apps/mobile/tsconfig.json | 12 - apps/cards/apps/mobile/types/auth.ts | 91 - apps/cards/apps/mobile/types/credits.ts | 51 - apps/cards/apps/mobile/types/theme.ts | 40 - apps/cards/apps/mobile/utils/apiClient.ts | 159 - apps/cards/apps/mobile/utils/logger.ts | 5 - .../apps/mobile/utils/networkErrorUtils.ts | 202 - .../apps/mobile/utils/spacedRepetition.ts | 216 - apps/cards/apps/mobile/utils/spacing.ts | 66 - .../apps/mobile/utils/supabaseAIService.ts | 138 - apps/cards/apps/mobile/utils/themeUtils.ts | 31 - apps/chat/apps/mobile/.env.example | 6 - apps/chat/apps/mobile/.gitignore | 25 - apps/chat/apps/mobile/CLAUDE.md | 56 - apps/chat/apps/mobile/README.md | 68 - apps/chat/apps/mobile/VEREINFACHUNG.md | 55 - apps/chat/apps/mobile/VEREINFACHUNG_STATUS.md | 45 - apps/chat/apps/mobile/app-env.d.ts | 2 - apps/chat/apps/mobile/app.json | 54 - .../chat/apps/mobile/app/(drawer)/_layout.tsx | 88 - apps/chat/apps/mobile/app/+html.tsx | 46 - apps/chat/apps/mobile/app/+not-found.tsx | 24 - apps/chat/apps/mobile/app/_layout.tsx | 72 - apps/chat/apps/mobile/app/api/models+api.ts | 101 - apps/chat/apps/mobile/app/api/usage+api.ts | 101 - apps/chat/apps/mobile/app/archive.tsx | 496 -- apps/chat/apps/mobile/app/auth/_layout.tsx | 6 - apps/chat/apps/mobile/app/auth/login.tsx | 269 - apps/chat/apps/mobile/app/auth/register.tsx | 263 - .../apps/mobile/app/auth/reset-password.tsx | 180 - .../apps/mobile/app/conversation/[id].tsx | 959 ---- .../mobile/app/conversation/new/index.tsx | 125 - apps/chat/apps/mobile/app/conversations.tsx | 607 --- apps/chat/apps/mobile/app/documents.tsx | 445 -- apps/chat/apps/mobile/app/index.tsx | 915 ---- apps/chat/apps/mobile/app/model-selection.tsx | 173 - apps/chat/apps/mobile/app/profile.tsx | 693 --- apps/chat/apps/mobile/app/settings.tsx | 504 -- .../apps/mobile/app/spaces/[id]/index.tsx | 666 --- apps/chat/apps/mobile/app/spaces/index.tsx | 506 -- apps/chat/apps/mobile/app/spaces/new.tsx | 227 - apps/chat/apps/mobile/app/templates.tsx | 417 -- .../chat/apps/mobile/assets/adaptive-icon.png | Bin 17547 -> 0 bytes apps/chat/apps/mobile/assets/favicon.png | Bin 1466 -> 0 bytes apps/chat/apps/mobile/assets/icon.png | Bin 22380 -> 0 bytes apps/chat/apps/mobile/assets/splash.png | Bin 47346 -> 0 bytes apps/chat/apps/mobile/babel.config.js | 12 - apps/chat/apps/mobile/cesconfig.json | 40 - apps/chat/apps/mobile/components/Button.tsx | 23 - .../apps/mobile/components/ChatHeader.tsx | 92 - .../chat/apps/mobile/components/ChatInput.tsx | 105 - .../mobile/components/ChatPromptInput.tsx | 361 -- .../chat/apps/mobile/components/Container.tsx | 9 - .../mobile/components/ConversationStarter.tsx | 476 -- .../apps/mobile/components/CustomDrawer.tsx | 479 -- .../apps/mobile/components/DocumentPanel.tsx | 369 -- .../mobile/components/DocumentVersions.tsx | 226 - .../apps/mobile/components/EditScreenInfo.tsx | 29 - .../apps/mobile/components/MessageInput.tsx | 109 - .../apps/mobile/components/MessageItem.tsx | 83 - .../apps/mobile/components/MessageList.tsx | 64 - .../chat/apps/mobile/components/ModelCard.tsx | 112 - .../apps/mobile/components/ModelDropdown.tsx | 161 - .../apps/mobile/components/NewChatButton.tsx | 46 - .../apps/mobile/components/SkeletonLoader.tsx | 77 - .../apps/mobile/components/TemplateCard.tsx | 160 - .../apps/mobile/components/TemplateForm.tsx | 418 -- .../mobile/components/TypingIndicator.tsx | 103 - apps/chat/apps/mobile/config/azure.ts | 56 - .../chat/apps/mobile/context/AuthProvider.tsx | 230 - apps/chat/apps/mobile/eas.json | 21 - apps/chat/apps/mobile/eslint.config.mjs | 12 - apps/chat/apps/mobile/global.css | 3 - apps/chat/apps/mobile/hooks/useChatInput.ts | 50 - apps/chat/apps/mobile/metro.config.js | 9 - apps/chat/apps/mobile/nativewind-env.d.ts | 3 - apps/chat/apps/mobile/package.json | 64 - apps/chat/apps/mobile/prettier.config.js | 10 - apps/chat/apps/mobile/readme/ExpoApiRoutes.md | 544 -- apps/chat/apps/mobile/readme/NativeWind.md | 130 - apps/chat/apps/mobile/readme/README.md | 107 - apps/chat/apps/mobile/readme/Supabase.md | 211 - .../apps/mobile/readme/TokenAccounting.md | 197 - .../scripts/add_archive_functionality.sql | 33 - .../mobile/scripts/add_conversation_title.sql | 19 - .../scripts/check_and_create_models.sql | 84 - .../mobile/scripts/check_azure_openai.sql | 66 - .../create_delete_document_function.sql | 31 - .../mobile/scripts/create_templates_table.sql | 66 - .../mobile/scripts/create_usage_functions.sql | 144 - .../scripts/create_usage_logs_table.sql | 122 - .../mobile/scripts/create_users_table.sql | 103 - .../scripts/fix_conversation_creation.sql | 120 - .../scripts/fix_messages_constraint.sql | 46 - .../apps/mobile/scripts/fix_models_table.sql | 27 - .../apps/mobile/scripts/fix_rls_policies.sql | 157 - .../mobile/scripts/fix_templates_table.sql | 73 - .../mobile/scripts/setup_rls_policies.sql | 115 - .../apps/mobile/scripts/setup_supabase.js | 136 - .../scripts/setup_supabase_functions.sql | 52 - .../scripts/spaces/create_spaces_rls.sql | 176 - .../scripts/spaces/create_spaces_tables.sql | 45 - .../scripts/spaces/create_spaces_triggers.sql | 97 - .../scripts/spaces/fix_rls_policies.sql | 86 - .../scripts/spaces/fix_rls_policies_v2.sql | 69 - .../mobile/scripts/spaces/setup_spaces.js | 83 - apps/chat/apps/mobile/scripts/supabase-cli.js | 169 - .../chat/apps/mobile/scripts/update_models.js | 109 - .../apps/mobile/scripts/update_models.sql | 29 - apps/chat/apps/mobile/services/api.ts | 650 --- .../chat/apps/mobile/services/conversation.ts | 550 -- apps/chat/apps/mobile/services/document.ts | 162 - .../chat/apps/mobile/services/modelService.ts | 64 - apps/chat/apps/mobile/services/openai.ts | 201 - apps/chat/apps/mobile/services/space.ts | 254 - apps/chat/apps/mobile/services/template.ts | 164 - .../apps/mobile/supabase/.temp/cli-latest | 1 - .../apps/mobile/supabase/.temp/gotrue-version | 1 - .../apps/mobile/supabase/.temp/pooler-url | 1 - .../mobile/supabase/.temp/postgres-version | 1 - .../apps/mobile/supabase/.temp/project-ref | 1 - .../apps/mobile/supabase/.temp/rest-version | 1 - apps/chat/apps/mobile/tailwind.config.js | 59 - apps/chat/apps/mobile/test-api.js | 93 - apps/chat/apps/mobile/test-openai.js | 50 - apps/chat/apps/mobile/theme/ThemeProvider.tsx | 41 - apps/chat/apps/mobile/theme/index.ts | 83 - apps/chat/apps/mobile/tsconfig.json | 12 - apps/chat/apps/mobile/types.ts | 45 - apps/chat/apps/mobile/types/index.ts | 72 - apps/chat/apps/mobile/utils/api.ts | 82 - apps/chat/apps/mobile/utils/backendApi.ts | 132 - apps/context/apps/mobile/.env.example | 7 - apps/context/apps/mobile/.env.production | 4 - apps/context/apps/mobile/.gitignore | 27 - apps/context/apps/mobile/AI-FEATURES.md | 274 - .../apps/mobile/Context-Readme-Database.md | 200 - apps/context/apps/mobile/MONETIZATION.md | 358 -- apps/context/apps/mobile/NextSteps.md | 282 - apps/context/apps/mobile/ReadMe.md | 648 --- .../ReadMe/DocumentEditorVerbesserungsplan.md | 410 -- apps/context/apps/mobile/ReadMe/ExpoUI.md | 226 - .../apps/mobile/ReadMe/FeatureOverview.md | 262 - .../mobile/ReadMe/Optimaziations/Homepage.md | 121 - .../mobile/ReadMe/Phase1Zusammenfassung.md | 298 - .../mobile/ReadMe/SeitenanalsyeBericht.md | 342 -- apps/context/apps/mobile/app-env.d.ts | 2 - apps/context/apps/mobile/app.json | 63 - apps/context/apps/mobile/app/+html.tsx | 46 - apps/context/apps/mobile/app/+not-found.tsx | 24 - apps/context/apps/mobile/app/_layout.tsx | 74 - apps/context/apps/mobile/app/details.tsx | 17 - apps/context/apps/mobile/app/index.tsx | 374 -- apps/context/apps/mobile/app/login.tsx | 36 - apps/context/apps/mobile/app/register.tsx | 35 - .../apps/mobile/app/settings/index.tsx | 286 - .../spaces/[id]/documents/[documentId].tsx | 1040 ---- .../spaces/[id]/documents/documentStyles.ts | 80 - .../apps/mobile/app/spaces/[id]/index.tsx | 1104 ---- .../apps/mobile/app/spaces/create/index.tsx | 104 - apps/context/apps/mobile/app/spaces/index.tsx | 130 - apps/context/apps/mobile/app/tokens/index.tsx | 603 --- .../apps/mobile/assets/adaptive-icon.png | Bin 5776 -> 0 bytes apps/context/apps/mobile/assets/favicon.png | Bin 1466 -> 0 bytes apps/context/apps/mobile/assets/icon.png | Bin 6572 -> 0 bytes apps/context/apps/mobile/assets/splash.png | Bin 47346 -> 0 bytes apps/context/apps/mobile/babel.config.js | 10 - .../context/apps/mobile/components/Button.tsx | 30 - .../apps/mobile/components/Container.tsx | 9 - .../apps/mobile/components/EditScreenInfo.tsx | 29 - .../apps/mobile/components/ScreenContent.tsx | 25 - .../mobile/components/ai/AIActionButton.tsx | 100 - .../apps/mobile/components/ai/AIAssistant.tsx | 480 -- .../mobile/components/ai/BottomLLMToolbar.tsx | 722 --- .../mobile/components/ai/ModelSelector.tsx | 91 - .../mobile/components/ai/PromptEditor.tsx | 528 -- .../mobile/components/ai/SpacesLLMToolbar.tsx | 1022 ---- .../apps/mobile/components/auth/LoginForm.tsx | 100 - .../mobile/components/auth/ProtectedRoute.tsx | 32 - .../mobile/components/auth/RegisterForm.tsx | 142 - .../documents/BatchDocumentCreator.tsx | 889 --- .../documents/DeleteDocumentButton.tsx | 175 - .../components/documents/DocumentCard.tsx | 268 - .../documents/DocumentCardDeleteButton.tsx | 179 - .../documents/DocumentCardToolbar.tsx | 264 - .../components/documents/DocumentContent.tsx | 239 - .../components/documents/DocumentEditor.tsx | 320 -- .../components/documents/DocumentGallery.tsx | 672 --- .../components/documents/DocumentHeader.tsx | 143 - .../documents/DocumentSelectionIndicator.tsx | 75 - .../components/documents/DocumentSkeleton.tsx | 58 - .../documents/DocumentTagsEditor.tsx | 205 - .../documents/DocumentTagsFilter.tsx | 244 - .../documents/DocumentTagsPills.tsx | 81 - .../components/documents/DocumentToolbar.tsx | 276 - .../documents/DocumentTypeBadge.tsx | 86 - .../documents/DocumentTypeDropdown.tsx | 285 - .../documents/DocumentTypeFilter.tsx | 101 - .../documents/DocumentTypeFilterDropdown.tsx | 353 -- .../documents/DocumentTypeSelector.tsx | 191 - .../documents/SaveStateIndicator.tsx | 184 - .../components/documents/VersionNavigator.tsx | 196 - .../components/functional/SearchBar.tsx | 46 - .../functional/SupabaseConnectionTest.tsx | 208 - .../mobile/components/layout/AppLayout.tsx | 97 - .../mobile/components/layout/EmptyState.tsx | 37 - .../apps/mobile/components/layout/Screen.tsx | 76 - .../components/mentions/DocumentPreview.tsx | 175 - .../mentions/HighlightedMentionInput.tsx | 114 - .../components/mentions/MentionDropdown.tsx | 161 - .../mentions/MentionHighlighter.tsx | 100 - .../components/mentions/MentionRenderer.tsx | 477 -- .../components/mentions/MentionTextInput.tsx | 531 -- .../components/monetization/TokenDisplay.tsx | 163 - .../monetization/TokenEstimator.tsx | 201 - .../components/monetization/TokenStore.tsx | 386 -- .../components/navigation/Breadcrumbs.tsx | 396 -- .../components/settings/LanguagePicker.tsx | 186 - .../components/spaces/AllSpacesFilterPill.tsx | 32 - .../components/spaces/DeleteSpaceButton.tsx | 146 - .../components/spaces/InlineSpaceCreator.tsx | 197 - .../mobile/components/spaces/SpaceCard.tsx | 65 - .../mobile/components/spaces/SpaceCreator.tsx | 217 - .../components/spaces/SpaceDetailSkeleton.tsx | 110 - .../components/spaces/SpaceDropdown.tsx | 276 - .../components/spaces/SpaceEditor.tsx.new | 405 -- .../components/spaces/SpaceFilterPill.tsx | 36 - .../spaces/SpaceFilterPillSkeleton.tsx | 56 - .../components/spaces/ThemedSpaceCard.tsx | 264 - .../mobile/components/theme/ThemeProvider.tsx | 109 - .../mobile/components/theme/ThemeSelector.tsx | 137 - .../apps/mobile/components/theme/index.ts | 2 - .../apps/mobile/components/ui/Avatar.tsx | 45 - .../apps/mobile/components/ui/Badge.tsx | 38 - .../apps/mobile/components/ui/Card.tsx | 34 - .../components/ui/ConfirmationModal.tsx | 95 - .../apps/mobile/components/ui/FilterPill.tsx | 236 - .../apps/mobile/components/ui/Input.tsx | 33 - .../mobile/components/ui/LoadingScreen.tsx | 193 - .../mobile/components/ui/QuickStartCard.tsx | 188 - .../mobile/components/ui/SaveIndicator.tsx | 119 - .../apps/mobile/components/ui/Skeleton.tsx | 92 - .../apps/mobile/components/ui/Text.tsx | 25 - .../mobile/components/ui/ThemedButton.tsx | 286 - .../apps/mobile/components/ui/ThemedCard.tsx | 79 - .../components/variants/VariantCreator.tsx | 483 -- .../apps/mobile/config/editorConfig.ts | 41 - .../apps/mobile/context/AuthProvider.tsx | 230 - .../apps/mobile/context/DebugContext.tsx | 54 - .../apps/mobile/context/I18nContext.tsx | 131 - apps/context/apps/mobile/eas.json | 33 - apps/context/apps/mobile/global.css | 3 - apps/context/apps/mobile/hooks/useAutoSave.ts | 175 - .../apps/mobile/hooks/useDocumentEditor.ts | 294 - .../apps/mobile/hooks/useDocumentSave.ts | 240 - .../apps/mobile/hooks/useKeyboardShortcuts.ts | 140 - apps/context/apps/mobile/locales/de.json | 382 -- apps/context/apps/mobile/locales/en.json | 382 -- apps/context/apps/mobile/metro.config.js | 9 - .../migrations/add_monetization_system.sql | 100 - .../migrations/add_pinned_to_spaces.sql | 8 - .../mobile/migrations/add_short_id_system.sql | 139 - .../migrations/fix_increment_counter.sql | 69 - .../mobile/migrations/remove_title_field.sql | 13 - .../apps/mobile/migrations/supabase-setup.sql | 142 - .../update_document_type_constraint.sql | 9 - .../migrations/update_document_types.sql | 15 - apps/context/apps/mobile/nativewind-env.d.ts | 3 - apps/context/apps/mobile/package.json | 71 - apps/context/apps/mobile/prettier.config.js | 10 - .../context/apps/mobile/services/aiService.ts | 99 - .../apps/mobile/services/backendApi.ts | 438 -- .../mobile/services/revenueCatProductIds.ts | 46 - .../apps/mobile/services/revenueCatService.ts | 260 - .../apps/mobile/services/supabaseService.ts | 195 - .../mobile/services/tokenCountingService.ts | 88 - .../services/tokenTransactionService.ts | 86 - .../apps/mobile/services/wordCountService.ts | 94 - apps/context/apps/mobile/tailwind.config.js | 39 - apps/context/apps/mobile/tsconfig.json | 12 - apps/context/apps/mobile/types/document.ts | 23 - .../apps/mobile/types/documentEditor.ts | 201 - apps/context/apps/mobile/utils/debounce.ts | 37 - apps/context/apps/mobile/utils/debug.ts | 44 - .../context/apps/mobile/utils/eventEmitter.ts | 40 - apps/context/apps/mobile/utils/i18n.ts | 104 - apps/context/apps/mobile/utils/markdown.ts | 50 - .../apps/mobile/utils/markdownProcessor.ts | 24 - .../apps/mobile/utils/markdownVariants.ts | 134 - .../apps/mobile/utils/mentionProcessor.ts | 96 - .../context/apps/mobile/utils/supabaseTest.ts | 118 - apps/context/apps/mobile/utils/textUtils.ts | 27 - .../context/apps/mobile/utils/theme/colors.ts | 313 -- apps/context/apps/mobile/utils/theme/index.ts | 3 - apps/context/apps/mobile/utils/theme/theme.ts | 117 - apps/mana/CLAUDE.md | 8 +- apps/mana/apps/mobile/.env.example | 3 - apps/mana/apps/mobile/.gitignore | 27 - apps/mana/apps/mobile/app-env.d.ts | 2 - apps/mana/apps/mobile/app.json | 58 - .../mobile/app/(drawer)/(tabs)/_layout.tsx | 30 - .../apps/mobile/app/(drawer)/(tabs)/index.tsx | 15 - .../apps/mobile/app/(drawer)/(tabs)/two.tsx | 15 - .../mana/apps/mobile/app/(drawer)/_layout.tsx | 110 - apps/mana/apps/mobile/app/(drawer)/apps.tsx | 164 - .../apps/mobile/app/(drawer)/get-mana.tsx | 208 - apps/mana/apps/mobile/app/(drawer)/index.tsx | 133 - .../app/(drawer)/organizations/[id].tsx | 380 -- .../app/(drawer)/organizations/index.tsx | 100 - .../apps/mobile/app/(drawer)/send-mana.tsx | 34 - .../apps/mobile/app/(drawer)/settings.tsx | 343 -- .../apps/mobile/app/(drawer)/teams/[id].tsx | 67 - .../apps/mobile/app/(drawer)/teams/index.tsx | 89 - apps/mana/apps/mobile/app/+html.tsx | 46 - apps/mana/apps/mobile/app/+not-found.tsx | 24 - apps/mana/apps/mobile/app/_layout.tsx | 63 - apps/mana/apps/mobile/app/auth/_layout.tsx | 9 - .../apps/mobile/app/auth/reset-password.tsx | 309 -- apps/mana/apps/mobile/app/login.tsx | 33 - apps/mana/apps/mobile/app/modal.tsx | 13 - .../mana/apps/mobile/assets/adaptive-icon.png | Bin 17547 -> 0 bytes apps/mana/apps/mobile/assets/favicon.png | Bin 1466 -> 0 bytes apps/mana/apps/mobile/assets/icon.png | Bin 22380 -> 0 bytes apps/mana/apps/mobile/assets/splash.png | Bin 47346 -> 0 bytes apps/mana/apps/mobile/babel.config.js | 12 - apps/mana/apps/mobile/cesconfig.json | 40 - apps/mana/apps/mobile/components/Account.tsx | 191 - apps/mana/apps/mobile/components/Auth.tsx | 340 -- apps/mana/apps/mobile/components/Button.tsx | 24 - .../mana/apps/mobile/components/Container.tsx | 12 - .../mobile/components/CreateOrganization.tsx | 119 - .../apps/mobile/components/CreateTeam.tsx | 47 - .../apps/mobile/components/DashboardStats.tsx | 124 - .../apps/mobile/components/EditScreenInfo.tsx | 29 - .../apps/mobile/components/HeaderButton.tsx | 31 - .../mobile/components/OrganizationList.tsx | 199 - .../apps/mobile/components/ScreenContent.tsx | 25 - apps/mana/apps/mobile/components/SendMana.tsx | 108 - .../apps/mobile/components/TabBarIcon.tsx | 15 - apps/mana/apps/mobile/components/TeamList.tsx | 63 - .../apps/mobile/components/TeamMembers.tsx | 53 - .../mana/apps/mobile/context/AuthProvider.tsx | 230 - apps/mana/apps/mobile/eas.json | 21 - apps/mana/apps/mobile/eslint.config.mjs | 20 - apps/mana/apps/mobile/global.css | 3 - apps/mana/apps/mobile/metro.config.js | 6 - apps/mana/apps/mobile/nativewind-env.d.ts | 3 - apps/mana/apps/mobile/netlify.toml | 10 - apps/mana/apps/mobile/package.json | 63 - apps/mana/apps/mobile/prettier.config.js | 10 - apps/mana/apps/mobile/services/api.ts | 209 - .../20250315_find_user_by_email.sql | 21 - apps/mana/apps/mobile/tailwind.config.js | 10 - apps/mana/apps/mobile/tsconfig.json | 12 - apps/mana/apps/mobile/utils/themeContext.tsx | 106 - apps/picture/apps/mobile/.easignore | 24 - apps/picture/apps/mobile/.gitignore | 6 - apps/picture/apps/mobile/.npmrc | 11 - apps/picture/apps/mobile/CLAUDE.md | 150 - apps/picture/apps/mobile/app-env.d.ts | 2 - apps/picture/apps/mobile/app.json | 47 - apps/picture/apps/mobile/app/(auth)/login.tsx | 172 - .../apps/mobile/app/(auth)/register.tsx | 170 - .../apps/mobile/app/(auth)/reset-password.tsx | 104 - .../apps/mobile/app/(tabs)/_layout.tsx | 68 - .../apps/mobile/app/(tabs)/explore.tsx | 269 - .../mobile/app/(tabs)/generate/_layout.tsx | 14 - .../apps/mobile/app/(tabs)/generate/index.tsx | 347 -- apps/picture/apps/mobile/app/(tabs)/index.tsx | 378 -- .../apps/mobile/app/(tabs)/profile.tsx | 474 -- apps/picture/apps/mobile/app/+html.tsx | 46 - apps/picture/apps/mobile/app/+not-found.tsx | 24 - apps/picture/apps/mobile/app/_layout.tsx | 120 - apps/picture/apps/mobile/app/archive.tsx | 392 -- apps/picture/apps/mobile/app/image/[id].tsx | 1017 ---- apps/picture/apps/mobile/app/index.tsx | 6 - apps/picture/apps/mobile/app/modal.tsx | 17 - apps/picture/apps/mobile/app/tags.tsx | 376 -- .../apps/mobile/assets/adaptive-icon.png | Bin 17547 -> 0 bytes apps/picture/apps/mobile/assets/favicon.png | Bin 1466 -> 0 bytes apps/picture/apps/mobile/assets/icon.png | Bin 22380 -> 0 bytes apps/picture/apps/mobile/assets/splash.png | Bin 47346 -> 0 bytes apps/picture/apps/mobile/babel.config.js | 34 - apps/picture/apps/mobile/cesconfig.jsonc | 46 - .../mobile/components/AspectRatioSelector.tsx | 50 - .../picture/apps/mobile/components/Button.tsx | 194 - .../apps/mobile/components/Container.tsx | 11 - .../apps/mobile/components/DesktopNav.tsx | 100 - .../apps/mobile/components/EditScreenInfo.tsx | 29 - .../apps/mobile/components/EmptyState.tsx | 30 - .../apps/mobile/components/ErrorBanner.tsx | 40 - .../apps/mobile/components/ErrorBoundary.tsx | 190 - .../apps/mobile/components/ExploreSortBar.tsx | 391 -- apps/picture/apps/mobile/components/FAB.tsx | 73 - .../apps/mobile/components/FilterBar.tsx | 339 -- .../apps/mobile/components/FilterToggle.tsx | 32 - .../mobile/components/GenerationToast.tsx | 79 - .../picture/apps/mobile/components/Header.tsx | 244 - .../apps/mobile/components/HeaderButton.tsx | 33 - apps/picture/apps/mobile/components/Icon.tsx | 127 - .../apps/mobile/components/ImageCard.tsx | 529 -- .../mobile/components/ImageCountSelector.tsx | 220 - .../apps/mobile/components/ImageSkeleton.tsx | 116 - .../apps/mobile/components/ModelSelector.tsx | 59 - .../apps/mobile/components/OptionSelector.tsx | 207 - .../apps/mobile/components/PageHeader.tsx | 19 - .../mobile/components/QuickGenerateBar.tsx | 615 --- .../mobile/components/RateLimitIndicator.tsx | 251 - .../apps/mobile/components/ScreenContent.tsx | 25 - .../apps/mobile/components/StudioTabBar.tsx | 289 - .../apps/mobile/components/TabBarIcon.tsx | 15 - .../apps/mobile/components/TagFilter.tsx | 76 - apps/picture/apps/mobile/components/Text.tsx | 163 - .../apps/mobile/components/ThemePicker.tsx | 157 - .../apps/mobile/components/ViewToggle.tsx | 114 - .../components/batch/BatchGenerationModal.tsx | 287 - .../components/batch/BatchProgressTracker.tsx | 232 - .../components/prompt/PromptBuilder.tsx | 123 - .../components/prompt/PromptEnhancer.tsx | 179 - .../components/prompt/TemplateGallery.tsx | 169 - .../components/remix/RemixBottomSheet.tsx | 456 -- .../settings/GenerationSettings.tsx | 167 - .../mobile/components/tags/TagDisplay.tsx | 73 - .../apps/mobile/components/tags/TagInput.tsx | 262 - .../apps/mobile/components/ui/Slider.tsx | 139 - apps/picture/apps/mobile/constants/colors.ts | 53 - apps/picture/apps/mobile/constants/gallery.ts | 23 - apps/picture/apps/mobile/constants/index.ts | 6 - apps/picture/apps/mobile/constants/layout.ts | 43 - .../apps/mobile/constants/pagination.ts | 16 - .../apps/mobile/constants/promptTemplates.ts | 316 -- .../apps/mobile/constants/themes/default.ts | 204 - .../apps/mobile/constants/themes/index.ts | 35 - .../apps/mobile/constants/themes/ocean.ts | 204 - .../apps/mobile/constants/themes/sunset.ts | 204 - .../apps/mobile/constants/themes/types.ts | 115 - .../apps/mobile/contexts/AuthContext.tsx | 280 - .../apps/mobile/contexts/ThemeContext.tsx | 56 - .../mobile/eas-hooks/eas-build-pre-install.sh | 42 - apps/picture/apps/mobile/eas.json | 38 - apps/picture/apps/mobile/eslint.config.mjs | 12 - apps/picture/apps/mobile/global.css | 19 - .../apps/mobile/hooks/useArchiveFetching.ts | 100 - .../apps/mobile/hooks/useExploreFetching.ts | 107 - .../apps/mobile/hooks/useExplorePrefetch.ts | 74 - .../apps/mobile/hooks/useExploreSearch.ts | 41 - .../apps/mobile/hooks/useGalleryGestures.ts | 55 - .../apps/mobile/hooks/useImageFetching.ts | 147 - .../apps/mobile/hooks/useImageGeneration.ts | 236 - .../apps/mobile/hooks/useImageLikes.ts | 43 - .../apps/mobile/hooks/useImagePrefetch.ts | 76 - .../apps/mobile/hooks/useImageSearch.ts | 45 - .../apps/mobile/hooks/usePagination.ts | 82 - .../apps/mobile/hooks/useResponsive.ts | 32 - .../apps/mobile/hooks/useScrollRestoration.ts | 48 - apps/picture/apps/mobile/metro.config.js | 67 - apps/picture/apps/mobile/nativewind-env.d.ts | 3 - apps/picture/apps/mobile/package.json | 80 - ...eact-native-context-menu-view+1.20.0.patch | 21 - .../react-native-pager-view+6.9.1.patch | 124 - apps/picture/apps/mobile/prettier.config.js | 10 - .../mobile/scripts/build-workspace-deps.sh | 30 - .../picture/apps/mobile/services/api/batch.ts | 147 - .../apps/mobile/services/api/client.ts | 83 - .../apps/mobile/services/api/explore.ts | 53 - .../apps/mobile/services/api/generate.ts | 183 - .../apps/mobile/services/api/images.ts | 265 - .../picture/apps/mobile/services/api/index.ts | 13 - .../apps/mobile/services/api/models.ts | 77 - .../apps/mobile/services/api/profiles.ts | 98 - apps/picture/apps/mobile/services/api/tags.ts | 96 - .../apps/mobile/services/archiveService.ts | 127 - .../mobile/services/imageGenerationAsync.ts | 357 -- apps/picture/apps/mobile/services/models.ts | 29 - apps/picture/apps/mobile/store/batchStore.ts | 329 -- .../mobile/store/generatingImagesStore.ts | 157 - .../mobile/store/generationDefaultsStore.ts | 55 - apps/picture/apps/mobile/store/modelStore.ts | 196 - apps/picture/apps/mobile/store/promptStore.ts | 11 - apps/picture/apps/mobile/store/tagStore.ts | 231 - apps/picture/apps/mobile/store/themeStore.ts | 140 - .../apps/mobile/store/themeStore.ts.backup | 131 - apps/picture/apps/mobile/store/viewStore.ts | 32 - apps/picture/apps/mobile/tailwind.config.js | 10 - .../apps/mobile/tailwind.config.js.backup | 20 - apps/picture/apps/mobile/tsconfig.base.json | 20 - apps/picture/apps/mobile/tsconfig.json | 14 - apps/picture/apps/mobile/types/explore.ts | 24 - apps/picture/apps/mobile/types/gallery.ts | 16 - apps/picture/apps/mobile/utils/blurhash.ts | 96 - apps/picture/apps/mobile/utils/image.ts | 66 - apps/picture/apps/mobile/utils/logger.ts | 5 - .../apps/mobile/utils/polyfills.web.js | 9 - apps/traces/apps/mobile/.gitignore | 25 - apps/traces/apps/mobile/README.md | 290 - apps/traces/apps/mobile/app-env.d.ts | 2 - apps/traces/apps/mobile/app.json | 90 - .../traces/apps/mobile/app/(tabs)/_layout.tsx | 32 - .../apps/mobile/app/(tabs)/cities/_layout.tsx | 5 - .../apps/mobile/app/(tabs)/cities/index.tsx | 140 - .../apps/mobile/app/(tabs)/guides/_layout.tsx | 5 - .../apps/mobile/app/(tabs)/guides/index.tsx | 137 - .../mobile/app/(tabs)/history/_layout.tsx | 28 - .../apps/mobile/app/(tabs)/history/index.tsx | 122 - apps/traces/apps/mobile/app/(tabs)/index.tsx | 243 - apps/traces/apps/mobile/app/(tabs)/logs.tsx | 80 - apps/traces/apps/mobile/app/(tabs)/map.tsx | 737 --- .../apps/mobile/app/(tabs)/places/_layout.tsx | 28 - .../apps/mobile/app/(tabs)/places/index.tsx | 182 - apps/traces/apps/mobile/app/+html.tsx | 57 - apps/traces/apps/mobile/app/+not-found.tsx | 23 - apps/traces/apps/mobile/app/_layout.tsx | 76 - apps/traces/apps/mobile/app/city-detail.tsx | 220 - apps/traces/apps/mobile/app/guide-detail.tsx | 178 - apps/traces/apps/mobile/app/modal.tsx | 172 - apps/traces/apps/mobile/app/place-details.tsx | 149 - apps/traces/apps/mobile/app/settings.tsx | 746 --- .../apps/mobile/assets/adaptive-icon.png | Bin 17547 -> 0 bytes apps/traces/apps/mobile/assets/favicon.png | Bin 1466 -> 0 bytes apps/traces/apps/mobile/assets/icon.png | Bin 15268 -> 0 bytes apps/traces/apps/mobile/assets/splash.png | Bin 47346 -> 0 bytes .../Assets/Traces App Icon 01.3-1.svg | 3 - .../Assets/Traces App Icon 01.3.svg | 3 - .../apps/mobile/assets/traces.icon/icon.json | 40 - apps/traces/apps/mobile/babel.config.js | 10 - apps/traces/apps/mobile/cesconfig.json | 40 - apps/traces/apps/mobile/components/Button.tsx | 39 - .../apps/mobile/components/CitiesList.tsx | 208 - .../components/ConsolidatedLocationList.tsx | 491 -- .../apps/mobile/components/CountriesList.tsx | 226 - .../apps/mobile/components/HeaderButton.tsx | 35 - .../mobile/components/LocationHistoryList.tsx | 473 -- .../apps/mobile/components/LocationMap.tsx | 259 - .../apps/mobile/components/LogsList.tsx | 183 - .../mobile/components/PhotoImportModal.tsx | 489 -- .../apps/mobile/components/PlaceDetail.tsx | 400 -- .../apps/mobile/components/PlacesList.tsx | 256 - .../mobile/components/SegmentedControl.tsx | 127 - .../apps/mobile/components/SettingsButton.tsx | 18 - .../apps/mobile/components/ThemeToggle.tsx | 30 - .../mobile/components/ThemeVariantPicker.tsx | 149 - .../apps/mobile/components/ThemeWrapper.tsx | 21 - .../mobile/components/TrackingControls.tsx | 457 -- apps/traces/apps/mobile/components/WebMap.tsx | 162 - apps/traces/apps/mobile/eas.json | 39 - apps/traces/apps/mobile/global.css | 3 - apps/traces/apps/mobile/metro.config.js | 25 - apps/traces/apps/mobile/nativewind-env.d.ts | 3 - apps/traces/apps/mobile/package.json | 65 - apps/traces/apps/mobile/prettier.config.js | 10 - .../mobile/readmes/STANDORT_BERECHTIGUNGEN.md | 242 - apps/traces/apps/mobile/tailwind.config.js | 23 - apps/traces/apps/mobile/tsconfig.json | 12 - apps/traces/apps/mobile/utils/apiClient.ts | 55 - .../mobile/utils/backgroundLocationTask.ts | 451 -- .../apps/mobile/utils/locationHelper.ts | 261 - .../apps/mobile/utils/locationService.ts | 663 --- apps/traces/apps/mobile/utils/logService.ts | 91 - .../apps/mobile/utils/photoImportService.ts | 283 - apps/traces/apps/mobile/utils/placeService.ts | 387 -- .../mobile/utils/registerBackgroundTasks.ts | 16 - apps/traces/apps/mobile/utils/syncService.ts | 141 - .../traces/apps/mobile/utils/themeContext.tsx | 194 - package.json | 6 - pnpm-lock.yaml | 4774 +---------------- 691 files changed, 26 insertions(+), 106334 deletions(-) delete mode 100644 apps/cards/apps/mobile/.env.example delete mode 100644 apps/cards/apps/mobile/.env.production delete mode 100644 apps/cards/apps/mobile/.gitignore delete mode 100644 apps/cards/apps/mobile/.mcp.json delete mode 100644 apps/cards/apps/mobile/CLAUDE.md delete mode 100644 apps/cards/apps/mobile/Docs/AI-Implementation-Plan.md delete mode 100644 apps/cards/apps/mobile/Docs/EXPO_NATIVE_TABS.md delete mode 100644 apps/cards/apps/mobile/Docs/EXPO_UI_DOCS.md delete mode 100644 apps/cards/apps/mobile/Docs/EXPO_UI_OFFFICIAL_DOCS.md delete mode 100644 apps/cards/apps/mobile/Docs/GLASS_HEADER_GUIDE.md delete mode 100644 apps/cards/apps/mobile/Docs/HEADER_STYLING_GUIDE.md delete mode 100644 apps/cards/apps/mobile/Docs/NATIVE_TAB_BEHAVIOR.md delete mode 100644 apps/cards/apps/mobile/Docs/database.md delete mode 100644 apps/cards/apps/mobile/Docs/expo-sdk-54-upgrade-guide.md delete mode 100644 apps/cards/apps/mobile/Docs/expo-sdk-54-upgrade.md delete mode 100644 apps/cards/apps/mobile/Docs/frontend-components-plan.md delete mode 100644 apps/cards/apps/mobile/Docs/next-steps-implementation-plan.md delete mode 100644 apps/cards/apps/mobile/Docs/phase-3-card-system-plan.md delete mode 100644 apps/cards/apps/mobile/Docs/samples/create-system-user.sql delete mode 100644 apps/cards/apps/mobile/Docs/samples/sample-deck-english-basics.sql delete mode 100644 apps/cards/apps/mobile/Docs/samples/sample-deck-german-basics-simple.sql delete mode 100644 apps/cards/apps/mobile/Docs/samples/sample-deck-german-basics.sql delete mode 100644 apps/cards/apps/mobile/Docs/samples/sample-deck-history-world.sql delete mode 100644 apps/cards/apps/mobile/Docs/samples/sample-deck-math-basics.sql delete mode 100644 apps/cards/apps/mobile/Docs/spaced-repetition.md delete mode 100644 apps/cards/apps/mobile/Docs/user-guides/deck-creation.md delete mode 100644 apps/cards/apps/mobile/Docs/user-guides/public-deck-suggestions.md delete mode 100644 apps/cards/apps/mobile/SPACING_MIGRATION.md delete mode 100644 apps/cards/apps/mobile/Setup_Docs/SupabaseMCPClaudeCodeSetup.md delete mode 100644 apps/cards/apps/mobile/app-env.d.ts delete mode 100644 apps/cards/apps/mobile/app.config.ts delete mode 100644 apps/cards/apps/mobile/app.json delete mode 100644 apps/cards/apps/mobile/app/(auth)/_layout.tsx delete mode 100644 apps/cards/apps/mobile/app/(auth)/forgot-password.tsx delete mode 100644 apps/cards/apps/mobile/app/(auth)/login.tsx delete mode 100644 apps/cards/apps/mobile/app/(auth)/register.tsx delete mode 100644 apps/cards/apps/mobile/app/(tabs)/_layout.tsx delete mode 100644 apps/cards/apps/mobile/app/(tabs)/decks/_layout.tsx delete mode 100644 apps/cards/apps/mobile/app/(tabs)/decks/index.tsx delete mode 100644 apps/cards/apps/mobile/app/(tabs)/explore/_layout.tsx delete mode 100644 apps/cards/apps/mobile/app/(tabs)/explore/index.tsx delete mode 100644 apps/cards/apps/mobile/app/(tabs)/index.tsx delete mode 100644 apps/cards/apps/mobile/app/(tabs)/profile/_layout.tsx delete mode 100644 apps/cards/apps/mobile/app/(tabs)/profile/index.tsx delete mode 100644 apps/cards/apps/mobile/app/(tabs)/progress/_layout.tsx delete mode 100644 apps/cards/apps/mobile/app/(tabs)/progress/index.tsx delete mode 100644 apps/cards/apps/mobile/app/+html.tsx delete mode 100644 apps/cards/apps/mobile/app/+not-found.tsx delete mode 100644 apps/cards/apps/mobile/app/_layout.tsx delete mode 100644 apps/cards/apps/mobile/app/card/[id].tsx delete mode 100644 apps/cards/apps/mobile/app/card/create.tsx delete mode 100644 apps/cards/apps/mobile/app/card/edit/[id].tsx delete mode 100644 apps/cards/apps/mobile/app/deck/[id].tsx delete mode 100644 apps/cards/apps/mobile/app/deck/[id]/cards.tsx delete mode 100644 apps/cards/apps/mobile/app/deck/[id]/edit.tsx delete mode 100644 apps/cards/apps/mobile/app/deck/create.tsx delete mode 100644 apps/cards/apps/mobile/app/index.tsx delete mode 100644 apps/cards/apps/mobile/app/modal.tsx delete mode 100644 apps/cards/apps/mobile/app/study/session/[id].tsx delete mode 100644 apps/cards/apps/mobile/app/study/summary/[id].tsx delete mode 100644 apps/cards/apps/mobile/assets/adaptive-icon.png delete mode 100644 apps/cards/apps/mobile/assets/favicon.png delete mode 100644 apps/cards/apps/mobile/assets/icon.png delete mode 100644 apps/cards/apps/mobile/assets/splash.png delete mode 100644 apps/cards/apps/mobile/babel.config.js delete mode 100644 apps/cards/apps/mobile/cesconfig.jsonc delete mode 100644 apps/cards/apps/mobile/components/EditScreenInfo.tsx delete mode 100644 apps/cards/apps/mobile/components/ErrorBoundary.tsx delete mode 100644 apps/cards/apps/mobile/components/HeaderButton.tsx delete mode 100644 apps/cards/apps/mobile/components/InsufficientCreditsModal.tsx delete mode 100644 apps/cards/apps/mobile/components/ScreenContent.tsx delete mode 100644 apps/cards/apps/mobile/components/TabBarIcon.tsx delete mode 100644 apps/cards/apps/mobile/components/ThemeProvider.tsx delete mode 100644 apps/cards/apps/mobile/components/ThemeWrapper.tsx delete mode 100644 apps/cards/apps/mobile/components/ai/ImageCardCreator.tsx delete mode 100644 apps/cards/apps/mobile/components/ai/SmartCardCreator.tsx delete mode 100644 apps/cards/apps/mobile/components/card/CardList.tsx delete mode 100644 apps/cards/apps/mobile/components/card/CardTypeSelector.tsx delete mode 100644 apps/cards/apps/mobile/components/card/CardView.tsx delete mode 100644 apps/cards/apps/mobile/components/deck/DeckCard.tsx delete mode 100644 apps/cards/apps/mobile/components/progress/DeckProgressCard.tsx delete mode 100644 apps/cards/apps/mobile/components/progress/HeatmapCalendar.tsx delete mode 100644 apps/cards/apps/mobile/components/progress/ProgressChart.tsx delete mode 100644 apps/cards/apps/mobile/components/progress/StreakCard.tsx delete mode 100644 apps/cards/apps/mobile/components/study/StudyModeSelector.tsx delete mode 100644 apps/cards/apps/mobile/components/ui/Button.tsx delete mode 100644 apps/cards/apps/mobile/components/ui/Card.tsx delete mode 100644 apps/cards/apps/mobile/components/ui/FilterBar.tsx delete mode 100644 apps/cards/apps/mobile/components/ui/FloatingActionButton.tsx delete mode 100644 apps/cards/apps/mobile/components/ui/Icon.tsx delete mode 100644 apps/cards/apps/mobile/components/ui/Input.tsx delete mode 100644 apps/cards/apps/mobile/components/ui/PageHeader.tsx delete mode 100644 apps/cards/apps/mobile/components/ui/SettingsItem.tsx delete mode 100644 apps/cards/apps/mobile/components/ui/SettingsSection.tsx delete mode 100644 apps/cards/apps/mobile/components/ui/Switch.tsx delete mode 100644 apps/cards/apps/mobile/components/ui/Text.tsx delete mode 100644 apps/cards/apps/mobile/components/ui/ThemeDebug.tsx delete mode 100644 apps/cards/apps/mobile/components/ui/ThemeSwitcher.tsx delete mode 100644 apps/cards/apps/mobile/eas.json delete mode 100644 apps/cards/apps/mobile/eslint.config.mjs delete mode 100644 apps/cards/apps/mobile/examples/DeckCreationExample.tsx delete mode 100644 apps/cards/apps/mobile/global.css delete mode 100644 apps/cards/apps/mobile/hooks/useCredits.ts delete mode 100644 apps/cards/apps/mobile/hooks/useInsufficientCredits.ts delete mode 100644 apps/cards/apps/mobile/metro.config.js delete mode 100644 apps/cards/apps/mobile/nativewind-env.d.ts delete mode 100644 apps/cards/apps/mobile/package.json delete mode 100644 apps/cards/apps/mobile/prettier.config.js delete mode 100644 apps/cards/apps/mobile/services/apiClient.ts delete mode 100644 apps/cards/apps/mobile/services/authService.ts delete mode 100644 apps/cards/apps/mobile/services/creditService.ts delete mode 100644 apps/cards/apps/mobile/services/tokenManager.ts delete mode 100644 apps/cards/apps/mobile/store/aiStore.ts delete mode 100644 apps/cards/apps/mobile/store/authStore.ts delete mode 100644 apps/cards/apps/mobile/store/cardStore.ts delete mode 100644 apps/cards/apps/mobile/store/deckStore.ts delete mode 100644 apps/cards/apps/mobile/store/progressStore.ts delete mode 100644 apps/cards/apps/mobile/store/store.ts delete mode 100644 apps/cards/apps/mobile/store/studyStore.ts delete mode 100644 apps/cards/apps/mobile/store/themeStore.tsx delete mode 100644 apps/cards/apps/mobile/tailwind.config.js delete mode 100644 apps/cards/apps/mobile/themes/default.ts delete mode 100644 apps/cards/apps/mobile/themes/forest.ts delete mode 100644 apps/cards/apps/mobile/themes/index.ts delete mode 100644 apps/cards/apps/mobile/themes/sunset.ts delete mode 100644 apps/cards/apps/mobile/tsconfig.json delete mode 100644 apps/cards/apps/mobile/types/auth.ts delete mode 100644 apps/cards/apps/mobile/types/credits.ts delete mode 100644 apps/cards/apps/mobile/types/theme.ts delete mode 100644 apps/cards/apps/mobile/utils/apiClient.ts delete mode 100644 apps/cards/apps/mobile/utils/logger.ts delete mode 100644 apps/cards/apps/mobile/utils/networkErrorUtils.ts delete mode 100644 apps/cards/apps/mobile/utils/spacedRepetition.ts delete mode 100644 apps/cards/apps/mobile/utils/spacing.ts delete mode 100644 apps/cards/apps/mobile/utils/supabaseAIService.ts delete mode 100644 apps/cards/apps/mobile/utils/themeUtils.ts delete mode 100644 apps/chat/apps/mobile/.env.example delete mode 100644 apps/chat/apps/mobile/.gitignore delete mode 100644 apps/chat/apps/mobile/CLAUDE.md delete mode 100644 apps/chat/apps/mobile/README.md delete mode 100644 apps/chat/apps/mobile/VEREINFACHUNG.md delete mode 100644 apps/chat/apps/mobile/VEREINFACHUNG_STATUS.md delete mode 100644 apps/chat/apps/mobile/app-env.d.ts delete mode 100644 apps/chat/apps/mobile/app.json delete mode 100644 apps/chat/apps/mobile/app/(drawer)/_layout.tsx delete mode 100644 apps/chat/apps/mobile/app/+html.tsx delete mode 100644 apps/chat/apps/mobile/app/+not-found.tsx delete mode 100644 apps/chat/apps/mobile/app/_layout.tsx delete mode 100644 apps/chat/apps/mobile/app/api/models+api.ts delete mode 100644 apps/chat/apps/mobile/app/api/usage+api.ts delete mode 100644 apps/chat/apps/mobile/app/archive.tsx delete mode 100644 apps/chat/apps/mobile/app/auth/_layout.tsx delete mode 100644 apps/chat/apps/mobile/app/auth/login.tsx delete mode 100644 apps/chat/apps/mobile/app/auth/register.tsx delete mode 100644 apps/chat/apps/mobile/app/auth/reset-password.tsx delete mode 100644 apps/chat/apps/mobile/app/conversation/[id].tsx delete mode 100644 apps/chat/apps/mobile/app/conversation/new/index.tsx delete mode 100644 apps/chat/apps/mobile/app/conversations.tsx delete mode 100644 apps/chat/apps/mobile/app/documents.tsx delete mode 100644 apps/chat/apps/mobile/app/index.tsx delete mode 100644 apps/chat/apps/mobile/app/model-selection.tsx delete mode 100644 apps/chat/apps/mobile/app/profile.tsx delete mode 100644 apps/chat/apps/mobile/app/settings.tsx delete mode 100644 apps/chat/apps/mobile/app/spaces/[id]/index.tsx delete mode 100644 apps/chat/apps/mobile/app/spaces/index.tsx delete mode 100644 apps/chat/apps/mobile/app/spaces/new.tsx delete mode 100644 apps/chat/apps/mobile/app/templates.tsx delete mode 100644 apps/chat/apps/mobile/assets/adaptive-icon.png delete mode 100644 apps/chat/apps/mobile/assets/favicon.png delete mode 100644 apps/chat/apps/mobile/assets/icon.png delete mode 100644 apps/chat/apps/mobile/assets/splash.png delete mode 100644 apps/chat/apps/mobile/babel.config.js delete mode 100644 apps/chat/apps/mobile/cesconfig.json delete mode 100644 apps/chat/apps/mobile/components/Button.tsx delete mode 100644 apps/chat/apps/mobile/components/ChatHeader.tsx delete mode 100644 apps/chat/apps/mobile/components/ChatInput.tsx delete mode 100644 apps/chat/apps/mobile/components/ChatPromptInput.tsx delete mode 100644 apps/chat/apps/mobile/components/Container.tsx delete mode 100644 apps/chat/apps/mobile/components/ConversationStarter.tsx delete mode 100644 apps/chat/apps/mobile/components/CustomDrawer.tsx delete mode 100644 apps/chat/apps/mobile/components/DocumentPanel.tsx delete mode 100644 apps/chat/apps/mobile/components/DocumentVersions.tsx delete mode 100644 apps/chat/apps/mobile/components/EditScreenInfo.tsx delete mode 100644 apps/chat/apps/mobile/components/MessageInput.tsx delete mode 100644 apps/chat/apps/mobile/components/MessageItem.tsx delete mode 100644 apps/chat/apps/mobile/components/MessageList.tsx delete mode 100644 apps/chat/apps/mobile/components/ModelCard.tsx delete mode 100644 apps/chat/apps/mobile/components/ModelDropdown.tsx delete mode 100644 apps/chat/apps/mobile/components/NewChatButton.tsx delete mode 100644 apps/chat/apps/mobile/components/SkeletonLoader.tsx delete mode 100644 apps/chat/apps/mobile/components/TemplateCard.tsx delete mode 100644 apps/chat/apps/mobile/components/TemplateForm.tsx delete mode 100644 apps/chat/apps/mobile/components/TypingIndicator.tsx delete mode 100644 apps/chat/apps/mobile/config/azure.ts delete mode 100644 apps/chat/apps/mobile/context/AuthProvider.tsx delete mode 100644 apps/chat/apps/mobile/eas.json delete mode 100644 apps/chat/apps/mobile/eslint.config.mjs delete mode 100644 apps/chat/apps/mobile/global.css delete mode 100644 apps/chat/apps/mobile/hooks/useChatInput.ts delete mode 100644 apps/chat/apps/mobile/metro.config.js delete mode 100644 apps/chat/apps/mobile/nativewind-env.d.ts delete mode 100644 apps/chat/apps/mobile/package.json delete mode 100644 apps/chat/apps/mobile/prettier.config.js delete mode 100644 apps/chat/apps/mobile/readme/ExpoApiRoutes.md delete mode 100644 apps/chat/apps/mobile/readme/NativeWind.md delete mode 100644 apps/chat/apps/mobile/readme/README.md delete mode 100644 apps/chat/apps/mobile/readme/Supabase.md delete mode 100644 apps/chat/apps/mobile/readme/TokenAccounting.md delete mode 100644 apps/chat/apps/mobile/scripts/add_archive_functionality.sql delete mode 100644 apps/chat/apps/mobile/scripts/add_conversation_title.sql delete mode 100644 apps/chat/apps/mobile/scripts/check_and_create_models.sql delete mode 100644 apps/chat/apps/mobile/scripts/check_azure_openai.sql delete mode 100644 apps/chat/apps/mobile/scripts/create_delete_document_function.sql delete mode 100644 apps/chat/apps/mobile/scripts/create_templates_table.sql delete mode 100644 apps/chat/apps/mobile/scripts/create_usage_functions.sql delete mode 100644 apps/chat/apps/mobile/scripts/create_usage_logs_table.sql delete mode 100644 apps/chat/apps/mobile/scripts/create_users_table.sql delete mode 100644 apps/chat/apps/mobile/scripts/fix_conversation_creation.sql delete mode 100644 apps/chat/apps/mobile/scripts/fix_messages_constraint.sql delete mode 100644 apps/chat/apps/mobile/scripts/fix_models_table.sql delete mode 100644 apps/chat/apps/mobile/scripts/fix_rls_policies.sql delete mode 100644 apps/chat/apps/mobile/scripts/fix_templates_table.sql delete mode 100644 apps/chat/apps/mobile/scripts/setup_rls_policies.sql delete mode 100644 apps/chat/apps/mobile/scripts/setup_supabase.js delete mode 100644 apps/chat/apps/mobile/scripts/setup_supabase_functions.sql delete mode 100644 apps/chat/apps/mobile/scripts/spaces/create_spaces_rls.sql delete mode 100644 apps/chat/apps/mobile/scripts/spaces/create_spaces_tables.sql delete mode 100644 apps/chat/apps/mobile/scripts/spaces/create_spaces_triggers.sql delete mode 100644 apps/chat/apps/mobile/scripts/spaces/fix_rls_policies.sql delete mode 100644 apps/chat/apps/mobile/scripts/spaces/fix_rls_policies_v2.sql delete mode 100755 apps/chat/apps/mobile/scripts/spaces/setup_spaces.js delete mode 100644 apps/chat/apps/mobile/scripts/supabase-cli.js delete mode 100644 apps/chat/apps/mobile/scripts/update_models.js delete mode 100644 apps/chat/apps/mobile/scripts/update_models.sql delete mode 100644 apps/chat/apps/mobile/services/api.ts delete mode 100644 apps/chat/apps/mobile/services/conversation.ts delete mode 100644 apps/chat/apps/mobile/services/document.ts delete mode 100644 apps/chat/apps/mobile/services/modelService.ts delete mode 100644 apps/chat/apps/mobile/services/openai.ts delete mode 100644 apps/chat/apps/mobile/services/space.ts delete mode 100644 apps/chat/apps/mobile/services/template.ts delete mode 100644 apps/chat/apps/mobile/supabase/.temp/cli-latest delete mode 100644 apps/chat/apps/mobile/supabase/.temp/gotrue-version delete mode 100644 apps/chat/apps/mobile/supabase/.temp/pooler-url delete mode 100644 apps/chat/apps/mobile/supabase/.temp/postgres-version delete mode 100644 apps/chat/apps/mobile/supabase/.temp/project-ref delete mode 100644 apps/chat/apps/mobile/supabase/.temp/rest-version delete mode 100644 apps/chat/apps/mobile/tailwind.config.js delete mode 100644 apps/chat/apps/mobile/test-api.js delete mode 100644 apps/chat/apps/mobile/test-openai.js delete mode 100644 apps/chat/apps/mobile/theme/ThemeProvider.tsx delete mode 100644 apps/chat/apps/mobile/theme/index.ts delete mode 100644 apps/chat/apps/mobile/tsconfig.json delete mode 100644 apps/chat/apps/mobile/types.ts delete mode 100644 apps/chat/apps/mobile/types/index.ts delete mode 100644 apps/chat/apps/mobile/utils/api.ts delete mode 100644 apps/chat/apps/mobile/utils/backendApi.ts delete mode 100644 apps/context/apps/mobile/.env.example delete mode 100644 apps/context/apps/mobile/.env.production delete mode 100644 apps/context/apps/mobile/.gitignore delete mode 100644 apps/context/apps/mobile/AI-FEATURES.md delete mode 100644 apps/context/apps/mobile/Context-Readme-Database.md delete mode 100644 apps/context/apps/mobile/MONETIZATION.md delete mode 100644 apps/context/apps/mobile/NextSteps.md delete mode 100644 apps/context/apps/mobile/ReadMe.md delete mode 100644 apps/context/apps/mobile/ReadMe/DocumentEditorVerbesserungsplan.md delete mode 100644 apps/context/apps/mobile/ReadMe/ExpoUI.md delete mode 100644 apps/context/apps/mobile/ReadMe/FeatureOverview.md delete mode 100644 apps/context/apps/mobile/ReadMe/Optimaziations/Homepage.md delete mode 100644 apps/context/apps/mobile/ReadMe/Phase1Zusammenfassung.md delete mode 100644 apps/context/apps/mobile/ReadMe/SeitenanalsyeBericht.md delete mode 100644 apps/context/apps/mobile/app-env.d.ts delete mode 100644 apps/context/apps/mobile/app.json delete mode 100644 apps/context/apps/mobile/app/+html.tsx delete mode 100644 apps/context/apps/mobile/app/+not-found.tsx delete mode 100644 apps/context/apps/mobile/app/_layout.tsx delete mode 100644 apps/context/apps/mobile/app/details.tsx delete mode 100644 apps/context/apps/mobile/app/index.tsx delete mode 100644 apps/context/apps/mobile/app/login.tsx delete mode 100644 apps/context/apps/mobile/app/register.tsx delete mode 100644 apps/context/apps/mobile/app/settings/index.tsx delete mode 100644 apps/context/apps/mobile/app/spaces/[id]/documents/[documentId].tsx delete mode 100644 apps/context/apps/mobile/app/spaces/[id]/documents/documentStyles.ts delete mode 100644 apps/context/apps/mobile/app/spaces/[id]/index.tsx delete mode 100644 apps/context/apps/mobile/app/spaces/create/index.tsx delete mode 100644 apps/context/apps/mobile/app/spaces/index.tsx delete mode 100644 apps/context/apps/mobile/app/tokens/index.tsx delete mode 100644 apps/context/apps/mobile/assets/adaptive-icon.png delete mode 100644 apps/context/apps/mobile/assets/favicon.png delete mode 100644 apps/context/apps/mobile/assets/icon.png delete mode 100644 apps/context/apps/mobile/assets/splash.png delete mode 100644 apps/context/apps/mobile/babel.config.js delete mode 100644 apps/context/apps/mobile/components/Button.tsx delete mode 100644 apps/context/apps/mobile/components/Container.tsx delete mode 100644 apps/context/apps/mobile/components/EditScreenInfo.tsx delete mode 100644 apps/context/apps/mobile/components/ScreenContent.tsx delete mode 100644 apps/context/apps/mobile/components/ai/AIActionButton.tsx delete mode 100644 apps/context/apps/mobile/components/ai/AIAssistant.tsx delete mode 100644 apps/context/apps/mobile/components/ai/BottomLLMToolbar.tsx delete mode 100644 apps/context/apps/mobile/components/ai/ModelSelector.tsx delete mode 100644 apps/context/apps/mobile/components/ai/PromptEditor.tsx delete mode 100644 apps/context/apps/mobile/components/ai/SpacesLLMToolbar.tsx delete mode 100644 apps/context/apps/mobile/components/auth/LoginForm.tsx delete mode 100644 apps/context/apps/mobile/components/auth/ProtectedRoute.tsx delete mode 100644 apps/context/apps/mobile/components/auth/RegisterForm.tsx delete mode 100644 apps/context/apps/mobile/components/documents/BatchDocumentCreator.tsx delete mode 100644 apps/context/apps/mobile/components/documents/DeleteDocumentButton.tsx delete mode 100644 apps/context/apps/mobile/components/documents/DocumentCard.tsx delete mode 100644 apps/context/apps/mobile/components/documents/DocumentCardDeleteButton.tsx delete mode 100644 apps/context/apps/mobile/components/documents/DocumentCardToolbar.tsx delete mode 100644 apps/context/apps/mobile/components/documents/DocumentContent.tsx delete mode 100644 apps/context/apps/mobile/components/documents/DocumentEditor.tsx delete mode 100644 apps/context/apps/mobile/components/documents/DocumentGallery.tsx delete mode 100644 apps/context/apps/mobile/components/documents/DocumentHeader.tsx delete mode 100644 apps/context/apps/mobile/components/documents/DocumentSelectionIndicator.tsx delete mode 100644 apps/context/apps/mobile/components/documents/DocumentSkeleton.tsx delete mode 100644 apps/context/apps/mobile/components/documents/DocumentTagsEditor.tsx delete mode 100644 apps/context/apps/mobile/components/documents/DocumentTagsFilter.tsx delete mode 100644 apps/context/apps/mobile/components/documents/DocumentTagsPills.tsx delete mode 100644 apps/context/apps/mobile/components/documents/DocumentToolbar.tsx delete mode 100644 apps/context/apps/mobile/components/documents/DocumentTypeBadge.tsx delete mode 100644 apps/context/apps/mobile/components/documents/DocumentTypeDropdown.tsx delete mode 100644 apps/context/apps/mobile/components/documents/DocumentTypeFilter.tsx delete mode 100644 apps/context/apps/mobile/components/documents/DocumentTypeFilterDropdown.tsx delete mode 100644 apps/context/apps/mobile/components/documents/DocumentTypeSelector.tsx delete mode 100644 apps/context/apps/mobile/components/documents/SaveStateIndicator.tsx delete mode 100644 apps/context/apps/mobile/components/documents/VersionNavigator.tsx delete mode 100644 apps/context/apps/mobile/components/functional/SearchBar.tsx delete mode 100644 apps/context/apps/mobile/components/functional/SupabaseConnectionTest.tsx delete mode 100644 apps/context/apps/mobile/components/layout/AppLayout.tsx delete mode 100644 apps/context/apps/mobile/components/layout/EmptyState.tsx delete mode 100644 apps/context/apps/mobile/components/layout/Screen.tsx delete mode 100644 apps/context/apps/mobile/components/mentions/DocumentPreview.tsx delete mode 100644 apps/context/apps/mobile/components/mentions/HighlightedMentionInput.tsx delete mode 100644 apps/context/apps/mobile/components/mentions/MentionDropdown.tsx delete mode 100644 apps/context/apps/mobile/components/mentions/MentionHighlighter.tsx delete mode 100644 apps/context/apps/mobile/components/mentions/MentionRenderer.tsx delete mode 100644 apps/context/apps/mobile/components/mentions/MentionTextInput.tsx delete mode 100644 apps/context/apps/mobile/components/monetization/TokenDisplay.tsx delete mode 100644 apps/context/apps/mobile/components/monetization/TokenEstimator.tsx delete mode 100644 apps/context/apps/mobile/components/monetization/TokenStore.tsx delete mode 100644 apps/context/apps/mobile/components/navigation/Breadcrumbs.tsx delete mode 100644 apps/context/apps/mobile/components/settings/LanguagePicker.tsx delete mode 100644 apps/context/apps/mobile/components/spaces/AllSpacesFilterPill.tsx delete mode 100644 apps/context/apps/mobile/components/spaces/DeleteSpaceButton.tsx delete mode 100644 apps/context/apps/mobile/components/spaces/InlineSpaceCreator.tsx delete mode 100644 apps/context/apps/mobile/components/spaces/SpaceCard.tsx delete mode 100644 apps/context/apps/mobile/components/spaces/SpaceCreator.tsx delete mode 100644 apps/context/apps/mobile/components/spaces/SpaceDetailSkeleton.tsx delete mode 100644 apps/context/apps/mobile/components/spaces/SpaceDropdown.tsx delete mode 100644 apps/context/apps/mobile/components/spaces/SpaceEditor.tsx.new delete mode 100644 apps/context/apps/mobile/components/spaces/SpaceFilterPill.tsx delete mode 100644 apps/context/apps/mobile/components/spaces/SpaceFilterPillSkeleton.tsx delete mode 100644 apps/context/apps/mobile/components/spaces/ThemedSpaceCard.tsx delete mode 100644 apps/context/apps/mobile/components/theme/ThemeProvider.tsx delete mode 100644 apps/context/apps/mobile/components/theme/ThemeSelector.tsx delete mode 100644 apps/context/apps/mobile/components/theme/index.ts delete mode 100644 apps/context/apps/mobile/components/ui/Avatar.tsx delete mode 100644 apps/context/apps/mobile/components/ui/Badge.tsx delete mode 100644 apps/context/apps/mobile/components/ui/Card.tsx delete mode 100644 apps/context/apps/mobile/components/ui/ConfirmationModal.tsx delete mode 100644 apps/context/apps/mobile/components/ui/FilterPill.tsx delete mode 100644 apps/context/apps/mobile/components/ui/Input.tsx delete mode 100644 apps/context/apps/mobile/components/ui/LoadingScreen.tsx delete mode 100644 apps/context/apps/mobile/components/ui/QuickStartCard.tsx delete mode 100644 apps/context/apps/mobile/components/ui/SaveIndicator.tsx delete mode 100644 apps/context/apps/mobile/components/ui/Skeleton.tsx delete mode 100644 apps/context/apps/mobile/components/ui/Text.tsx delete mode 100644 apps/context/apps/mobile/components/ui/ThemedButton.tsx delete mode 100644 apps/context/apps/mobile/components/ui/ThemedCard.tsx delete mode 100644 apps/context/apps/mobile/components/variants/VariantCreator.tsx delete mode 100644 apps/context/apps/mobile/config/editorConfig.ts delete mode 100644 apps/context/apps/mobile/context/AuthProvider.tsx delete mode 100644 apps/context/apps/mobile/context/DebugContext.tsx delete mode 100644 apps/context/apps/mobile/context/I18nContext.tsx delete mode 100644 apps/context/apps/mobile/eas.json delete mode 100644 apps/context/apps/mobile/global.css delete mode 100644 apps/context/apps/mobile/hooks/useAutoSave.ts delete mode 100644 apps/context/apps/mobile/hooks/useDocumentEditor.ts delete mode 100644 apps/context/apps/mobile/hooks/useDocumentSave.ts delete mode 100644 apps/context/apps/mobile/hooks/useKeyboardShortcuts.ts delete mode 100644 apps/context/apps/mobile/locales/de.json delete mode 100644 apps/context/apps/mobile/locales/en.json delete mode 100644 apps/context/apps/mobile/metro.config.js delete mode 100644 apps/context/apps/mobile/migrations/add_monetization_system.sql delete mode 100644 apps/context/apps/mobile/migrations/add_pinned_to_spaces.sql delete mode 100644 apps/context/apps/mobile/migrations/add_short_id_system.sql delete mode 100644 apps/context/apps/mobile/migrations/fix_increment_counter.sql delete mode 100644 apps/context/apps/mobile/migrations/remove_title_field.sql delete mode 100644 apps/context/apps/mobile/migrations/supabase-setup.sql delete mode 100644 apps/context/apps/mobile/migrations/update_document_type_constraint.sql delete mode 100644 apps/context/apps/mobile/migrations/update_document_types.sql delete mode 100644 apps/context/apps/mobile/nativewind-env.d.ts delete mode 100644 apps/context/apps/mobile/package.json delete mode 100644 apps/context/apps/mobile/prettier.config.js delete mode 100644 apps/context/apps/mobile/services/aiService.ts delete mode 100644 apps/context/apps/mobile/services/backendApi.ts delete mode 100644 apps/context/apps/mobile/services/revenueCatProductIds.ts delete mode 100644 apps/context/apps/mobile/services/revenueCatService.ts delete mode 100644 apps/context/apps/mobile/services/supabaseService.ts delete mode 100644 apps/context/apps/mobile/services/tokenCountingService.ts delete mode 100644 apps/context/apps/mobile/services/tokenTransactionService.ts delete mode 100644 apps/context/apps/mobile/services/wordCountService.ts delete mode 100644 apps/context/apps/mobile/tailwind.config.js delete mode 100644 apps/context/apps/mobile/tsconfig.json delete mode 100644 apps/context/apps/mobile/types/document.ts delete mode 100644 apps/context/apps/mobile/types/documentEditor.ts delete mode 100644 apps/context/apps/mobile/utils/debounce.ts delete mode 100644 apps/context/apps/mobile/utils/debug.ts delete mode 100644 apps/context/apps/mobile/utils/eventEmitter.ts delete mode 100644 apps/context/apps/mobile/utils/i18n.ts delete mode 100644 apps/context/apps/mobile/utils/markdown.ts delete mode 100644 apps/context/apps/mobile/utils/markdownProcessor.ts delete mode 100644 apps/context/apps/mobile/utils/markdownVariants.ts delete mode 100644 apps/context/apps/mobile/utils/mentionProcessor.ts delete mode 100644 apps/context/apps/mobile/utils/supabaseTest.ts delete mode 100644 apps/context/apps/mobile/utils/textUtils.ts delete mode 100644 apps/context/apps/mobile/utils/theme/colors.ts delete mode 100644 apps/context/apps/mobile/utils/theme/index.ts delete mode 100644 apps/context/apps/mobile/utils/theme/theme.ts delete mode 100644 apps/mana/apps/mobile/.env.example delete mode 100644 apps/mana/apps/mobile/.gitignore delete mode 100644 apps/mana/apps/mobile/app-env.d.ts delete mode 100644 apps/mana/apps/mobile/app.json delete mode 100644 apps/mana/apps/mobile/app/(drawer)/(tabs)/_layout.tsx delete mode 100644 apps/mana/apps/mobile/app/(drawer)/(tabs)/index.tsx delete mode 100644 apps/mana/apps/mobile/app/(drawer)/(tabs)/two.tsx delete mode 100644 apps/mana/apps/mobile/app/(drawer)/_layout.tsx delete mode 100644 apps/mana/apps/mobile/app/(drawer)/apps.tsx delete mode 100644 apps/mana/apps/mobile/app/(drawer)/get-mana.tsx delete mode 100644 apps/mana/apps/mobile/app/(drawer)/index.tsx delete mode 100644 apps/mana/apps/mobile/app/(drawer)/organizations/[id].tsx delete mode 100644 apps/mana/apps/mobile/app/(drawer)/organizations/index.tsx delete mode 100644 apps/mana/apps/mobile/app/(drawer)/send-mana.tsx delete mode 100644 apps/mana/apps/mobile/app/(drawer)/settings.tsx delete mode 100644 apps/mana/apps/mobile/app/(drawer)/teams/[id].tsx delete mode 100644 apps/mana/apps/mobile/app/(drawer)/teams/index.tsx delete mode 100644 apps/mana/apps/mobile/app/+html.tsx delete mode 100644 apps/mana/apps/mobile/app/+not-found.tsx delete mode 100644 apps/mana/apps/mobile/app/_layout.tsx delete mode 100644 apps/mana/apps/mobile/app/auth/_layout.tsx delete mode 100644 apps/mana/apps/mobile/app/auth/reset-password.tsx delete mode 100644 apps/mana/apps/mobile/app/login.tsx delete mode 100644 apps/mana/apps/mobile/app/modal.tsx delete mode 100644 apps/mana/apps/mobile/assets/adaptive-icon.png delete mode 100644 apps/mana/apps/mobile/assets/favicon.png delete mode 100644 apps/mana/apps/mobile/assets/icon.png delete mode 100644 apps/mana/apps/mobile/assets/splash.png delete mode 100644 apps/mana/apps/mobile/babel.config.js delete mode 100644 apps/mana/apps/mobile/cesconfig.json delete mode 100644 apps/mana/apps/mobile/components/Account.tsx delete mode 100644 apps/mana/apps/mobile/components/Auth.tsx delete mode 100644 apps/mana/apps/mobile/components/Button.tsx delete mode 100644 apps/mana/apps/mobile/components/Container.tsx delete mode 100644 apps/mana/apps/mobile/components/CreateOrganization.tsx delete mode 100644 apps/mana/apps/mobile/components/CreateTeam.tsx delete mode 100644 apps/mana/apps/mobile/components/DashboardStats.tsx delete mode 100644 apps/mana/apps/mobile/components/EditScreenInfo.tsx delete mode 100644 apps/mana/apps/mobile/components/HeaderButton.tsx delete mode 100644 apps/mana/apps/mobile/components/OrganizationList.tsx delete mode 100644 apps/mana/apps/mobile/components/ScreenContent.tsx delete mode 100644 apps/mana/apps/mobile/components/SendMana.tsx delete mode 100644 apps/mana/apps/mobile/components/TabBarIcon.tsx delete mode 100644 apps/mana/apps/mobile/components/TeamList.tsx delete mode 100644 apps/mana/apps/mobile/components/TeamMembers.tsx delete mode 100644 apps/mana/apps/mobile/context/AuthProvider.tsx delete mode 100644 apps/mana/apps/mobile/eas.json delete mode 100644 apps/mana/apps/mobile/eslint.config.mjs delete mode 100644 apps/mana/apps/mobile/global.css delete mode 100644 apps/mana/apps/mobile/metro.config.js delete mode 100644 apps/mana/apps/mobile/nativewind-env.d.ts delete mode 100644 apps/mana/apps/mobile/netlify.toml delete mode 100644 apps/mana/apps/mobile/package.json delete mode 100644 apps/mana/apps/mobile/prettier.config.js delete mode 100644 apps/mana/apps/mobile/services/api.ts delete mode 100644 apps/mana/apps/mobile/supabase/migrations/20250315_find_user_by_email.sql delete mode 100644 apps/mana/apps/mobile/tailwind.config.js delete mode 100644 apps/mana/apps/mobile/tsconfig.json delete mode 100644 apps/mana/apps/mobile/utils/themeContext.tsx delete mode 100644 apps/picture/apps/mobile/.easignore delete mode 100644 apps/picture/apps/mobile/.gitignore delete mode 100644 apps/picture/apps/mobile/.npmrc delete mode 100644 apps/picture/apps/mobile/CLAUDE.md delete mode 100644 apps/picture/apps/mobile/app-env.d.ts delete mode 100644 apps/picture/apps/mobile/app.json delete mode 100644 apps/picture/apps/mobile/app/(auth)/login.tsx delete mode 100644 apps/picture/apps/mobile/app/(auth)/register.tsx delete mode 100644 apps/picture/apps/mobile/app/(auth)/reset-password.tsx delete mode 100644 apps/picture/apps/mobile/app/(tabs)/_layout.tsx delete mode 100644 apps/picture/apps/mobile/app/(tabs)/explore.tsx delete mode 100644 apps/picture/apps/mobile/app/(tabs)/generate/_layout.tsx delete mode 100644 apps/picture/apps/mobile/app/(tabs)/generate/index.tsx delete mode 100644 apps/picture/apps/mobile/app/(tabs)/index.tsx delete mode 100644 apps/picture/apps/mobile/app/(tabs)/profile.tsx delete mode 100644 apps/picture/apps/mobile/app/+html.tsx delete mode 100644 apps/picture/apps/mobile/app/+not-found.tsx delete mode 100644 apps/picture/apps/mobile/app/_layout.tsx delete mode 100644 apps/picture/apps/mobile/app/archive.tsx delete mode 100644 apps/picture/apps/mobile/app/image/[id].tsx delete mode 100644 apps/picture/apps/mobile/app/index.tsx delete mode 100644 apps/picture/apps/mobile/app/modal.tsx delete mode 100644 apps/picture/apps/mobile/app/tags.tsx delete mode 100644 apps/picture/apps/mobile/assets/adaptive-icon.png delete mode 100644 apps/picture/apps/mobile/assets/favicon.png delete mode 100644 apps/picture/apps/mobile/assets/icon.png delete mode 100644 apps/picture/apps/mobile/assets/splash.png delete mode 100644 apps/picture/apps/mobile/babel.config.js delete mode 100644 apps/picture/apps/mobile/cesconfig.jsonc delete mode 100644 apps/picture/apps/mobile/components/AspectRatioSelector.tsx delete mode 100644 apps/picture/apps/mobile/components/Button.tsx delete mode 100644 apps/picture/apps/mobile/components/Container.tsx delete mode 100644 apps/picture/apps/mobile/components/DesktopNav.tsx delete mode 100644 apps/picture/apps/mobile/components/EditScreenInfo.tsx delete mode 100644 apps/picture/apps/mobile/components/EmptyState.tsx delete mode 100644 apps/picture/apps/mobile/components/ErrorBanner.tsx delete mode 100644 apps/picture/apps/mobile/components/ErrorBoundary.tsx delete mode 100644 apps/picture/apps/mobile/components/ExploreSortBar.tsx delete mode 100644 apps/picture/apps/mobile/components/FAB.tsx delete mode 100644 apps/picture/apps/mobile/components/FilterBar.tsx delete mode 100644 apps/picture/apps/mobile/components/FilterToggle.tsx delete mode 100644 apps/picture/apps/mobile/components/GenerationToast.tsx delete mode 100644 apps/picture/apps/mobile/components/Header.tsx delete mode 100644 apps/picture/apps/mobile/components/HeaderButton.tsx delete mode 100644 apps/picture/apps/mobile/components/Icon.tsx delete mode 100644 apps/picture/apps/mobile/components/ImageCard.tsx delete mode 100644 apps/picture/apps/mobile/components/ImageCountSelector.tsx delete mode 100644 apps/picture/apps/mobile/components/ImageSkeleton.tsx delete mode 100644 apps/picture/apps/mobile/components/ModelSelector.tsx delete mode 100644 apps/picture/apps/mobile/components/OptionSelector.tsx delete mode 100644 apps/picture/apps/mobile/components/PageHeader.tsx delete mode 100644 apps/picture/apps/mobile/components/QuickGenerateBar.tsx delete mode 100644 apps/picture/apps/mobile/components/RateLimitIndicator.tsx delete mode 100644 apps/picture/apps/mobile/components/ScreenContent.tsx delete mode 100644 apps/picture/apps/mobile/components/StudioTabBar.tsx delete mode 100644 apps/picture/apps/mobile/components/TabBarIcon.tsx delete mode 100644 apps/picture/apps/mobile/components/TagFilter.tsx delete mode 100644 apps/picture/apps/mobile/components/Text.tsx delete mode 100644 apps/picture/apps/mobile/components/ThemePicker.tsx delete mode 100644 apps/picture/apps/mobile/components/ViewToggle.tsx delete mode 100644 apps/picture/apps/mobile/components/batch/BatchGenerationModal.tsx delete mode 100644 apps/picture/apps/mobile/components/batch/BatchProgressTracker.tsx delete mode 100644 apps/picture/apps/mobile/components/prompt/PromptBuilder.tsx delete mode 100644 apps/picture/apps/mobile/components/prompt/PromptEnhancer.tsx delete mode 100644 apps/picture/apps/mobile/components/prompt/TemplateGallery.tsx delete mode 100644 apps/picture/apps/mobile/components/remix/RemixBottomSheet.tsx delete mode 100644 apps/picture/apps/mobile/components/settings/GenerationSettings.tsx delete mode 100644 apps/picture/apps/mobile/components/tags/TagDisplay.tsx delete mode 100644 apps/picture/apps/mobile/components/tags/TagInput.tsx delete mode 100644 apps/picture/apps/mobile/components/ui/Slider.tsx delete mode 100644 apps/picture/apps/mobile/constants/colors.ts delete mode 100644 apps/picture/apps/mobile/constants/gallery.ts delete mode 100644 apps/picture/apps/mobile/constants/index.ts delete mode 100644 apps/picture/apps/mobile/constants/layout.ts delete mode 100644 apps/picture/apps/mobile/constants/pagination.ts delete mode 100644 apps/picture/apps/mobile/constants/promptTemplates.ts delete mode 100644 apps/picture/apps/mobile/constants/themes/default.ts delete mode 100644 apps/picture/apps/mobile/constants/themes/index.ts delete mode 100644 apps/picture/apps/mobile/constants/themes/ocean.ts delete mode 100644 apps/picture/apps/mobile/constants/themes/sunset.ts delete mode 100644 apps/picture/apps/mobile/constants/themes/types.ts delete mode 100644 apps/picture/apps/mobile/contexts/AuthContext.tsx delete mode 100644 apps/picture/apps/mobile/contexts/ThemeContext.tsx delete mode 100755 apps/picture/apps/mobile/eas-hooks/eas-build-pre-install.sh delete mode 100644 apps/picture/apps/mobile/eas.json delete mode 100644 apps/picture/apps/mobile/eslint.config.mjs delete mode 100644 apps/picture/apps/mobile/global.css delete mode 100644 apps/picture/apps/mobile/hooks/useArchiveFetching.ts delete mode 100644 apps/picture/apps/mobile/hooks/useExploreFetching.ts delete mode 100644 apps/picture/apps/mobile/hooks/useExplorePrefetch.ts delete mode 100644 apps/picture/apps/mobile/hooks/useExploreSearch.ts delete mode 100644 apps/picture/apps/mobile/hooks/useGalleryGestures.ts delete mode 100644 apps/picture/apps/mobile/hooks/useImageFetching.ts delete mode 100644 apps/picture/apps/mobile/hooks/useImageGeneration.ts delete mode 100644 apps/picture/apps/mobile/hooks/useImageLikes.ts delete mode 100644 apps/picture/apps/mobile/hooks/useImagePrefetch.ts delete mode 100644 apps/picture/apps/mobile/hooks/useImageSearch.ts delete mode 100644 apps/picture/apps/mobile/hooks/usePagination.ts delete mode 100644 apps/picture/apps/mobile/hooks/useResponsive.ts delete mode 100644 apps/picture/apps/mobile/hooks/useScrollRestoration.ts delete mode 100644 apps/picture/apps/mobile/metro.config.js delete mode 100644 apps/picture/apps/mobile/nativewind-env.d.ts delete mode 100644 apps/picture/apps/mobile/package.json delete mode 100644 apps/picture/apps/mobile/patches/react-native-context-menu-view+1.20.0.patch delete mode 100644 apps/picture/apps/mobile/patches/react-native-pager-view+6.9.1.patch delete mode 100644 apps/picture/apps/mobile/prettier.config.js delete mode 100755 apps/picture/apps/mobile/scripts/build-workspace-deps.sh delete mode 100644 apps/picture/apps/mobile/services/api/batch.ts delete mode 100644 apps/picture/apps/mobile/services/api/client.ts delete mode 100644 apps/picture/apps/mobile/services/api/explore.ts delete mode 100644 apps/picture/apps/mobile/services/api/generate.ts delete mode 100644 apps/picture/apps/mobile/services/api/images.ts delete mode 100644 apps/picture/apps/mobile/services/api/index.ts delete mode 100644 apps/picture/apps/mobile/services/api/models.ts delete mode 100644 apps/picture/apps/mobile/services/api/profiles.ts delete mode 100644 apps/picture/apps/mobile/services/api/tags.ts delete mode 100644 apps/picture/apps/mobile/services/archiveService.ts delete mode 100644 apps/picture/apps/mobile/services/imageGenerationAsync.ts delete mode 100644 apps/picture/apps/mobile/services/models.ts delete mode 100644 apps/picture/apps/mobile/store/batchStore.ts delete mode 100644 apps/picture/apps/mobile/store/generatingImagesStore.ts delete mode 100644 apps/picture/apps/mobile/store/generationDefaultsStore.ts delete mode 100644 apps/picture/apps/mobile/store/modelStore.ts delete mode 100644 apps/picture/apps/mobile/store/promptStore.ts delete mode 100644 apps/picture/apps/mobile/store/tagStore.ts delete mode 100644 apps/picture/apps/mobile/store/themeStore.ts delete mode 100644 apps/picture/apps/mobile/store/themeStore.ts.backup delete mode 100644 apps/picture/apps/mobile/store/viewStore.ts delete mode 100644 apps/picture/apps/mobile/tailwind.config.js delete mode 100644 apps/picture/apps/mobile/tailwind.config.js.backup delete mode 100644 apps/picture/apps/mobile/tsconfig.base.json delete mode 100644 apps/picture/apps/mobile/tsconfig.json delete mode 100644 apps/picture/apps/mobile/types/explore.ts delete mode 100644 apps/picture/apps/mobile/types/gallery.ts delete mode 100644 apps/picture/apps/mobile/utils/blurhash.ts delete mode 100644 apps/picture/apps/mobile/utils/image.ts delete mode 100644 apps/picture/apps/mobile/utils/logger.ts delete mode 100644 apps/picture/apps/mobile/utils/polyfills.web.js delete mode 100644 apps/traces/apps/mobile/.gitignore delete mode 100644 apps/traces/apps/mobile/README.md delete mode 100644 apps/traces/apps/mobile/app-env.d.ts delete mode 100644 apps/traces/apps/mobile/app.json delete mode 100644 apps/traces/apps/mobile/app/(tabs)/_layout.tsx delete mode 100644 apps/traces/apps/mobile/app/(tabs)/cities/_layout.tsx delete mode 100644 apps/traces/apps/mobile/app/(tabs)/cities/index.tsx delete mode 100644 apps/traces/apps/mobile/app/(tabs)/guides/_layout.tsx delete mode 100644 apps/traces/apps/mobile/app/(tabs)/guides/index.tsx delete mode 100644 apps/traces/apps/mobile/app/(tabs)/history/_layout.tsx delete mode 100644 apps/traces/apps/mobile/app/(tabs)/history/index.tsx delete mode 100644 apps/traces/apps/mobile/app/(tabs)/index.tsx delete mode 100644 apps/traces/apps/mobile/app/(tabs)/logs.tsx delete mode 100644 apps/traces/apps/mobile/app/(tabs)/map.tsx delete mode 100644 apps/traces/apps/mobile/app/(tabs)/places/_layout.tsx delete mode 100644 apps/traces/apps/mobile/app/(tabs)/places/index.tsx delete mode 100644 apps/traces/apps/mobile/app/+html.tsx delete mode 100644 apps/traces/apps/mobile/app/+not-found.tsx delete mode 100644 apps/traces/apps/mobile/app/_layout.tsx delete mode 100644 apps/traces/apps/mobile/app/city-detail.tsx delete mode 100644 apps/traces/apps/mobile/app/guide-detail.tsx delete mode 100644 apps/traces/apps/mobile/app/modal.tsx delete mode 100644 apps/traces/apps/mobile/app/place-details.tsx delete mode 100644 apps/traces/apps/mobile/app/settings.tsx delete mode 100644 apps/traces/apps/mobile/assets/adaptive-icon.png delete mode 100644 apps/traces/apps/mobile/assets/favicon.png delete mode 100644 apps/traces/apps/mobile/assets/icon.png delete mode 100644 apps/traces/apps/mobile/assets/splash.png delete mode 100644 apps/traces/apps/mobile/assets/traces.icon/Assets/Traces App Icon 01.3-1.svg delete mode 100644 apps/traces/apps/mobile/assets/traces.icon/Assets/Traces App Icon 01.3.svg delete mode 100644 apps/traces/apps/mobile/assets/traces.icon/icon.json delete mode 100644 apps/traces/apps/mobile/babel.config.js delete mode 100644 apps/traces/apps/mobile/cesconfig.json delete mode 100644 apps/traces/apps/mobile/components/Button.tsx delete mode 100644 apps/traces/apps/mobile/components/CitiesList.tsx delete mode 100644 apps/traces/apps/mobile/components/ConsolidatedLocationList.tsx delete mode 100644 apps/traces/apps/mobile/components/CountriesList.tsx delete mode 100644 apps/traces/apps/mobile/components/HeaderButton.tsx delete mode 100644 apps/traces/apps/mobile/components/LocationHistoryList.tsx delete mode 100644 apps/traces/apps/mobile/components/LocationMap.tsx delete mode 100644 apps/traces/apps/mobile/components/LogsList.tsx delete mode 100644 apps/traces/apps/mobile/components/PhotoImportModal.tsx delete mode 100644 apps/traces/apps/mobile/components/PlaceDetail.tsx delete mode 100644 apps/traces/apps/mobile/components/PlacesList.tsx delete mode 100644 apps/traces/apps/mobile/components/SegmentedControl.tsx delete mode 100644 apps/traces/apps/mobile/components/SettingsButton.tsx delete mode 100644 apps/traces/apps/mobile/components/ThemeToggle.tsx delete mode 100644 apps/traces/apps/mobile/components/ThemeVariantPicker.tsx delete mode 100644 apps/traces/apps/mobile/components/ThemeWrapper.tsx delete mode 100644 apps/traces/apps/mobile/components/TrackingControls.tsx delete mode 100644 apps/traces/apps/mobile/components/WebMap.tsx delete mode 100644 apps/traces/apps/mobile/eas.json delete mode 100644 apps/traces/apps/mobile/global.css delete mode 100644 apps/traces/apps/mobile/metro.config.js delete mode 100644 apps/traces/apps/mobile/nativewind-env.d.ts delete mode 100644 apps/traces/apps/mobile/package.json delete mode 100644 apps/traces/apps/mobile/prettier.config.js delete mode 100644 apps/traces/apps/mobile/readmes/STANDORT_BERECHTIGUNGEN.md delete mode 100644 apps/traces/apps/mobile/tailwind.config.js delete mode 100644 apps/traces/apps/mobile/tsconfig.json delete mode 100644 apps/traces/apps/mobile/utils/apiClient.ts delete mode 100644 apps/traces/apps/mobile/utils/backgroundLocationTask.ts delete mode 100644 apps/traces/apps/mobile/utils/locationHelper.ts delete mode 100644 apps/traces/apps/mobile/utils/locationService.ts delete mode 100644 apps/traces/apps/mobile/utils/logService.ts delete mode 100644 apps/traces/apps/mobile/utils/photoImportService.ts delete mode 100644 apps/traces/apps/mobile/utils/placeService.ts delete mode 100644 apps/traces/apps/mobile/utils/registerBackgroundTasks.ts delete mode 100644 apps/traces/apps/mobile/utils/syncService.ts delete mode 100644 apps/traces/apps/mobile/utils/themeContext.tsx diff --git a/CLAUDE.md b/CLAUDE.md index caadac77e..f9c903893 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -9,7 +9,7 @@ pnpm workspace monorepo with two consolidated tops: - **`apps/mana/apps/web`** — unified SvelteKit frontend serving 27+ product modules under `mana.how`. One build, one IndexedDB, one auth session, one deployment. - **`apps/api`** (`@mana/api`) — unified Hono/Bun backend API server. Consolidates per-module compute servers; routes registered under `/api/v1/{module}/*`. -Per-product directories under `apps/{product}/` still exist for landing pages, mobile apps, and product-specific packages, but the active web frontend and API both live in the two consolidated apps above. +Per-product directories under `apps/{product}/` still exist for landing pages and product-specific packages, but the active web frontend and API both live in the two consolidated apps above. The only remaining mobile app is `apps/memoro/apps/mobile` (Expo SDK 55) — all other per-product mobile apps were removed on 2026-04-20. - **Package Manager:** pnpm 9.15.0 - **Build System:** Turborepo @@ -20,9 +20,10 @@ Per-product directories under `apps/{product}/` still exist for landing pages, m ``` apps/ -├── mana/ # Unified frontend (SvelteKit web + Expo mobile + Astro landing) +├── mana/ # Unified frontend (SvelteKit web + Astro landing) ├── api/ # Unified backend API (Hono/Bun) — @mana/api -├── {product}/ # Per-product landing pages, mobile apps, packages +├── memoro/apps/ # Only remaining mobile app (Expo SDK 55) +├── {product}/ # Per-product landing pages, packages │ # Standalone (own container, not unified): manavoxel games/ # arcade, voxelava, whopixels, worldream services/ # Backend services (Hono/Bun, Go, Python) — see list below diff --git a/apps/cards/apps/mobile/.env.example b/apps/cards/apps/mobile/.env.example deleted file mode 100644 index 8920bc75f..000000000 --- a/apps/cards/apps/mobile/.env.example +++ /dev/null @@ -1,8 +0,0 @@ -# Cards Mobile App Environment Variables - -# Backend API URL -EXPO_PUBLIC_BACKEND_URL=http://localhost:3000 - -# Mana Core Auth -EXPO_PUBLIC_MANA_MIDDLEWARE_URL=https://api.mana.de -EXPO_PUBLIC_MIDDLEWARE_APP_ID=cards diff --git a/apps/cards/apps/mobile/.env.production b/apps/cards/apps/mobile/.env.production deleted file mode 100644 index a3f754ad6..000000000 --- a/apps/cards/apps/mobile/.env.production +++ /dev/null @@ -1,7 +0,0 @@ -mobile .env.production -# Supabase Configuration -EXPO_PUBLIC_SUPABASE_URL=https://vksoodohrbjwyloitvsz.supabase.co -EXPO_PUBLIC_SUPABASE_ANON_KEY=sb_publishable_2ndX-kBHFpbDlL_ZeeOnfQ_ZlLI8ONk - -# Backend API Configuration - Production -EXPO_PUBLIC_API_URL=https://cards-backend-111768794939.europe-west3.run.app diff --git a/apps/cards/apps/mobile/.gitignore b/apps/cards/apps/mobile/.gitignore deleted file mode 100644 index 5873d9abc..000000000 --- a/apps/cards/apps/mobile/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ - -# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb -# The following patterns were generated by expo-cli - -expo-env.d.ts -# @end expo-cli \ No newline at end of file diff --git a/apps/cards/apps/mobile/.mcp.json b/apps/cards/apps/mobile/.mcp.json deleted file mode 100644 index 94a84d6a4..000000000 --- a/apps/cards/apps/mobile/.mcp.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "mcpServers": { - "supabase": { - "command": "npx", - "args": ["-y", "@supabase/mcp-server-supabase@latest", "--project-ref=vksoodohrbjwyloitvsz"], - "env": { - "SUPABASE_ACCESS_TOKEN": "sbp_3622a96f728711cd06b113c17f77f84d02ff8fb2" - } - } - } -} diff --git a/apps/cards/apps/mobile/CLAUDE.md b/apps/cards/apps/mobile/CLAUDE.md deleted file mode 100644 index 204f33b59..000000000 --- a/apps/cards/apps/mobile/CLAUDE.md +++ /dev/null @@ -1,138 +0,0 @@ -# CLAUDE.md - -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. - -## Project Overview - -Cards is a React Native/Expo application using Expo Router for navigation, TypeScript for type safety, NativeWind (Tailwind CSS) for styling, and Mana Auth for authentication. The app uses Zustand for state management and connects to the NestJS backend (port 3009). - -## Essential Commands - -### Development - -```bash -npm start # Start Expo dev server with dev client -npm run ios # Run on iOS simulator -npm run android # Run on Android emulator -npm run web # Run in web browser -``` - -### Build & Deploy - -```bash -npm run build:dev # Build development build with EAS -npm run build:preview # Build preview build with EAS -npm run build:prod # Build production build with EAS -npm run prebuild # Generate native projects -``` - -### Code Quality - -```bash -npm run lint # Run ESLint and Prettier checks -npm run format # Auto-fix ESLint and format with Prettier -``` - -## Architecture & Key Patterns - -### File Structure - -- **app/**: Expo Router pages with file-based routing - - `(tabs)/`: Tab navigation screens - - `_layout.tsx`: Root layout with navigation stack - - `modal.tsx`: Modal screens -- **components/**: Reusable UI components -- **store/**: Zustand state management stores -- **services/**: Auth service, API client -- **utils/**: Utility functions -- **assets/**: Static assets (images, icons) - -### Navigation Pattern - -Uses Expo Router v5 with file-based routing: - -- Tab navigation defined in `app/(tabs)/_layout.tsx` -- Stack navigation in `app/_layout.tsx` -- Typed routes enabled via `experiments.typedRoutes` in app.json - -### Styling Approach - -- NativeWind (Tailwind CSS for React Native) configured via `tailwind.config.js` -- Global styles imported in `app/_layout.tsx` via `global.css` -- Components use className prop for Tailwind classes - -### State Management - -- Zustand store pattern in `store/store.ts` -- Create typed stores with actions and selectors -- Access via hooks (e.g., `useStore`) - -### Authentication - -- Mana Auth via `@mana/shared-auth` in `services/authService.ts` -- Zustand auth store in `store/authStore.ts` -- Tokens stored in Expo SecureStore (encrypted) -- Supports email/password, Google, and Apple sign-in - -### Backend Integration - -- NestJS backend at port 3009 (`@mana-core/nestjs-integration`) -- Environment variable: `EXPO_PUBLIC_MANA_AUTH_URL` - -### TypeScript Configuration - -- Strict mode enabled -- Path alias `~/*` configured for absolute imports -- Type definitions for Expo and React Native included - -## Development Guidelines - -### Component Creation - -When creating new components: - -1. Place in `components/` directory -2. Use TypeScript with proper prop typing -3. Apply NativeWind classes via className prop -4. Follow existing naming conventions (PascalCase for components) - -### Screen/Page Creation - -For new screens: - -1. Add file in appropriate directory under `app/` -2. Export default React component -3. Configure navigation options if needed -4. Import and use existing UI components - -### Code Style - -- ESLint configured with Expo preset -- Prettier for formatting with Tailwind plugin -- React display-name rule disabled -- Format before committing: `npm run format` - -## Environment Setup - -### Required Environment Variables - -Create a `.env` or `.env.local` file: - -``` -EXPO_PUBLIC_MANA_AUTH_URL=http://localhost:3001 -EXPO_PUBLIC_BACKEND_URL=http://localhost:3009 -``` - -### EAS Configuration - -Project configured with EAS Build: - -- Project ID: `6cb9cf81-a4d5-4c72-b57d-1be3da8eba35` -- Three build profiles: development, preview, production -- Development builds include dev client - -### Platform-Specific Setup - -- iOS: Bundle ID `com.tilljs.cards` -- Android: Package `com.tilljs.cards` -- Uses Expo development build for custom native code diff --git a/apps/cards/apps/mobile/Docs/AI-Implementation-Plan.md b/apps/cards/apps/mobile/Docs/AI-Implementation-Plan.md deleted file mode 100644 index 425c1cb89..000000000 --- a/apps/cards/apps/mobile/Docs/AI-Implementation-Plan.md +++ /dev/null @@ -1,483 +0,0 @@ -> super danke lass uns jezt die ai features -> planen. es sollen diese dinge möglich werden, -> mit der open ai api: neue karten erstellen mit - -1. spracheingabe (STT) 2. testeingabe 3. - bildupload - ausserdem sollen die karten per - STT vorgelesen werden können. schreibe dazu - einen plan für die implementierung - -⏺ Update Todos -⎿ ☐ AI Features Planning: Spracherkennung - (STT) für Kartenerstellung -☐ AI Features Planning: Texteingabe mit -OpenAI für Kartenerstellung -☐ AI Features Planning: Bildupload mit -Vision API für Kartenerstellung -☐ AI Features Planning: Text-to-Speech -(TTS) für Kartenvorlesung -☐ AI Features Planning: Technische -Architektur und API Integration - -⏺ 🤖 AI Features Implementation Plan - Cards - -Übersicht der AI-Features - -🎯 Ziel-Features: - -1. Kartenerstellung via Spracheingabe (STT → - OpenAI → Karteninhalt) -2. Kartenerstellung via Texteingabe (Text → - OpenAI → strukturierte Karten) -3. Kartenerstellung via Bildupload (Bild → - Vision API → Karteninhalt) -4. Kartenvorlesung via TTS (Kartentext → - Speech → Audio) - ---- - -📋 Phase 7: AI Integration Roadmap - -Phase 7.1: Foundation & Setup (1 Woche) - -7.1.1 Dependencies & Environment Setup - -// Neue Dependencies -"@react-native-async-storage/async-storage": -"^1.21.0", -"expo-speech": "~12.1.0", // TTS -"expo-av": "~14.0.0", // Audio -recording/playback -"react-native-audio-recorder-player": -"^3.6.6", // Advanced audio -"openai": "^4.24.0", // OpenAI -API -"expo-image-picker": "~15.0.0", // -Bildauswahl -"expo-file-system": "~17.0.0" // -Dateisystem - -7.1.2 Environment Variables - -EXPO_PUBLIC_OPENAI_API_KEY=sk-... -EXPO_PUBLIC_OPENAI_MODEL=gpt-4o -EXPO_PUBLIC_OPENAI_VISION_MODEL=gpt-4o-vision- -preview - -7.1.3 API Service Layer - -// utils/openaiService.ts -export class OpenAIService { -static async generateCardsFromText(prompt: -string): Promise -static async -generateCardsFromSpeech(audioData: string): -Promise -static async -generateCardsFromImage(imageBase64: string): -Promise -static async enhanceCardContent(content: -string): Promise -} - ---- - -Phase 7.2: Speech-to-Text Integration (1-2 -Wochen) - -7.2.1 Audio Recording Component - -// components/ai/AudioRecorder.tsx -interface AudioRecorderProps { -onRecordingComplete: (audioUri: string) => -void; -onTranscriptionComplete: (text: string) => -void; -} - -export const AudioRecorder: -React.FC = ({ -onRecordingComplete, -onTranscriptionComplete -}) => { -// Aufnahme-Button mit -Wellenform-Visualisierung -// Live-Transkription während Aufnahme -// Aufnahme-Controls (Pause, Stopp, -Wiedergabe) -} - -7.2.2 Speech-to-Text Service - -// utils/speechService.ts -export class SpeechService { -static async transcribeAudio(audioUri: -string): Promise<{ -text: string; -confidence: number; -language: string; -}> - - static async transcribeRealtime(audioStream: - -any): Promise -} - -7.2.3 Integration in Card Creation - -- Neuer "Voice Input" Modus in Card Creation - Screen -- Real-time Transkription mit - Korrekturmöglichkeit -- Automatische Strukturierung durch OpenAI - ---- - -Phase 7.3: Text-to-Cards AI Processing (1 -Woche) - -7.3.1 AI Card Generator Service - -// utils/cardGenerator.ts -export class CardGenerator { -static async generateFromText(input: string, -options: { -cardTypes: ('flashcard' | 'quiz' | -'text')[]; -difficulty: 'easy' | 'medium' | 'hard'; -count: number; -language: 'de' | 'en'; -}): Promise - - static async generateFromTopics(topics: - -string[]): Promise -static async enhanceExistingCard(card: -Card): Promise -} - -interface GeneratedCard { -type: CardType; -content: CardContent; -metadata: { -confidence: number; -source: string; -tags: string[]; -}; -} - -7.3.2 Smart Card Creation UI - -// components/ai/SmartCardCreator.tsx -export const SmartCardCreator: React.FC = () -=> { -// Multi-Input Interface: -// - Text Area für freie Eingabe -// - Topic Tags für strukturierte Eingabe -// - AI-Einstellungen (Schwierigkeit, -Kartentypen) -// - Vorschau der generierten Karten -// - Bulk-Edit Funktionen -} - ---- - -Phase 7.4: Vision API Integration (1-2 Wochen) - -7.4.1 Image Processing Service - -// utils/visionService.ts -export class VisionService { -static async analyzeImage(imageUri: string): -Promise<{ -text: string; // OCR-Text -objects: string[]; // Erkannte -Objekte -concepts: string[]; // Konzepte/Themen -language: string; // Erkannte -Sprache -}> - - static async generateCardsFromImage( - imageUri: string, - context?: string - ): Promise - -} - -7.4.2 Image Upload Component - -// components/ai/ImageCardCreator.tsx -export const ImageCardCreator: React.FC = () -=> { -// Kamera/Galerie Integration -// Image Preview mit Crop-Funktionalität -// OCR-Text-Extraktion mit Editing -// Context-Input für bessere AI-Generation -// Generated Cards Preview -} - -7.4.3 Use Cases - -- Lehrbücher fotografieren → Automatische - Flashcard-Generierung -- Whiteboards/Notizen → Strukturierte Karten -- Diagramme/Grafiken → Erklärende Text-Karten -- Handschrift-Erkennung → Digitale Karten - ---- - -Phase 7.5: Text-to-Speech Integration (1 -Woche) - -7.5.1 TTS Service - -// utils/ttsService.ts -export class TTSService { -static async speakText(text: string, -options: { -language: string; -rate: number; -pitch: number; -voice?: string; -}): Promise - - static async generateAudioFile(text: - -string): Promise // Return audio URI -static getAvailableVoices(): -Promise -} - -7.5.2 Audio Playback in Cards - -// components/study/AudioCard.tsx -export const AudioCard: React.FC<{ card: Card -}> = ({ card }) => { -// Play/Pause Button für Karteninhalt -// Geschwindigkeitsregelung -// Auto-Play Optionen -// Audio-Caching für Offline-Nutzung -} - -7.5.3 Study Session Audio Features - -- Automatische Vorlesung während Study - Sessions -- Hände-frei Lernen für Unterwegs -- Aussprache-Training für Fremdsprachen -- Audio-Speed-Control für verschiedene - Lerngeschwindigkeiten - ---- - -Phase 7.6: AI-Enhanced Study Experience (1-2 -Wochen) - -7.6.1 Smart Study Recommendations - -// store/aiStore.ts -export const useAIStore = -create((set, get) => ({ -recommendations: [], - - generateStudyPlan: async (userId: string) => - -{ -// AI-basierte Lernplan-Generierung -// Berücksichtigt Fortschritt, Schwächen, -Präferenzen -}, - - suggestCardImprovements: async (cardId: - -string) => { -// Vorschläge zur Kartenverbesserung -// Basierend auf Lernperformance -}, - - generateRelatedCards: async (card: Card) => - -{ -// Ähnliche/verwandte Karten vorschlagen -} -})); - -7.6.2 Intelligent Content Enhancement - -- Automatische Hinweise zu schwierigen Karten -- Kontext-Erweiterungen für besseres - Verständnis -- Adaptive Schwierigkeit basierend auf - Performance -- Personalisierte Erklärungen je nach Lernstil - ---- - -🏗️ Technische Architektur - -Backend Extensions - -7.A.1 Neue Datenbank-Tabellen - --- AI-generierte Karten tracking -CREATE TABLE ai_generated_cards ( -id UUID PRIMARY KEY DEFAULT -gen_random_uuid(), -card_id UUID REFERENCES cards(id), -generation_method TEXT, -- 'speech', 'text', -'image' -source_data JSONB, -- Original input -data -confidence_score DECIMAL, -created_at TIMESTAMP DEFAULT NOW() -); - --- Audio-Dateien für TTS -CREATE TABLE card_audio_files ( -id UUID PRIMARY KEY DEFAULT -gen_random_uuid(), -card_id UUID REFERENCES cards(id), -audio_url TEXT, -language TEXT, -voice_settings JSONB, -created_at TIMESTAMP DEFAULT NOW() -); - --- AI-Verbesserungsvorschläge -CREATE TABLE ai_suggestions ( -id UUID PRIMARY KEY DEFAULT -gen_random_uuid(), -card_id UUID REFERENCES cards(id), -suggestion_type TEXT, -suggestion_data JSONB, -applied BOOLEAN DEFAULT FALSE, -created_at TIMESTAMP DEFAULT NOW() -); - -7.A.2 Supabase Functions - --- Edge Function für OpenAI Integration -CREATE OR REPLACE FUNCTION -generate_cards_from_content( -content TEXT, -generation_type TEXT, -user_id UUID -) RETURNS JSON; - --- Edge Function für Audio-Processing -CREATE OR REPLACE FUNCTION -process_audio_upload( -audio_data BYTEA, -user_id UUID -) RETURNS JSON; - -Security & Performance - -7.B.1 API Rate Limiting - -// utils/rateLimiter.ts -export class RateLimiter { -static checkAPILimit(userId: string, -endpoint: string): Promise -static trackUsage(userId: string, endpoint: -string, cost: number): Promise -} - -7.B.2 Caching Strategy - -- Audio Files: Supabase Storage mit CDN -- AI Responses: Redis/Memory Cache -- Image Processing: Optimierte Komprimierung -- Offline Support: SQLite für generierte - Inhalte - ---- - -💰 Kostenoptimierung - -7.C.1 Token/API Management - -// utils/costOptimizer.ts -export class CostOptimizer { -static estimateTokens(text: string): number -static compressPrompt(prompt: string): -string -static batchRequests(requests: any[]): -Promise -static cacheCommonResponses(key: string, -response: any): void -} - -7.C.2 Smart Usage Strategies - -- Prompt Engineering für effiziente - Token-Nutzung -- Batch Processing für multiple Karten -- Caching häufiger Anfragen -- Fallback Models für einfache Aufgaben -- User Limits für API-Kosten-Kontrolle - ---- - -🎮 User Experience Features - -7.D.1 AI Assistant Interface - -// components/ai/AIAssistant.tsx -export const AIAssistant: React.FC = () => { -// Chat-Interface für AI-Interaktion -// Voice Commands -// Smart Suggestions Overlay -// Progress-aware Recommendations -} - -7.D.2 Personalization Engine - -- Lernstil-Erkennung basierend auf - Nutzungsmustern -- Adaptive Kartenformate je nach Präferenz -- Personalisierte Schwierigkeit für - AI-generierte Inhalte -- Custom Prompts für wiederkehrende - Kartenerstellung - ---- - -📈 Success Metrics & Analytics - -KPIs für AI Features: - -- Card Generation Success Rate (Qualität der - generierten Karten) -- User Adoption Rate (% der Nutzer die - AI-Features verwenden) -- Time Savings (Vergleich manuelle vs. - AI-Kartenerstellung) -- Learning Effectiveness (Performance bei AI - vs. manuellen Karten) -- API Cost per User (Kostenoptimierung) - ---- - -🚀 Implementation Timeline - -| Phase | Duration | Key Deliverables -| -|-------|----------|-------------------------- ----------| -| 7.1 | 1 Woche | Setup, Dependencies, API -Services | -| 7.2 | 2 Wochen | Speech-to-Text -Integration | -| 7.3 | 1 Woche | Text-to-Cards AI -Processing | -| 7.4 | 2 Wochen | Vision API Integration -| -| 7.5 | 1 Woche | Text-to-Speech -Integration | -| 7.6 | 2 Wochen | Enhanced Study Experience -| - -Total: ~9 Wochen für vollständige -AI-Integration diff --git a/apps/cards/apps/mobile/Docs/EXPO_NATIVE_TABS.md b/apps/cards/apps/mobile/Docs/EXPO_NATIVE_TABS.md deleted file mode 100644 index 1b114825a..000000000 --- a/apps/cards/apps/mobile/Docs/EXPO_NATIVE_TABS.md +++ /dev/null @@ -1,456 +0,0 @@ -Native tabs - -Copy - -Learn how to use the native tabs layout in Expo Router. - -Native tabs is an experimental feature available in SDK 54 and above, and its API is subject to change -Tabs are a common way to navigate between different sections of an app. In Expo Router, you can use different tab layouts, depending on your needs. This guide covers the native tabs. Unlike the other tabs layout, native tabs use the native system tab bar. - -For other tab-layouts see: - -Custom tabs -See custom tabs if your app requires a fully custom design that is not possible using system tabs. - -JavaScript tabs -See JavaScript tabs if you already use React Navigation's tabs. - -Get started -You can use file-based routing to create a tabs layout. Here's an example file structure: - -app - -  -\_layout.tsx - -  -index.tsx - -  -settings.tsx -The above file structure produces a layout with a tab bar at the bottom of the screen. The tab bar will have two tabs: Home and Settings. - -A screenshot of a tab bar with two tabs: Home and Settings. -You can use the app/\_layout.tsx file to define your app's root layout using tabs. This file is the main layout file for the tab bar and each tab. Inside it, you can control how the tab bar and each tab item look and behave. - -app/\_layout.tsx - -Copy - -import { NativeTabs, Icon, Label } from 'expo-router/unstable-native-tabs'; - -export default function TabLayout() { -return ( - - - - - - - - - - -); -} -Finally, you have the two tab files that make up the content of the tabs: app/index.tsx and app/settings.tsx. - -app/index.tsx and app/settings.tsx - -Copy - -import { View, Text, StyleSheet } from 'react-native'; - -export default function Tab() { -return ( - -Tab [Home|Settings] - -); -} - -const styles = StyleSheet.create({ -container: { -flex: 1, -justifyContent: 'center', -alignItems: 'center', -}, -}); -The tab file named index.tsx is the default tab when the app loads. The second tab file settings.tsx shows how you can add more tabs to the tab bar. - -In contrast to the Stack navigator, tabs are not automatically added to the tab bar. You need to explicitly add them in your layout file using the NativeTabs.Trigger. -Customizing tab bar items -Native tabs is an experimental feature available in SDK 54 and above, and its API is subject to change. -When you want to customize the tab bar item, we recommend using the components API designed for this purpose. Currently, you can customize: - -Icon: The icon displayed in the tab bar item. -Label: The label displayed in the tab bar item. -Badge: The badge displayed in the tab bar item. -Icon -Native tabs is an experimental feature available in SDK 54 and above, and its API is subject to change. -You can use the Icon component to customize the icon displayed in the tab bar item. The Icon component accepts a drawable prop for Android drawables, a sf prop for Apple's SF Symbols icons, or a src prop for custom images. - -Alternatively, you can pass {default: ..., selected: ...} to either the sf or src prop to specify different icons for the default and selected states. - -To use drawable props on Android, you can use built-in drawables or add custom drawables. - -app/\_layout.tsx - -Copy - -import { NativeTabs, Icon } from 'expo-router/unstable-native-tabs'; - -export default function TabLayout() { -return ( - - - - - - - - -Liquid glass on iOS automatically changes colors based on if the background color is light or dark. There is no callback for this, so you need to use a PlatformColor to set the color of the icon. - -app/\_layout.tsx - -Copy - -import { DynamicColorIOS } from 'react-native'; -import { NativeTabs, Icon } from 'expo-router/unstable-native-tabs'; - -export default function TabLayout() { -return ( - - - - - - - - -); -} - -Show More -Label -Native tabs is an experimental feature available in SDK 54 and above, and its API is subject to change. -You can use the Label component to customize the label displayed in the tab bar item. The Label component accepts a string label passed as a child. If no label is provided, the tab bar item will use the route name as the label. - -If you don't want to display a label, you can use the hidden prop to hide the label. - -app/\_layout.tsx - -Copy - -import { NativeTabs, Label } from 'expo-router/unstable-native-tabs'; - -export default function TabLayout() { -return ( - - - - - - - -); -} -Badge -Native tabs is an experimental feature available in SDK 54 and above, and its API is subject to change. -You can use the Badge component to customize the badge displayed for the tab bar item. The badge is an additional mark on top of the tab and useful for showing notification or unread message counts. - -app/\_layout.tsx - -Copy - -import { NativeTabs, Badge } from 'expo-router/unstable-native-tabs'; - -export default function TabLayout() { -return ( - - -9+ - - - - - -); -} -A screenshot of a tab bar with badges on the Messages and Settings tabs. -Customizing the tab bar -Since the native tab layout's appearance varies by platform, the customization options are also different. For all customization options, see the API reference for NativeTabs. - -Advanced -Hiding a tab conditionally -If you want to hide a tab based on a condition, you can either remove the trigger or pass the hidden prop to the NativeTabs.Trigger component. - -app/\_layout.tsx - -Copy - -import { NativeTabs } from 'expo-router/unstable-native-tabs'; - -export default function TabLayout() { -const shouldHideMessagesTab = true; // Replace with your condition -return ( - - -); -} -Dismiss behavior -Currently this is an iOS-only feature, but we plan to add it to Android in the future. -By default, tapping a tab that is already active closes all screens in that tab's stack and returns to the root screen. You can disable this by setting the disablePopToTop prop on the NativeTabs.Trigger component. - -app/\_layout.tsx - -Copy - -import { NativeTabs, Label } from 'expo-router/unstable-native-tabs'; - -export default function TabLayout() { -return ( - - - - - - - - -); -} -Scroll to top -Currently this is an iOS-only feature, but we plan to add it to Android in the future. -By default, tapping a tab that is already active and showing its root screen scrolls the content back to the top. You can disable this by setting the disableScrollToTop prop on the NativeTabs.Trigger component. - -app/\_layout.tsx - -Copy - -import { NativeTabs, Label } from 'expo-router/unstable-native-tabs'; - -export default function TabLayout() { -return ( - - - - - - - - -); -} -iOS 26 features -To use features described in this section, compile your app with Xcode 26 or higher. -Separate search tab -A screenshot of a tab bar with separate search tab. -To add a separate search tab, assign the role with its value set to search to the native tab you want to display separately. - -app/\_layout.tsx - -Copy - -import { NativeTabs, Label } from 'expo-router/unstable-native-tabs'; - -export default function TabLayout() { -return ( - - - - - - - - -); -} -Tabbar search input -A screenshot of a tab bar search. -To add a search field to the tab bar, wrap the screen in a Stack navigator and configure headerSearchBarOptions. - -app - -  -\_layout.tsx - -  -index.tsx - -  -search - -   -\_layout.tsx - -   -index.tsx -app/\_layout.tsx - -Copy - -import { NativeTabs, Label } from 'expo-router/unstable-native-tabs'; - -export default function TabLayout() { -return ( - - - - - - - - -); -} -app/search/\_layout.tsx - -Copy - -import { Stack } from 'expo-router'; - -export default function SearchLayout() { -return ( - - {}, - }, - }} -/> - -); -} - -Show More -app/search/index.tsx - -Copy - -import { ScrollView } from 'react-native'; - -export default function SearchIndex() { -return {/_ Screen content _/}; -} -Tab bar minimize behavior -To implement the minimized behavior on the tab bar, you can use minimizeBehavior prop on NativeTabs. In the example below, the tab bar is minimized when scrolling down. - -app/\_layout.tsx - -Copy - -import { NativeTabs, Label } from 'expo-router/unstable-native-tabs'; - -export default function TabLayout() { -return ( - - - - - - - - -); -} -Integration with @expo/vector-icons -Recommended: Use SF Symbols on iOS. They offer higher quality and a native platform feeling than vector icons. -To use icons from @expo/vector-icons, you can use VectorIcon component. - -app/\_layout.tsx - -Copy - -import MaterialIcons from '@expo/vector-icons/MaterialIcons'; -import { NativeTabs, Icon, VectorIcon } from 'expo-router/unstable-native-tabs'; -import { Platform } from 'react-native'; - -export default function TabLayout() { -return ( - - - -{Platform.select({ -ios: , -android: } />, -})} - - -); -} -Migrating from JavaScript tabs -Native tabs are not designed to be a drop-in replacement for JavaScript tabs. The native tabs are constrained to the native platform behavior, whereas the JavaScript tabs can be customized more freely. If you aren't interested in the native platform behavior, you can continue using the JavaScript tabs. - -Use Trigger instead of Screen -NativeTabs introduces the concept of a Trigger for adding routes to a layout. Unlike a Screen, which styles routes that are added automatically, the Trigger system gives you better control for hiding and removing tabs from the tab bar. - -Use React components instead of props -NativeTabs has a React-first API that opts to use components for defining UI in favor of props objects. - -- options={{ -- tabBarIcon: ({ focused, color, size }) => ( -- -- ), -- }} - -* - Use Stacks inside tabs - The JavaScript have a mock stack header which is not present in the native tabs. Instead, you should nest a native layout inside the native tabs to support both headers and pushing screens. - -Known limitations -A limit of 5 tabs on Android -On Android, there is a limitation of having a maximum of 5 tabs in the tab bar. This restriction comes from the platform's Material Tabs component. - -Android does not support custom images -This is in active development. At the moment, you can only use build-time drawables on Android. - -Cannot measure the tab bar height -The tabs move around, sometimes being on top of the screen when rendering on iPad, sometimes on the side of the screen when running on Apple Vision Pro, and so on. We're working on a layout function to provide more detailed layout info in the future. - -No support for nested native tabs -Native tabs cannot be nested inside other native tabs. You can still nest JavaScript tabs inside native tabs. - -Limited support for FlatList -FlatList integration with native tabs has limitations. Features like scroll-to-top and minimize-on-scroll aren't supported. Additionally, detecting scroll edges may fail, causing the tab bar to appear transparent. To fix this, use the disableTransparentOnScrollEdge prop. - -app/\_layout.tsx - -Copy - -import { NativeTabs, Label } from 'expo-router/unstable-native-tabs'; - -export default function TabLayout() { -return ( - - - - - -); -} diff --git a/apps/cards/apps/mobile/Docs/EXPO_UI_DOCS.md b/apps/cards/apps/mobile/Docs/EXPO_UI_DOCS.md deleted file mode 100644 index 97b0b82ab..000000000 --- a/apps/cards/apps/mobile/Docs/EXPO_UI_DOCS.md +++ /dev/null @@ -1,936 +0,0 @@ -Building SwiftUI apps with Expo UI - -Copy - -Learn how to use Expo UI to integrate SwiftUI into your Expo apps. - -Available in SDK 54 and above. -Expo UI brings SwiftUI to React Native. You can use modern SwiftUI primitives to build your apps. - -This guide covers the basics of using Expo UI to integrate SwiftUI into your Expo apps. - -Features -SwiftUI primitives: Expo UI is not another UI library. It brings SwiftUI primitives to Expo. -1-to-1 mapping: The components in Expo UI have a 1-to-1 mapping to SwiftUI views. You can easily explore available views in the SwiftUI ecosystem, such as Explore SwiftUI or the Libraried app, and find the corresponding Expo UI component. -Full-app support: Expo UI is designed to be used throughout the entire app. You can write your app entirely in Expo UI, while maintaining flexibility at the same time. The integration works at the component level. You can also mix React Native components, Expo UI components, DOM components, or custom 2D components using react-native-skia. -Installation -You'll need to install the @expo/ui package in your Expo project. Run the following command to install it: - -Terminal - -Copy - -npx expo install @expo/ui -Usage -Expo UI has several SwiftUI components available. You can use them in your app by importing them from @expo/ui/swift-ui. However, to cross the boundary from React Native (UIKit) to SwiftUI, you need to use the component. The is the container for SwiftUI views. You can think of it like in the DOM or in react-native-skia. Under the hood, it uses UIHostingController to render SwiftUI views in UIKit. - -Basic usage with Host - -Code - -Preview - -SwiftUI loading view - -Copy - -import { CircularProgress, Host } from '@expo/ui/swift-ui'; -import { View, Text } from 'react-native'; - -export default function LoadingView() { -return ( - - - - -Loading... - -); -} -Using HStack and VStack -You can also use the HStack and VStack components to build the entire layout in SwiftUI. - -Code - -Preview - -SwiftUI loading with HStack and VStack - -Copy - -import { CircularProgress, Host, HStack, LinearProgress, VStack } from '@expo/ui/swift-ui'; - -export default function LoadingView() { -return ( - - - - - - - - - - -); -} -Modifiers -SwiftUI modifier is a powerful way to customize the appearance and behavior of SwiftUI components. Expo UI also provides modifiers for SwiftUI components. You can import modifiers from @expo/ui/swift-ui/modifiers and pass them as an array to the modifiers prop. In the following example, the expo-mesh-gradient and glassEffect modifier are combined to create Liquid Glass text. - -Code - -Preview - -Note: glassEffect modifier requires Xcode 26+ and iOS 26+. - -SwiftUI modifiers - -Copy - -import { Host, Text } from '@expo/ui/swift-ui'; -import { glassEffect, padding } from '@expo/ui/swift-ui/modifiers'; -import { MeshGradientView } from 'expo-mesh-gradient'; -import { View } from 'react-native'; - -export default function Page() { -return ( - - - - -Glass effect text - - - -); -} - -Show More -iOS Settings app example -Combining the Expo UI components and modifiers, you can build a UI like iOS Settings app. - -Code - -Preview - -SwiftUI Form example to build iOS Settings app - -Copy - -import { -Button, -Form, -Host, -HStack, -Image, -Section, -Spacer, -Switch, -Text, -} from '@expo/ui/swift-ui'; -import { background, clipShape, frame } from '@expo/ui/swift-ui/modifiers'; -import { Link } from 'expo-router'; -import { useState } from 'react'; - -export default function SettingsView() { -const [isAirplaneMode, setIsAirplaneMode] = useState(true); - -return ( - - -
-
- - -Airplane Mode - - - - - - - -
-
-
- -); -} - -Show More -Common questions -Can I use flexbox or other styles in SwiftUI components? -Flexbox styles can be applied to the component itself. Once you're inside the SwiftUI context, however, Yoga is not available — layouts should be defined using and instead. - -What's the Host component? - is the container for SwiftUI views. You can think of it like in the DOM or in react-native-skia. Under the hood, it uses UIHostingController to render SwiftUI views in UIKit. - -How is Expo UI different from libraries like react-native-paper or react-native-elements? -Expo UI is not "yet another" UI library and not an opinionated design kit. Instead, it's a primitives library. It exposes native SwiftUI and Jetpack Compose components directly to JavaScript, rather than re-implementing or simulating UI in JavaScript. - -Can I use @expo/ui/swift-ui on Android or web? -The first milestone for Expo UI is achieving a 1-to-1 mapping from SwiftUI to Expo UI. Universal support will come in the next stage of the roadmap. Our priority is to establish strong SwiftUI support first, and then expand to Jetpack Compose on Android and DOM support on the Web. - -Can I use React Native components inside SwiftUI components? -Yes, you can place React Native components as JSX children of Expo UI components. Expo UI automatically creates a UIViewRepresentable wrapper for you. However, keep in mind that the SwiftUI layout system works differently from UIKit and has some limitations. According to Apple's documentation: - -SwiftUI fully controls the layout of the UIKit view's center, bounds, frame, and transform properties. Don't directly set these layout-related properties on the view managed by a UIViewRepresentable instance from your own code because that conflicts with SwiftUI and results in undefined behavior. -Also note that once you render React Native components, you're leaving the SwiftUI context. If you want to add Expo UI components again, you'll need to reintroduce a wrapper. - -We recommend keeping SwiftUI layouts self-contained. Interop is possible, but it works best when boundaries are clearly defined. - -I'm a SwiftUI developer. Why should I learn Expo UI? -Because React's promise of "learn once, write anywhere", it now extends to SwiftUI and Jetpack Compose. With Expo UI, you can apply your SwiftUI knowledge to build apps that run in the React Native ecosystem, extend to the Web through DOM components, and even integrate 2D and 3D rendering. The system is flexible enough that different parts of your app can use different approaches — giving you seamless integration at the component level. - -SwiftUI - -SwiftUI components for building native iOS interfaces with @expo/ui. - -Bundled version: -~0.2.0-beta.4 - -Copy - -This library is currently in beta and subject to breaking changes. It is not available in the Expo Go app — use development builds to try it out. -The SwiftUI components in @expo/ui/swift-ui allow you to build fully native iOS interfaces using SwiftUI from React Native. - -Expo UI guide for Swift UI -Learn about the basics of @expo/ui/swift-ui - -Installation -Terminal - -Copy - -npx expo install @expo/ui -If you are installing this in an existing React Native app, make sure to install expo in your project. - -Components -BottomSheet - -iOS - -Code - -import { BottomSheet, Host, Text } from '@expo/ui/swift-ui'; -import { useWindowDimensions } from 'react-native'; - -const { width } = useWindowDimensions(); - - - setIsOpened(e)}> -Hello, world! - - -See also: official SwiftUI documentation - -Button -The borderless variant is not available on Apple TV. - -iOS - -Code - -import { Button, Host } from '@expo/ui/swift-ui'; - - - - -See also: official SwiftUI documentation - -CircularProgress - -iOS - -Code - -import { CircularProgress, Host } from '@expo/ui/swift-ui'; - - - - -See also: official SwiftUI documentation - -ColorPicker -This component is not available on Apple TV. - -iOS - -Code - -import { ColorPicker, Host } from '@expo/ui/swift-ui'; - - - - -See also: official SwiftUI documentation - -ContextMenu -Note: Also known as DropdownMenu. - -iOS - -Code - -import { ContextMenu, Host } from '@expo/ui/swift-ui'; - - - - - - - setSelectedIndex(index)} -/> - - - - - - - -Show More -See also: official SwiftUI documentation - -DateTimePicker (date) -This component is not available on Apple TV. - -iOS - -Code - -import { DateTimePicker, Host } from '@expo/ui/swift-ui'; - - - { - setSelectedDate(date); - }} - displayedComponents='date' - initialDate={selectedDate.toISOString()} - variant='wheel' - /> - -See also: official SwiftUI documentation - -DateTimePicker (time) -This component is not available on Apple TV. - -iOS - -Code - -import { DateTimePicker, Host } from '@expo/ui/swift-ui'; - - - { - setSelectedDate(date); - }} - displayedComponents='hourAndMinute' - initialDate={selectedDate.toISOString()} - variant='wheel' - /> - -See also: official SwiftUI documentation - -Gauge -This component is not available on Apple TV. - -iOS - -Code - -import { Gauge, Host } from "@expo/ui/swift-ui"; - - - - -See also: official SwiftUI documentation - -Host -A component that allows you to put the other @expo/ui/swift-ui components in React Native. It acts like for DOM, for react-native-skia, which underlying uses UIHostingController to render the SwiftUI views in UIKit. - -Since the Host component is a React Native View, you can pass the style prop to it or matchContents prop to make the Host component match the contents' size. - -Wrapping Button in Host - -Copy - -import { Button, Host } from '@expo/ui/swift-ui'; - -function Example() { -return ( - - - -); -} -Host with flexbox and VStack - -Copy - -import { Button, Host, VStack, Text } from '@expo/ui/swift-ui'; - -function Example() { -return ( - - -Hello, world! - - - -); -} -LinearProgress - -iOS - -Code - -import { LinearProgress, Host } from '@expo/ui/swift-ui'; - - - - -See also: official SwiftUI documentation - -List - -iOS - -Code - -import { Host, List } from '@expo/ui/swift-ui'; - - - alert(`indexes of selected items: ${items.join(', ')}`)} -moveEnabled={moveEnabled} -onMoveItem={(from, to) => alert(`moved item at index ${from} to index ${to}`)} -onDeleteItem={(item) => alert(`deleted item at index: ${item}`)} -listStyle='automatic' -deleteEnabled={deleteEnabled} -selectEnabled={selectEnabled}> -{data.map((item, index) => ( - -))} - - - -Show More -See also: official SwiftUI documentation - -Picker (segmented) - -iOS - -Code - -import { Host, Picker } from '@expo/ui/swift-ui'; - - - { - setSelectedIndex(index); - }} - variant="segmented" - /> - -See also: official SwiftUI documentation - -Picker (wheel) -The wheel variant is not available on Apple TV. - -iOS - -Code - -import { Host, Picker } from '@expo/ui/swift-ui'; - - - { -setSelectedIndex(index); -}} -variant="wheel" -/> - -See also: official SwiftUI documentation - -Slider -This component is not available on Apple TV. - -iOS - -Code - -import { Host, Slider } from '@expo/ui/swift-ui'; - - - { -setValue(value); -}} -/> - -See also: official SwiftUI documentation - -Switch (toggle) -Note: Also known as Toggle. - -iOS - -Code - -import { Host, Switch } from '@expo/ui/swift-ui'; - - - { - setChecked(checked); - }} - color="#ff0000" - label="Play music" - variant="switch" - /> - -See also: official SwiftUI documentation - -Switch (checkbox) - -iOS - -Code - -import { Host, Switch } from '@expo/ui/swift-ui'; - - - { - setChecked(checked); - }} - label="Play music" - variant="checkbox" - /> - -See also: official SwiftUI documentation - -TextField - -iOS - -Code - -import { Host, TextField } from '@expo/ui/swift-ui'; - - - - -See also: official SwiftUI documentation - -More -Expo UI is still in active development. We continue to add more functionality and may change the API. Some examples in the docs may not be up to date. If you want to see the latest changes, check the examples. - -API -Full documentation is not yet available. Use TypeScript types to explore the API. - -// Import from the SwiftUI package -import { BottomSheet } from '@expo/ui/swift-ui'; - -Jetpack Compose - -Jetpack Compose components for building native Android interfaces with @expo/ui. - -Bundled version: -~0.2.0-beta.4 - -Copy - -This library is currently in alpha and will frequently experience breaking changes. It is not available in the Expo Go app — use development builds to try it out. -The Jetpack Compose components in @expo/ui/jetpack-compose allow you to build fully native Android interfaces using Jetpack Compose from React Native. - -Installation -Terminal - -Copy - -npx expo install @expo/ui -If you are installing this in an existing React Native app, make sure to install expo in your project. - -Components -Button - -Android - -Code - -import { Button } from '@expo/ui/jetpack-compose'; - - -See also: official Jetpack Compose documentation - -CircularProgress - -Android - -Code - -import { CircularProgress } from '@expo/ui/jetpack-compose'; - - -See also: official Jetpack Compose documentation - -ContextMenu -Note: Also known as DropdownMenu. - -Android - -Code - -import { ContextMenu } from '@expo/ui/jetpack-compose'; - - - - - - setSelectedIndex(index)} -/> - - - - - - -Show More -See also: official Jetpack Compose documentation - -Chip - -Android - -Code - -import { Chip } from '@expo/ui/jetpack-compose'; - -// Assist chip with icon - console.log('Opening flight booking...')} -/> - -// Filter chip with selection - handleFilterToggle('Images')} -/> - -// Input chip with dismiss - handleInputDismiss('Work')} -/> - -// Suggestion chip - console.log('Searching nearby...')} -/> - -Show More -See also: official Jetpack Compose documentation - -DateTimePicker (date) - -Android - -Code - -import { DateTimePicker } from '@expo/ui/jetpack-compose'; - - { -setSelectedDate(date); -}} -displayedComponents='date' -initialDate={selectedDate.toISOString()} -variant='picker' -/> -See also: official Jetpack Compose documentation - -DateTimePicker (time) - -Android - -Code - -import { DateTimePicker } from '@expo/ui/jetpack-compose'; - - { -setSelectedDate(date); -}} -displayedComponents='hourAndMinute' -initialDate={selectedDate.toISOString()} -variant='picker' -/> -See also: official Jetpack Compose documentation - -LinearProgress - -Android - -Code - -import { LinearProgress } from '@expo/ui/jetpack-compose'; - - -See also: official Jetpack Compose documentation - -Picker (radio) - -Android - -Code - -import { Picker } from '@expo/ui/jetpack-compose'; - - { -setSelectedIndex(index); -}} -variant="radio" -/> -See also: official Jetpack Compose documentation - -Picker (segmented) - -Android - -Code - -import { Picker } from '@expo/ui/jetpack-compose'; - - { -setSelectedIndex(index); -}} -variant="segmented" -/> -See also: official Jetpack Compose documentation - -Slider - -Android - -Code - -import { Slider } from '@expo/ui/jetpack-compose'; - - { -setValue(value); -}} -/> -See also: official Jetpack Compose documentation - -Switch (toggle) -Note: also known as Toggle. - -Android - -Code - -import { Switch } from '@expo/ui/jetpack-compose'; - - { -setChecked(checked); -}} -color="#ff0000" -label="Play music" -variant="switch" -/> -See also: official Jetpack Compose documentation - -Switch (checkbox) - -Android - -Code - -import { Switch } from '@expo/ui/jetpack-compose'; - - { -setChecked(checked); -}} -label="Play music" -color="#ff0000" -variant="checkbox" -/> -See also: official Jetpack Compose documentation - -TextInput - -Android - -Code - -import { TextInput } from '@expo/ui/jetpack-compose'; - - -See also: official Jetpack Compose documentation - -API -Full documentation is not yet available. Use TypeScript types to explore the API. - -// Import from the Jetpack Compose package -import { Button } from '@expo/ui/jetpack-compose'; diff --git a/apps/cards/apps/mobile/Docs/EXPO_UI_OFFFICIAL_DOCS.md b/apps/cards/apps/mobile/Docs/EXPO_UI_OFFFICIAL_DOCS.md deleted file mode 100644 index 7b4c50a09..000000000 --- a/apps/cards/apps/mobile/Docs/EXPO_UI_OFFFICIAL_DOCS.md +++ /dev/null @@ -1,293 +0,0 @@ -Expo UI - -A set of components that allow you to build UIs directly with SwiftUI and Jetpack Compose from React. - -Bundled version: -~0.2.0-beta.4 - -Copy - -This library is currently in alpha and will frequently experience breaking changes. It is not available in the Expo Go app – use development builds to try it out. -@expo/ui is a set of native input components that allows you to build fully native interfaces with SwiftUI and Jetpack Compose. It aims to provide the commonly used features and components that a typical app will need. - -Expo UI guide for Swift UI -Learn about the basics of @expo/ui/swift-ui - -Installation -Terminal - -Copy - -npx expo install @expo/ui -If you are installing this in an existing React Native app, make sure to install expo in your project. - -Swift UI examples -BottomSheet - -iOS - -Code - -BottomSheet component on iOS. -Button -The borderless variant is not available on Apple TV. - -iOS - -Code - -Button component on iOS. -CircularProgress - -iOS - -Code - -CircularProgress component on iOS. -ColorPicker -This component is not available on Apple TV. - -iOS - -Code - -ColorPicker component on iOS. -ContextMenu -Note: Also known as DropdownMenu. - -iOS - -Code - -ContextMenu component on iOS. -DateTimePicker (date) -This component is not available on Apple TV. - -iOS - -Code - -DateTimePicker (date) component on iOS. -DateTimePicker (time) -This component is not available on Apple TV. - -iOS - -Code - -DateTimePicker (time) component on iOS. -Gauge -This component is not available on Apple TV. - -iOS - -Code - -Gauge component on iOS. -Host -A component that allows you to put the other @expo/ui/swift-ui components in React Native. It acts like for DOM, for react-native-skia, which underlying uses UIHostingController to render the SwiftUI views in UIKit. - -Since the Host component is a React Native View, you can pass the style prop to it or matchContents prop to make the Host component match the contents' size. - -Wrapping Button in Host - -Copy - -import { Button, Host } from '@expo/ui/swift-ui'; - -function Example() { -return ( - - - -); -} -Host with flexbox and VStack - -Copy - -import { Button, Host, VStack, Text } from '@expo/ui/swift-ui'; - -function Example() { -return ( - - -Hello, world! - - - -); -} -LinearProgress - -iOS - -Code - -LinearProgress component on iOS. -List - -iOS - -Code - -List component on iOS. -Picker (segmented) - -iOS - -Code - -Picker component on iOS. -Picker (wheel) -The wheel variant is not available on Apple TV. - -iOS - -Code - -Picker component on iOS. -Slider -This component is not available on Apple TV. - -iOS - -Code - -Slider component on iOS. -Switch (toggle) -Note: Also known as Toggle. - -iOS - -Code - -Switch component on iOS. -Switch (checkbox) - -iOS - -Code - -Picker component on iOS. -TextField - -iOS - -Code - -TextField component on iOS. -More -Expo UI is still in active development. We continue to add more functionality and may change the API. Some examples in the docs may not be up to date. If you want to see the latest changes, check the examples. - -Jetpack Compose examples -Button - -Android - -Code - -Button component on Android. -CircularProgress - -Android - -Code - -CircularProgress component on Android. -ContextMenu -Note: Also known as DropdownMenu. - -Android - -Code - -ContextMenu component on Android. -Chip - -Android - -Code - -Chip component on Android. -DateTimePicker (date) - -Android - -Code - -DateTimePicker component on Android. -DateTimePicker (time) - -Android - -Code - -DateTimePicker (time) component on Android. -LinearProgress - -Android - -Code - -LinearProgress component on Android. -Picker (radio) - -Android - -Code - -Picker component (radio) on Android. -Picker (segmented) - -Android - -Code - -Picker component on Android. -Slider - -Android - -Code - -Slider component on Android. -Switch (toggle) -Note: also known as Toggle. - -Android - -Code - -Switch component on Android. -Switch (checkbox) - -Android - -Code - -Switch (checkbox variant) component on Android. -TextInput - -Android - -Code - -TextInput component on Android. -API -Full documentation is not yet available. Use TypeScript types to explore the API. - -// Import from the SwiftUI package -import { BottomSheet } from '@expo/ui/swift-ui'; -// Import from the Jetpack Compose package -import { Button } from '@expo/ui/jetpack-compose'; diff --git a/apps/cards/apps/mobile/Docs/GLASS_HEADER_GUIDE.md b/apps/cards/apps/mobile/Docs/GLASS_HEADER_GUIDE.md deleted file mode 100644 index 7345930b2..000000000 --- a/apps/cards/apps/mobile/Docs/GLASS_HEADER_GUIDE.md +++ /dev/null @@ -1,200 +0,0 @@ -# Glass/Blur Header Implementation Guide - Expo Router - -## Overview -Glass headers (blur effect headers) provide a modern iOS-style frosted glass appearance that blurs content behind the header when scrolling. This guide covers implementation in Expo Router. - -## Requirements -- Expo Router (latest version) -- iOS device/simulator (blur effect is iOS-only) -- `@react-navigation/elements` package (for `useHeaderHeight` hook) - -## Basic Implementation - -### 1. Enable Blur Effect in Layout - -```typescript -// app/(tabs)/_layout.tsx or app/_layout.tsx -import { Tabs } from 'expo-router'; -import { Platform } from 'react-native'; - -export default function Layout() { - return ( - - - - ); -} -``` - -### 2. Handle Content Padding - -Since the header is transparent, content will render behind it. Use `useHeaderHeight` to add proper padding: - -```typescript -// app/(tabs)/index.tsx -import { useHeaderHeight } from '@react-navigation/elements'; -import { Platform, FlatList } from 'react-native'; - -export default function Screen() { - const headerHeight = useHeaderHeight(); - - return ( - } - /> - ); -} -``` - -## Blur Effect Options (iOS Only) - -Available `headerBlurEffect` values: -- `'regular'` - Standard blur (recommended) -- `'prominent'` - More pronounced blur -- `'systemMaterial'` - Adapts to system theme -- `'systemThinMaterial'` - Thinner material -- `'systemUltraThinMaterial'` - Ultra-thin material -- `'systemThickMaterial'` - Thicker material -- `'systemChromeMaterial'` - Chrome-style material -- `'systemThinMaterialLight'` - Light thin material -- `'systemThinMaterialDark'` - Dark thin material - -## Platform-Specific Considerations - -### iOS -- Blur effect works natively -- Requires both `headerTransparent: true` and `headerBlurEffect` -- Header automatically adapts to light/dark mode with system materials - -### Android -- Native blur not supported -- Header remains solid -- Use `Platform.OS === 'ios'` checks to prevent errors - -### Web -- Blur not supported -- Falls back to solid header - -## Best Practices - -### ✅ Do -- Always use Platform checks for iOS-specific features -- Add proper content padding with `useHeaderHeight` -- Test on both iOS and Android -- Use `'regular'` or `'systemMaterial'` for best compatibility -- Consider dark mode with appropriate blur materials - -### ❌ Don't -- Don't apply blur without `headerTransparent: true` -- Don't forget to handle content padding -- Don't use iOS-specific values on Android -- Don't rely on blur for critical UI elements visibility - -## Common Issues & Solutions - -### Issue: Content appears behind header -**Solution**: Use `useHeaderHeight` hook to add `paddingTop` - -```typescript -const headerHeight = useHeaderHeight(); -contentContainerStyle={{ paddingTop: Platform.OS === 'ios' ? headerHeight : 0 }} -``` - -### Issue: Blur not visible -**Solution**: Ensure both `headerTransparent` and `headerBlurEffect` are set - -```typescript -headerTransparent: true, -headerBlurEffect: 'regular', -``` - -### Issue: Android crashes or looks wrong -**Solution**: Use platform checks - -```typescript -headerTransparent: Platform.OS === 'ios', -headerBlurEffect: Platform.OS === 'ios' ? 'regular' : undefined, -``` - -### Issue: Header text not readable -**Solution**: Use appropriate blur material or adjust header tint color - -```typescript -headerBlurEffect: 'systemMaterial', // Adapts to theme -headerTintColor: colors.foreground, -``` - -## Complete Example - -```typescript -// app/(tabs)/_layout.tsx -import { Tabs } from 'expo-router'; -import { Platform } from 'react-native'; -import { useThemeColors } from '~/utils/themeUtils'; - -export default function TabLayout() { - const colors = useThemeColors(); - - return ( - - - - ); -} -``` - -```typescript -// app/(tabs)/index.tsx -import { View, FlatList, Platform } from 'react-native'; -import { useHeaderHeight } from '@react-navigation/elements'; - -export default function HomeScreen() { - const headerHeight = useHeaderHeight(); - - return ( - - } - /> - - ); -} -``` - -## References -- [Expo Router Stack Documentation](https://docs.expo.dev/router/advanced/stack/) -- [React Navigation Header Options](https://reactnavigation.org/docs/native-stack-navigator/#headerblureffect) -- [Aman Mittal's Guide](https://amanhimself.dev/blog/blur-effect-in-header-with-expo-router/) - -## Version Info -- Last updated: 2025-01 -- Expo SDK: 52+ -- Expo Router: v5+ diff --git a/apps/cards/apps/mobile/Docs/HEADER_STYLING_GUIDE.md b/apps/cards/apps/mobile/Docs/HEADER_STYLING_GUIDE.md deleted file mode 100644 index 68960c9d1..000000000 --- a/apps/cards/apps/mobile/Docs/HEADER_STYLING_GUIDE.md +++ /dev/null @@ -1,382 +0,0 @@ -# Header Styling Guide - Expo Router - -## Overview -This guide covers all available styling options for headers in Expo Router's Stack navigator. - -## Available Header Style Options - -### Basic Configuration - -```typescript -import { Stack } from 'expo-router'; -import { useThemeColors } from '~/utils/themeUtils'; - -export default function Layout() { - const colors = useThemeColors(); - - return ( - - - - ); -} -``` - -## Core Style Properties - -### 1. headerStyle -Controls the header container's style. - -```typescript -headerStyle: { - backgroundColor: '#ff0000', // Background color (not needed with headerTransparent) -} -``` - -**Note**: Cannot set `height` - this is controlled by the OS. - -### 2. headerTintColor -Sets the color for back button and title text. - -```typescript -headerTintColor: '#ffffff' // White text and icons -``` - -### 3. headerTitleStyle -Customizes the title text appearance. - -```typescript -headerTitleStyle: { - fontWeight: 'bold', - fontSize: 20, - fontFamily: 'CustomFont', - color: '#000000', // Can override headerTintColor for title only -} -``` - -### 4. headerTitleAlign -Controls title alignment. - -```typescript -headerTitleAlign: 'center' | 'left' // Default: 'center' on iOS, 'left' on Android -``` - -### 5. headerTransparent -Makes header transparent for glass effect. - -```typescript -headerTransparent: true // Required for headerBlurEffect -``` - -### 6. headerBlurEffect (iOS only) -Adds blur/glass effect to header. - -```typescript -headerBlurEffect: 'systemMaterial' | 'regular' | 'prominent' | - 'systemThinMaterial' | 'systemUltraThinMaterial' | - 'systemChromeMaterial' | 'systemThinMaterialLight' | - 'systemThinMaterialDark' -``` - -### 7. headerShadowVisible -Controls header shadow/border visibility. - -```typescript -headerShadowVisible: false // Remove shadow -``` - -## Back Button Customization - -### headerBackVisible -Show/hide back button. - -```typescript -headerBackVisible: true // Show back button -``` - -### headerBackTitle (iOS only) -Custom text for back button. - -```typescript -headerBackTitle: 'Home' // Default: Previous screen title -``` - -### headerBackTitleVisible (iOS only) -Show/hide back button text. - -```typescript -headerBackTitleVisible: false // Only show arrow icon -``` - -### headerBackImageSource -Custom back button icon. - -```typescript -headerBackImageSource: require('./assets/back-icon.png') -``` - -## Title Customization - -### headerTitle -Function to render custom title component. - -```typescript -headerTitle: () => ( - - Custom Title - -) -``` - -### headerTitleAlign -```typescript -headerTitleAlign: 'center' // 'center' | 'left' -``` - -## Header Buttons - -### headerLeft -Custom left button/component. - -```typescript -headerLeft: () => ( - console.log('Left button')}> - - -) -``` - -### headerRight -Custom right button/component. - -```typescript -headerRight: () => ( - console.log('Right button')}> - - -) -``` - -## Search Bar (iOS 11+) - -### headerSearchBarOptions -Native iOS search bar in header. - -```typescript -headerSearchBarOptions: { - placeholder: 'Search...', - onChangeText: (text) => console.log(text), - hideWhenScrolling: true, -} -``` - -## Large Title (iOS) - -### headerLargeTitle -Large title that collapses on scroll (iOS only). - -```typescript -headerLargeTitle: true -``` - -### headerLargeTitleStyle -Style for large title. - -```typescript -headerLargeTitleStyle: { - fontWeight: 'bold', - fontSize: 34, -} -``` - -### headerLargeTitleShadowVisible -Shadow for large title. - -```typescript -headerLargeTitleShadowVisible: false -``` - -## Complete Example: Glass Header with Theme - -```typescript -import { Stack } from 'expo-router'; -import { Platform } from 'react-native'; -import { useThemeColors } from '~/utils/themeUtils'; - -export default function Layout() { - const colors = useThemeColors(); - - return ( - - ( - console.log('Settings')}> - - - ), - }} - /> - - ); -} -``` - -## Platform Differences - -### iOS -- Default title alignment: `center` -- Supports `headerBlurEffect` -- Supports `headerLargeTitle` -- Supports `headerSearchBarOptions` -- Back button shows previous screen title by default - -### Android -- Default title alignment: `left` -- No blur effect (use solid `backgroundColor`) -- No large title support -- No native search bar in header -- Back button only shows arrow icon - -## Common Patterns - -### 1. Remove Header Shadow -```typescript -headerShadowVisible: false -``` - -### 2. Custom Back Button -```typescript -headerLeft: () => ( - router.back()}> - - -) -``` - -### 3. Hide Header on Specific Screen -```typescript - -``` - -### 4. Dynamic Title -```typescript - - }} -/> -``` - -### 5. Large Title with Search (iOS) -```typescript - -``` - -## Limitations - -### Cannot Customize: -- ❌ Header height (controlled by OS) -- ❌ Status bar appearance (use `expo-status-bar` package) -- ❌ Exact positioning of elements (use headerLeft/headerRight instead) - -### Platform-Specific: -- ⚠️ Blur effects only on iOS -- ⚠️ Large titles only on iOS -- ⚠️ Native search bar only on iOS 11+ - -## Troubleshooting - -### Issue: Title not visible on transparent header -**Solution**: Ensure `headerTintColor` is set to a visible color - -### Issue: Back button wrong color -**Solution**: Set `headerTintColor` - it controls both title and back button - -### Issue: Header too tall/short -**Solution**: Height is controlled by OS and cannot be changed. Use custom header component if needed. - -### Issue: Shadow visible on transparent header -**Solution**: Set `headerShadowVisible: false` - -## References -- [Expo Router Stack Documentation](https://docs.expo.dev/router/advanced/stack/) -- [React Navigation Native Stack Navigator](https://reactnavigation.org/docs/native-stack-navigator/) -- [React Navigation Headers](https://reactnavigation.org/docs/headers/) diff --git a/apps/cards/apps/mobile/Docs/NATIVE_TAB_BEHAVIOR.md b/apps/cards/apps/mobile/Docs/NATIVE_TAB_BEHAVIOR.md deleted file mode 100644 index bbd261e49..000000000 --- a/apps/cards/apps/mobile/Docs/NATIVE_TAB_BEHAVIOR.md +++ /dev/null @@ -1,157 +0,0 @@ -# Native Tab Behavior - Cards App - -## Übersicht - -Die Cards-App nutzt die **Native Tabs** von Expo Router (SDK 54+), um eine native iOS/Android Tab-Navigation zu implementieren. Diese Dokumentation beschreibt die Konfiguration und das Verhalten der Tabs in unserer App. - -## Aktuelle Implementierung - -### Standort - -`app/(tabs)/_layout.tsx` - -### Konfiguration - -```tsx -import { NativeTabs, Icon, Label } from 'expo-router/unstable-native-tabs'; - -export default function TabLayout() { - return ( - - - - - - - - - - - - - - - - - - - - - - ); -} -``` - -## Minimize Behavior - -### Was ist `minimizeBehavior`? - -Die `minimizeBehavior` Property steuert, wie sich die Tab-Leiste beim Scrollen verhält. Diese Funktion ist ab iOS 26 verfügbar und erfordert Xcode 26 oder höher zum Kompilieren. - -### Verfügbare Optionen - -| Option | Beschreibung | -| ---------------- | --------------------------------------------------------------------------------------------------------------------------------- | -| `'automatic'` | **[AKTUELL IN APP]** iOS entscheidet automatisch, wann die Tab-Leiste minimiert wird. Dies passt sich dem nativen iOS-Kontext an. | -| `'never'` | Tab-Leiste bleibt immer sichtbar und wird nie minimiert. | -| `'onScrollDown'` | Tab-Leiste wird beim Runterscrollen minimiert und beim Hochscrollen wieder angezeigt. | -| `'onScrollUp'` | Tab-Leiste wird beim Hochscrollen minimiert (seltener verwendet). | - -### Unsere Wahl: `automatic` - -Wir verwenden `minimizeBehavior="automatic"`, weil: - -- iOS das Verhalten optimal an den Kontext anpasst -- Es sich nativ anfühlt und konsistent mit anderen iOS-Apps ist -- Keine manuelle Konfiguration für verschiedene Scroll-Szenarien nötig ist - -## Systemanforderungen - -### iOS - -- **Minimum:** iOS 26 (für `minimizeBehavior`) -- **Xcode:** Version 26 oder höher -- **Expo SDK:** 54 oder höher -- **Status:** ✅ Produktionsreif (experimentelle API) - -### Android - -- **Status:** 🚧 In Entwicklung -- Native Tab Minimize Behavior ist noch nicht verfügbar -- Geplante Unterstützung in zukünftigen Expo-Versionen - -## Bekannte Einschränkungen - -### FlatList-Integration - -⚠️ **Wichtig:** FlatList-Komponenten haben Limitierungen mit Native Tabs: - -- `scroll-to-top` funktioniert möglicherweise nicht wie erwartet -- `minimize-on-scroll` kann bei FlatList fehlschlagen -- Edge-Detection kann fehlschlagen (Tab-Leiste wird transparent) - -**Lösung:** Wenn Probleme auftreten, verwende den `disableTransparentOnScrollEdge` Prop: - -```tsx - - {/* Tabs */} - -``` - -### Weitere Limitierungen - -1. **Maximum 5 Tabs auf Android** - Material Design Komponenten-Beschränkung -2. **Tab-Leisten-Höhe nicht messbar** - Position variiert je nach Gerät (iPad, Vision Pro, etc.) -3. **Keine verschachtelten Native Tabs** - JavaScript Tabs können aber innerhalb von Native Tabs verschachtelt werden - -## Best Practices für Cards - -### Icons - -- **iOS:** SF Symbols verwenden (höhere Qualität, native Optik) -- **Android:** Drawables verwenden -- Immer `default` und `selected` States definieren für besseres UX - -### Scroll-Verhalten - -- Verwende ScrollView oder ähnliche Komponenten in Tab-Screens -- Bei FlatList-Problemen: `disableTransparentOnScrollEdge` aktivieren -- Teste das Verhalten auf echten Geräten (Simulator kann abweichen) - -### Entwicklung - -```bash -# Development Server starten -npm start - -# iOS Simulator (erfordert Xcode 26+) -npm run ios - -# Android Emulator -npm run android -``` - -## Weiterführende Ressourcen - -- **Vollständige Expo Docs:** `docs/EXPO_NATIVE_TABS.md` -- **Expo Router Native Tabs:** https://docs.expo.dev/router/advanced/native-tabs/ -- **API Referenz:** https://docs.expo.dev/versions/latest/sdk/router-native-tabs/ - -## Änderungshistorie - -| Datum | Änderung | Version | -| ---------- | ------------------------------------------ | ------- | -| 2025-10-20 | `minimizeBehavior="automatic"` hinzugefügt | SDK 54 | -| 2025-09 | Initiale Native Tabs Implementierung | SDK 54 | - ---- - -**Status:** ✅ Experimentell (API kann sich ändern) -**Plattform:** iOS (primär), Android (geplant) -**Maintainer:** Cards Team diff --git a/apps/cards/apps/mobile/Docs/database.md b/apps/cards/apps/mobile/Docs/database.md deleted file mode 100644 index eb22613f1..000000000 --- a/apps/cards/apps/mobile/Docs/database.md +++ /dev/null @@ -1,183 +0,0 @@ -# Cards Datenbank-Dokumentation - -## Übersicht - -Die Cards-Anwendung verwendet **Supabase** (PostgreSQL) als Backend-Datenbank. Die Datenbank ist für eine mobile Lern- und Karteikarten-Anwendung konzipiert und unterstützt Multi-User-Funktionalität mit Row Level Security (RLS). - -## Datenbankstruktur - -### Tabellen - -#### 1. **profiles** - -Speichert Benutzerprofile und Einstellungen. - -| Spalte | Typ | Beschreibung | Constraints | -| -------------- | ----------- | ------------------------------------ | --------------------- | -| `id` | uuid | Benutzer-ID (Referenz zu auth.users) | PRIMARY KEY, NOT NULL | -| `username` | varchar | Eindeutiger Benutzername | NOT NULL, UNIQUE | -| `display_name` | varchar | Anzeigename des Benutzers | NULL | -| `avatar_url` | text | URL zum Profilbild | NULL | -| `bio` | text | Biografie/Beschreibung | NULL | -| `preferences` | jsonb | Benutzereinstellungen als JSON | DEFAULT '{}' | -| `created_at` | timestamptz | Erstellungszeitpunkt | DEFAULT now() | -| `updated_at` | timestamptz | Letzte Aktualisierung | DEFAULT now() | - -**Beziehungen:** - -- Foreign Key zu `auth.users(id)` über `id` - -#### 2. **decks** - -Verwaltet Kartenstapel/Sammlungen von Lernkarten. - -| Spalte | Typ | Beschreibung | Constraints | -| ----------------- | ----------- | ------------------------------ | -------------------------------------- | -| `id` | uuid | Eindeutige Deck-ID | PRIMARY KEY, DEFAULT gen_random_uuid() | -| `user_id` | uuid | Besitzer des Decks | NOT NULL, FK zu auth.users | -| `title` | varchar | Titel des Decks | NOT NULL | -| `description` | text | Beschreibung des Decks | NULL | -| `cover_image_url` | text | URL zum Cover-Bild | NULL | -| `is_public` | boolean | Öffentlich sichtbar? | DEFAULT false | -| `settings` | jsonb | Deck-spezifische Einstellungen | DEFAULT '{}' | -| `tags` | text[] | Array von Tags | DEFAULT '{}' | -| `metadata` | jsonb | Zusätzliche Metadaten | DEFAULT '{}' | -| `created_at` | timestamptz | Erstellungszeitpunkt | DEFAULT now() | -| `updated_at` | timestamptz | Letzte Aktualisierung | DEFAULT now() | - -**Beziehungen:** - -- Foreign Key zu `auth.users(id)` über `user_id` -- One-to-Many Beziehung zu `cards` - -#### 3. **cards** - -Einzelne Lernkarten innerhalb der Decks. - -| Spalte | Typ | Beschreibung | Constraints | -| ------------- | ---------------- | ---------------------------- | -------------------------------------- | -| `id` | uuid | Eindeutige Karten-ID | PRIMARY KEY, DEFAULT gen_random_uuid() | -| `deck_id` | uuid | Zugehöriges Deck | NOT NULL, FK zu decks | -| `position` | integer | Position innerhalb des Decks | NOT NULL | -| `title` | varchar | Titel/Überschrift der Karte | NULL | -| `content` | jsonb | Karteninhalt (strukturiert) | DEFAULT '{}' | -| `card_type` | card_type (enum) | Typ der Karte | NOT NULL, DEFAULT 'text' | -| `ai_model` | varchar | Verwendetes AI-Modell | NULL | -| `ai_prompt` | text | AI-Prompt für Generierung | NULL | -| `version` | integer | Versionsnummer | DEFAULT 1 | -| `is_favorite` | boolean | Als Favorit markiert? | DEFAULT false | -| `created_at` | timestamptz | Erstellungszeitpunkt | DEFAULT now() | -| `updated_at` | timestamptz | Letzte Aktualisierung | DEFAULT now() | - -**Beziehungen:** - -- Foreign Key zu `decks(id)` über `deck_id` - -### Custom Types - -#### card_type (Enum) - -Definiert die verschiedenen Kartentypen: - -- `text` - Reine Textkarte -- `mixed` - Gemischter Inhalt -- `quiz` - Quiz-Karte -- `flashcard` - Klassische Lernkarte - -## Sicherheit (Row Level Security) - -Alle Tabellen haben RLS aktiviert mit folgenden Policies: - -### profiles Policies - -| Policy | Operation | Beschreibung | -| ----------------------------------- | --------- | ------------------------------------------------------- | -| "Profiles are viewable by everyone" | SELECT | Alle können Profile einsehen | -| "Users can insert own profile" | INSERT | Authentifizierte Benutzer können eigenes Profil anlegen | -| "Users can update own profile" | UPDATE | Benutzer können nur eigenes Profil bearbeiten | - -### decks Policies - -| Policy | Operation | Beschreibung | -| --------------------------------- | --------- | ------------------------------------------------ | -| "View public decks and own decks" | SELECT | Öffentliche Decks und eigene Decks sind sichtbar | -| "Users can create own decks" | INSERT | Authentifizierte Benutzer können Decks erstellen | -| "Users can update own decks" | UPDATE | Nur eigene Decks können bearbeitet werden | -| "Users can delete own decks" | DELETE | Nur eigene Decks können gelöscht werden | - -### cards Policies - -| Policy | Operation | Beschreibung | -| ------------------------------------- | --------- | -------------------------------------------------------- | -| "View cards from accessible decks" | SELECT | Karten aus öffentlichen oder eigenen Decks sind sichtbar | -| "Users can create cards in own decks" | INSERT | Karten können nur in eigenen Decks erstellt werden | -| "Users can update cards in own decks" | UPDATE | Karten in eigenen Decks können bearbeitet werden | -| "Users can delete cards in own decks" | DELETE | Karten in eigenen Decks können gelöscht werden | - -## Aktivierte Extensions - -- **uuid-ossp** (v1.1) - UUID-Generierung -- **pgcrypto** (v1.3) - Kryptografische Funktionen -- **pg_graphql** (v1.5.11) - GraphQL-Unterstützung -- **pg_stat_statements** (v1.11) - Query-Performance-Monitoring -- **supabase_vault** (v0.3.1) - Sichere Speicherung sensibler Daten - -## Migrations-Historie - -Die Datenbank wurde über folgende Migrationen aufgebaut: - -1. `20250819065657_create_profiles_table` - Erstellung der Profil-Tabelle -2. `20250819065714_create_decks_table` - Erstellung der Decks-Tabelle -3. `20250819065733_create_cards_table` - Erstellung der Cards-Tabelle -4. `20250819065806_enable_rls_and_policies` - Aktivierung von RLS und initiale Policies -5. `20250819081009_fix_profiles_insert_policy` - Korrektur der Profil-Insert-Policy -6. `20250819081105_update_all_rls_policies` - Aktualisierung aller RLS-Policies -7. `20250819091919_fix_decks_rls_policy` - Korrektur der Decks-RLS-Policy -8. `20250819092831_fix_decks_foreign_key` - Korrektur des Foreign Keys in Decks -9. `20250819100624_fix_cards_rls_policies` - Korrektur der Cards-RLS-Policies - -## Datenmodell-Beziehungen - -``` -auth.users - ↓ (1:1) -profiles - ↓ (1:n) -decks - ↓ (1:n) -cards -``` - -## Verwendung in der Anwendung - -### Supabase Client-Konfiguration - -Die Anwendung verwendet den Supabase JavaScript Client (`utils/supabase.ts`) mit: - -- **AsyncStorage** für Session-Persistenz -- Umgebungsvariablen für Konfiguration: - - `EXPO_PUBLIC_SUPABASE_URL` - - `EXPO_PUBLIC_SUPABASE_ANON_KEY` - -### Typische Operationen - -1. **Benutzerregistrierung**: Erstellt automatisch einen Eintrag in `profiles` -2. **Deck-Erstellung**: Benutzer können mehrere Decks mit verschiedenen Einstellungen erstellen -3. **Karten-Management**: Karten können verschiedene Typen haben und AI-generiert sein -4. **Öffentliche Decks**: Decks können als öffentlich markiert und von anderen eingesehen werden - -## Best Practices - -1. **Immer RLS verwenden**: Alle Datenzugriffe werden durch RLS-Policies geschützt -2. **JSONB für Flexibilität**: `content`, `settings`, `preferences` und `metadata` nutzen JSONB für flexible Datenstrukturen -3. **UUID als Primary Keys**: Verwendung von UUIDs für bessere Skalierbarkeit und Sicherheit -4. **Timestamps**: Automatisches Tracking von Erstellung und Aktualisierung -5. **Soft Deletes**: Können über das `metadata` JSONB-Feld implementiert werden - -## Optimierungsmöglichkeiten - -1. **Indizes**: Zusätzliche Indizes auf häufig genutzte Spalten (z.B. `user_id`, `is_public`) -2. **Partitionierung**: Bei großen Datenmengen könnte Tabellen-Partitionierung sinnvoll sein -3. **Materialized Views**: Für komplexe Abfragen öffentlicher Decks -4. **Full-Text Search**: Implementierung mit PostgreSQL FTS für Deck- und Kartensuche -5. **Caching**: Redis-Integration für häufig abgerufene öffentliche Inhalte diff --git a/apps/cards/apps/mobile/Docs/expo-sdk-54-upgrade-guide.md b/apps/cards/apps/mobile/Docs/expo-sdk-54-upgrade-guide.md deleted file mode 100644 index faf9289a4..000000000 --- a/apps/cards/apps/mobile/Docs/expo-sdk-54-upgrade-guide.md +++ /dev/null @@ -1,237 +0,0 @@ -# Expo SDK 54 Upgrade Guide für Cards - -## 🎯 Übersicht - -Dieses Dokument beschreibt die notwendigen Schritte für das Upgrade von Cards von Expo SDK 53 auf SDK 54. - -**Aktueller Stand:** -- Expo SDK: 53.0.20 -- React Native: 0.79.5 -- React: 19.0.0 -- Node.js: 20.19.0 (❌ Update erforderlich auf 20.19.4+) - -## 📋 Voraussetzungen - -### System-Anforderungen -- **Node.js:** Minimum 20.19.4 (aktuell: 20.19.0) -- **Xcode:** 16.1 oder höher (empfohlen: 16.0) -- **EAS CLI:** Neueste Version - -### Vor dem Upgrade -```bash -# EAS CLI aktualisieren -npm install -g eas-cli@latest - -# Node.js auf 20.19.4+ updaten (via nvm oder direkt) -nvm install 20.19.4 -nvm use 20.19.4 -``` - -## 🚨 Breaking Changes & Wichtige Änderungen - -### 1. **expo-av wird entfernt** -- ⚠️ **Betroffen:** Ja, Projekt nutzt `expo-av@^15.1.7` -- **Migration:** Zu `expo-video` oder anderen Audio-Libraries wechseln -- **Deadline:** Muss vor SDK 55 migriert werden - -### 2. **React Native 0.81 & React 19.1** -- Upgrade von RN 0.79.5 → 0.81 -- React bleibt bei 19.x (19.0.0 → 19.1) - -### 3. **Android Edge-to-Edge** -- Wird automatisch aktiviert und kann nicht deaktiviert werden -- UI-Anpassungen könnten nötig sein - -### 4. **New Architecture** -- SDK 54 ist die letzte Version mit Legacy Architecture Support -- Migration zur New Architecture wird dringend empfohlen - -## 📦 Betroffene Dependencies - -### Muss aktualisiert werden: -```json -{ - "expo": "^53.0.20" → "^54.0.0", - "expo-av": "^15.1.7" → Migration erforderlich!, - "expo-constants": "~17.1.4" → "~18.0.0", - "expo-dev-client": "~5.2.4" → "~6.0.0", - "expo-dev-launcher": "^5.0.17" → "^6.0.0", - "expo-file-system": "^18.1.11" → "^19.0.0", - "expo-image-picker": "^16.1.4" → "^17.0.0", - "expo-linking": "~7.1.4" → "~8.0.0", - "expo-router": "~5.1.4" → "~6.0.0", - "expo-speech": "^13.1.7" → "^14.0.0", - "expo-status-bar": "~2.2.3" → "~3.0.0", - "expo-symbols": "~0.4.5" → "~1.0.0", - "expo-system-ui": "~5.0.6" → "~6.0.0", - "expo-web-browser": "~14.2.0" → "~15.0.0", - "expo-build-properties": "~0.14.8" → "~0.15.0", - "expo-updates": "~0.28.17" → "~0.29.0", - "react-native": "0.79.5" → "0.81.0", - "react": "19.0.0" → "19.1.0", - "react-dom": "19.0.0" → "19.1.0" -} -``` - -### Kompatibilität prüfen: -- `react-native-gesture-handler` -- `react-native-reanimated` -- `react-native-screens` -- `react-native-safe-area-context` - -## 🔧 Upgrade-Schritte - -### Schritt 1: Backup erstellen -```bash -# Git Status prüfen -git status - -# Alle Änderungen committen -git add . -git commit -m "Pre SDK 54 upgrade backup" - -# Branch für Upgrade erstellen -git checkout -b upgrade/expo-sdk-54 -``` - -### Schritt 2: Dependencies aktualisieren -```bash -# Expo SDK 54 installieren -npx expo install expo@^54.0.0 --fix - -# Dies aktualisiert automatisch alle Expo-Packages -``` - -### Schritt 3: expo-av Migration - -**Option A: Zu expo-video wechseln (für Video)** -```bash -npm uninstall expo-av -npx expo install expo-video -``` - -**Option B: Zu expo-audio wechseln (für Audio)** -```bash -npm uninstall expo-av -npx expo install expo-audio -``` - -**Code-Anpassungen erforderlich in:** -- Components die Audio/Video verwenden -- Imports anpassen - -### Schritt 4: app.json Anpassungen -```json -{ - "expo": { - // iOS Deployment Target anpassen - "plugins": [ - [ - "expo-build-properties", - { - "ios": { - "deploymentTarget": "16.0" // von 15.1 auf 16.0 - }, - "android": { - "targetSdkVersion": 36, // Neu für Android 16 - "compileSdkVersion": 36 - } - } - ] - ], - // New Architecture aktivieren (optional aber empfohlen) - "experiments": { - "typedRoutes": true, - "tsconfigPaths": true, - "newArchEnabled": true // Neu hinzufügen - } - } -} -``` - -### Schritt 5: Native Directories neu generieren -```bash -# Alte native Directories löschen (falls vorhanden) -rm -rf ios android - -# Neu generieren mit SDK 54 -npx expo prebuild --clean -``` - -### Schritt 6: Development Build erstellen -```bash -# Neuen Development Build erstellen -eas build --profile development --platform ios -eas build --profile development --platform android -``` - -### Schritt 7: Tests durchführen -```bash -# Lint ausführen -npm run lint - -# Format prüfen -npm run format - -# App auf verschiedenen Plattformen testen -npm run ios -npm run android -npm run web -``` - -## ✅ Checkliste - -- [ ] Node.js auf 20.19.4+ aktualisiert -- [ ] EAS CLI auf neueste Version aktualisiert -- [ ] Backup/Branch erstellt -- [ ] Dependencies mit `npx expo install expo@^54.0.0 --fix` aktualisiert -- [ ] expo-av Migration durchgeführt -- [ ] app.json angepasst (iOS deployment target, Android SDK) -- [ ] Native Directories neu generiert -- [ ] Development Builds erstellt -- [ ] App auf allen Plattformen getestet -- [ ] UI auf Android Edge-to-Edge geprüft -- [ ] Alle Features funktionieren - -## 🐛 Bekannte Probleme & Lösungen - -### Problem 1: Metro Cache -```bash -# Metro Cache löschen -npx expo start -c -``` - -### Problem 2: Pod Installation Fehler (iOS) -```bash -cd ios -pod deintegrate -pod install --repo-update -``` - -### Problem 3: Android Build Fehler -```bash -cd android -./gradlew clean -cd .. -npx expo run:android -``` - -## 📚 Weitere Ressourcen - -- [Offizielle Expo SDK 54 Changelog](https://expo.dev/changelog/sdk-54) -- [Expo Upgrade Guide](https://docs.expo.dev/workflow/upgrading-expo-sdk-walkthrough/) -- [React Native 0.81 Release Notes](https://reactnative.dev/blog) -- [New Architecture Guide](https://docs.expo.dev/guides/new-architecture/) - -## 🆘 Support - -Bei Problemen während des Upgrades: -1. [Expo Discord](https://chat.expo.dev) -2. [Expo GitHub Issues](https://github.com/expo/expo/issues) -3. [Stack Overflow](https://stackoverflow.com/questions/tagged/expo) - ---- - -**Letzte Aktualisierung:** 24. September 2025 -**Erstellt für:** Cards Projekt -**SDK Version:** 53 → 54 \ No newline at end of file diff --git a/apps/cards/apps/mobile/Docs/expo-sdk-54-upgrade.md b/apps/cards/apps/mobile/Docs/expo-sdk-54-upgrade.md deleted file mode 100644 index 101dfefeb..000000000 --- a/apps/cards/apps/mobile/Docs/expo-sdk-54-upgrade.md +++ /dev/null @@ -1,270 +0,0 @@ -# Upgrade-Anleitung: Expo SDK 53 zu SDK 54 - -## Übersicht - -Diese Anleitung beschreibt den Upgrade-Prozess von Expo SDK 53 auf SDK 54 für das Cards-Projekt. - -## Wichtige Änderungen in SDK 54 - -### Hauptversionen - -- **React Native**: 0.79.5 → 0.81.x -- **React**: 19.0.0 → 19.1.x -- **Reanimated**: v3 → v4 (optional) -- **Android API**: Unterstützung für API 36 -- **iOS**: Unterstützung für iOS 26 -- **Node.js**: Mindestens 20.19.x erforderlich - -### Breaking Changes - -1. **Legacy Architecture** - - SDK 54 ist die letzte Version mit Legacy Architecture Support - - Ab SDK 55 wird nur noch die New Architecture unterstützt - -2. **File System API** - - Die neue expo-file-system API ist jetzt Standard - - Legacy API unter `expo-file-system/legacy` verfügbar - -3. **JSC Support** - - React Native 0.81 hat keine eingebaute JSC-Unterstützung mehr - - Hermes ist jetzt die Standard-JavaScript-Engine - -4. **Deprecations** - - `expo-av` wird in SDK 55 entfernt (Migration zu `expo-audio` und `expo-video` empfohlen) - - React Native's `` ist veraltet - -## Upgrade-Schritte - -### 1. Vorbereitung - -Erstelle ein Backup deines Projekts: - -```bash -git add . -git commit -m "Backup vor SDK 54 Upgrade" -git branch backup-sdk-53 -``` - -### 2. Dependencies aktualisieren - -```bash -# Expo SDK 54 installieren -npm install expo@^54.0.0 - -# Alle Dependencies auf kompatible Versionen upgraden -npx expo install --fix - -# Probleme überprüfen -npx expo-doctor@latest -``` - -### 3. React und React Native aktualisieren - -Da SDK 54 React Native 0.81 und React 19.1 benötigt: - -```bash -npm install react@19.1.0 react-native@0.81.x -``` - -### 4. Spezifische Package-Updates für Cards - -Basierend auf den aktuellen Dependencies: - -```bash -# React Navigation (falls Updates verfügbar) -npx expo install @react-navigation/native - -# Reanimated (optional auf v4, oder bei v3 bleiben) -# Für v4 (nur mit New Architecture): -npx expo install react-native-reanimated@~4.0.0 - -# Oder bei v3 bleiben (mit Legacy Architecture): -npx expo install react-native-reanimated@~3.17.4 - -# Weitere Expo-Packages aktualisieren -npx expo install \ - @expo/vector-icons \ - expo-av \ - expo-constants \ - expo-dev-client \ - expo-file-system \ - expo-image-picker \ - expo-linking \ - expo-router \ - expo-speech \ - expo-status-bar \ - expo-symbols \ - expo-system-ui \ - expo-web-browser \ - expo-build-properties \ - expo-updates - -# React Native Community Packages -npx expo install \ - @react-native-async-storage/async-storage \ - react-native-gesture-handler \ - react-native-safe-area-context \ - react-native-screens \ - react-native-svg -``` - -### 5. File System API Migration (falls verwendet) - -Falls das Projekt `expo-file-system` nutzt: - -**Quick Migration (Legacy API behalten):** - -```typescript -// Alt: -import * as FileSystem from 'expo-file-system'; - -// Neu: -import * as FileSystem from 'expo-file-system/legacy'; -``` - -**Oder zur neuen API migrieren:** - -```typescript -// Neue API verwenden -import * as FileSystem from 'expo-file-system'; -``` - -### 6. Native Projekte aktualisieren - -**Wenn Continuous Native Generation verwendet wird:** - -```bash -# Alte native Verzeichnisse löschen -rm -rf android ios - -# Neu generieren -npx expo prebuild --clean -``` - -**Wenn eigene native Projekte vorhanden sind:** - -```bash -# iOS Pods aktualisieren -cd ios && pod install && cd .. - -# Native Änderungen prüfen -# Siehe: https://docs.expo.dev/bare/upgrade/ -``` - -### 7. EAS Build Configuration - -Update `eas.json` falls nötig: - -```json -{ - "build": { - "development": { - "node": "20.19.1" - }, - "preview": { - "node": "20.19.1" - }, - "production": { - "node": "20.19.1" - } - } -} -``` - -### 8. Testing - -```bash -# Cache löschen und neu starten -npx expo start --clear - -# Auf verschiedenen Plattformen testen -npm run ios -npm run android -npm run web - -# Linting und Formatierung -npm run lint -npm run format - -# Development Build erstellen -npm run build:dev -``` - -## Migrations-Checkliste - -- [ ] Backup erstellt -- [ ] Dependencies aktualisiert -- [ ] `npx expo-doctor` erfolgreich -- [ ] File System Imports geprüft/migriert -- [ ] Native Projekte aktualisiert -- [ ] Node.js Version ≥ 20.19.x -- [ ] Development Build funktioniert -- [ ] iOS Build funktioniert -- [ ] Android Build funktioniert -- [ ] Web Build funktioniert -- [ ] Alle Features getestet - -## Troubleshooting - -### Problem: Metro Bundler Fehler - -```bash -# Metro Cache löschen -npx expo start --clear -rm -rf node_modules/.cache/metro -``` - -### Problem: iOS Build schlägt fehl - -- Xcode 16.1 oder höher erforderlich -- iOS Deployment Target prüfen - -### Problem: Reanimated Fehler - -- Bei Problemen mit v4: Bei v3 bleiben -- Babel Config prüfen (babel-preset-expo handled das automatisch) - -### Problem: TypeScript Fehler - -```bash -# TypeScript neu konfigurieren -npx expo customize tsconfig.json -``` - -## Rollback bei Problemen - -Falls das Upgrade fehlschlägt: - -```bash -git checkout backup-sdk-53 -npm install -``` - -## Weiterführende Ressourcen - -- [Expo SDK 54 Changelog](https://expo.dev/changelog/sdk-54) -- [React Native 0.81 Release Notes](https://github.com/facebook/react-native/releases/tag/v0.81.0) -- [Expo Upgrade Guide](https://docs.expo.dev/workflow/upgrading-expo-sdk-walkthrough/) -- [Native Project Upgrade Helper](https://docs.expo.dev/bare/upgrade/) - -## Nächste Schritte nach dem Upgrade - -1. **New Architecture aktivieren** (empfohlen für SDK 54): - - ```bash - npx expo prebuild --clean - ``` - -2. **expo-av Migration** planen (wird in SDK 55 entfernt): - - Migration zu `expo-audio` für Audio - - Migration zu `expo-video` für Video - -3. **Performance-Optimierungen** mit Reanimated v4 (falls New Architecture) - -## Support - -Bei Problemen: - -- [Expo Discord](https://chat.expo.dev) -- [GitHub Issues](https://github.com/expo/expo/issues) -- [Stack Overflow](https://stackoverflow.com/questions/tagged/expo) diff --git a/apps/cards/apps/mobile/Docs/frontend-components-plan.md b/apps/cards/apps/mobile/Docs/frontend-components-plan.md deleted file mode 100644 index 1c7f3f60c..000000000 --- a/apps/cards/apps/mobile/Docs/frontend-components-plan.md +++ /dev/null @@ -1,501 +0,0 @@ -# Cards Frontend-Komponenten Plan - -## Architektur-Übersicht - -### Tech Stack -- **Framework**: React Native mit Expo -- **Navigation**: Expo Router (File-based routing) -- **Styling**: NativeWind (Tailwind CSS für React Native) -- **State Management**: Zustand -- **Backend**: Supabase (Auth, Database, Storage) -- **TypeScript**: Für Type Safety - -## Navigation Struktur - -``` -app/ -├── (auth)/ # Auth Stack (Nicht eingeloggt) -│ ├── _layout.tsx # Auth Layout -│ ├── login.tsx # Login Screen -│ ├── register.tsx # Registrierung -│ └── forgot-password.tsx # Passwort zurücksetzen -│ -├── (tabs)/ # Hauptnavigation (Tab Bar) -│ ├── _layout.tsx # Tab Layout -│ ├── home.tsx # Home/Dashboard -│ ├── decks.tsx # Meine Decks -│ ├── explore.tsx # Öffentliche Decks entdecken -│ ├── learn.tsx # Aktives Lernen -│ └── profile.tsx # Profil & Einstellungen -│ -├── deck/ -│ ├── [id].tsx # Deck Detail View -│ ├── [id]/ -│ │ ├── edit.tsx # Deck bearbeiten -│ │ ├── cards.tsx # Karten verwalten -│ │ └── study.tsx # Lernmodus starten -│ └── create.tsx # Neues Deck erstellen -│ -├── card/ -│ ├── [id].tsx # Karte Detail View -│ ├── create.tsx # Neue Karte erstellen -│ └── edit/[id].tsx # Karte bearbeiten -│ -├── study/ -│ ├── session/[deckId].tsx # Aktive Lernsession -│ ├── results.tsx # Lernergebnisse -│ └── settings.tsx # Lerneinstellungen -│ -└── _layout.tsx # Root Layout -``` - -## Core Komponenten - -### 1. Authentifizierung - -#### AuthForm -```typescript -components/auth/AuthForm.tsx -- E-Mail/Passwort Eingabe -- Social Login Buttons -- Validierung -- Loading States -``` - -#### AuthGuard -```typescript -components/auth/AuthGuard.tsx -- Schützt Routen -- Redirect zu Login -- Session Check -``` - -### 2. Layout Komponenten - -#### AppHeader -```typescript -components/layout/AppHeader.tsx -- Titel -- Navigation Back Button -- Action Buttons -- Search Bar (optional) -``` - -#### TabBar -```typescript -components/layout/TabBar.tsx -- Custom Tab Bar -- Icons mit Badges -- Aktive Tab Animation -``` - -#### FloatingActionButton -```typescript -components/layout/FloatingActionButton.tsx -- Schnellzugriff (Deck/Karte erstellen) -- Animierte Menü-Expansion -``` - -### 3. Deck Komponenten - -#### DeckCard -```typescript -components/deck/DeckCard.tsx -Props: -- deck: Deck -- onPress: () => void -- showProgress?: boolean -- isCompact?: boolean - -Features: -- Cover Image -- Titel & Beschreibung -- Tags -- Karten-Anzahl -- Lernfortschritt (optional) -- Public/Private Badge -``` - -#### DeckGrid -```typescript -components/deck/DeckGrid.tsx -- Responsive Grid Layout -- Lazy Loading -- Pull-to-Refresh -- Empty State -``` - -#### DeckForm -```typescript -components/deck/DeckForm.tsx -- Titel, Beschreibung -- Cover Image Upload -- Tag-Auswahl -- Öffentlich/Privat Toggle -- Erweiterte Einstellungen -``` - -#### DeckFilters -```typescript -components/deck/DeckFilters.tsx -- Sortierung (Datum, Name, Fortschritt) -- Filter (Tags, Öffentlich, Favoriten) -- Suchleiste -``` - -### 4. Karten Komponenten - -#### CardView -```typescript -components/card/CardView.tsx -Props: -- card: Card -- mode: 'view' | 'study' | 'edit' -- onFlip?: () => void -- showAnswer?: boolean - -Unterstützt verschiedene Kartentypen: -- Text -- Flashcard (Vorder-/Rückseite) -- Quiz (Multiple Choice) -- Mixed (Rich Content) -``` - -#### CardEditor -```typescript -components/card/CardEditor.tsx -- Rich Text Editor -- Markdown Support -- Bild/Media Upload -- AI-Generierung -- Kartentyp-Auswahl -``` - -#### CardList -```typescript -components/card/CardList.tsx -- Sortierbare Liste -- Drag & Drop -- Batch-Aktionen -- Suche/Filter -``` - -#### CardSwiper -```typescript -components/card/CardSwiper.tsx -- Swipe-Gesten (Links/Rechts) -- Karten-Stack Animation -- Progress Indicator -``` - -### 5. Lern-Komponenten - -#### StudySession -```typescript -components/study/StudySession.tsx -- Kartenansicht -- Antwort-Eingabe -- Bewertung (Einfach/Schwer) -- Timer -- Fortschrittsanzeige -``` - -#### ProgressTracker -```typescript -components/study/ProgressTracker.tsx -- Lernstatistiken -- Streak-Anzeige -- Charts/Graphs -- Achievements -``` - -#### StudyModeSelector -```typescript -components/study/StudyModeSelector.tsx -Modi: -- Durchblättern -- Quiz -- Schreiben -- Spaced Repetition -``` - -### 6. Profil Komponenten - -#### ProfileHeader -```typescript -components/profile/ProfileHeader.tsx -- Avatar -- Username/Display Name -- Bio -- Statistiken -- Edit Button -``` - -#### ProfileStats -```typescript -components/profile/ProfileStats.tsx -- Anzahl Decks -- Gelernte Karten -- Lernstreak -- Achievements -``` - -#### SettingsMenu -```typescript -components/profile/SettingsMenu.tsx -- Account-Einstellungen -- Benachrichtigungen -- Datenschutz -- App-Präferenzen -- Logout -``` - -### 7. Gemeinsame UI Komponenten - -#### Button -```typescript -components/ui/Button.tsx -Varianten: -- primary, secondary, outline, ghost -- Größen: sm, md, lg -- Loading State -- Icons -``` - -#### Card -```typescript -components/ui/Card.tsx -- Container mit Shadow -- Padding Varianten -- Press Animation -``` - -#### Input -```typescript -components/ui/Input.tsx -- Text, Email, Password -- Label & Error -- Icons -- Clear Button -``` - -#### Modal -```typescript -components/ui/Modal.tsx -- Fullscreen oder Bottom Sheet -- Backdrop -- Swipe to Dismiss -``` - -#### Toast -```typescript -components/ui/Toast.tsx -- Success, Error, Info, Warning -- Auto-Dismiss -- Actions -``` - -#### EmptyState -```typescript -components/ui/EmptyState.tsx -- Illustration -- Titel & Beschreibung -- Action Button -``` - -#### LoadingSpinner -```typescript -components/ui/LoadingSpinner.tsx -- Verschiedene Größen -- Mit/ohne Text -- Overlay Option -``` - -#### SearchBar -```typescript -components/ui/SearchBar.tsx -- Debounced Input -- Clear Button -- Voice Input (optional) -``` - -## State Management (Zustand Stores) - -### authStore -```typescript -store/authStore.ts -- user: User | null -- session: Session | null -- isLoading: boolean -- login(), logout(), register() -- updateProfile() -``` - -### deckStore -```typescript -store/deckStore.ts -- decks: Deck[] -- currentDeck: Deck | null -- isLoading: boolean -- fetchDecks(), createDeck(), updateDeck() -- deleteDeck(), toggleFavorite() -``` - -### cardStore -```typescript -store/cardStore.ts -- cards: Card[] -- currentCard: Card | null -- fetchCards(), createCard(), updateCard() -- deleteCard(), reorderCards() -``` - -### studyStore -```typescript -store/studyStore.ts -- activeSession: StudySession | null -- progress: Progress -- startSession(), endSession() -- submitAnswer(), nextCard() -- updateStatistics() -``` - -### uiStore -```typescript -store/uiStore.ts -- theme: 'light' | 'dark' | 'system' -- language: string -- notifications: boolean -- setTheme(), setLanguage() -``` - -## Utility Hooks - -### useSupabase -```typescript -hooks/useSupabase.ts -- Wrapped Supabase Client -- Auto-Refresh Token -- Error Handling -``` - -### useAuth -```typescript -hooks/useAuth.ts -- Auth State -- Login/Logout Methods -- Session Management -``` - -### useOffline -```typescript -hooks/useOffline.ts -- Offline Detection -- Queue Actions -- Sync when Online -``` - -### useDebounce -```typescript -hooks/useDebounce.ts -- Debounced Values -- Für Suche/Filter -``` - -### useInfiniteScroll -```typescript -hooks/useInfiniteScroll.ts -- Pagination -- Load More -- Refresh -``` - -## Styling System - -### Theme Configuration -```typescript -theme/ -├── colors.ts # Farbpalette -├── spacing.ts # Spacing Scale -├── typography.ts # Font Sizes & Weights -└── shadows.ts # Shadow Presets -``` - -### NativeWind Classes -```css -/* Basis-Komponenten nutzen */ -- Container: "flex-1 bg-white dark:bg-gray-900" -- Card: "bg-white dark:bg-gray-800 rounded-xl shadow-md p-4" -- Button: "bg-blue-500 px-4 py-2 rounded-lg" -- Text: "text-gray-900 dark:text-gray-100" -``` - -## Performance Optimierungen - -1. **Lazy Loading** - - React.lazy() für Screens - - Virtualisierte Listen (FlashList) - - Image Lazy Loading - -2. **Caching** - - React Query für API Calls - - AsyncStorage für Offline-Daten - - Image Cache - -3. **Optimierte Renders** - - React.memo für schwere Komponenten - - useMemo/useCallback - - Zustand Selectors - -4. **Bundle Size** - - Code Splitting - - Tree Shaking - - Asset Optimization - -## Accessibility - -- **Screen Reader Support** -- **Keyboard Navigation** (Web) -- **Touch Target Sizes** (min. 44x44) -- **Color Contrast** (WCAG AA) -- **Focus Indicators** -- **Semantic Labels** - -## Testing Strategie - -1. **Unit Tests**: Jest + React Testing Library -2. **Integration Tests**: Detox -3. **E2E Tests**: Maestro -4. **Visual Regression**: Percy - -## Nächste Schritte - -1. **Phase 1: Core Setup** - - Auth Flow implementieren - - Navigation Setup - - Basis UI Komponenten - -2. **Phase 2: Deck Management** - - Deck CRUD Operationen - - Deck Liste & Detail Views - - Deck Sharing - -3. **Phase 3: Karten System** - - Karten Editor - - Verschiedene Kartentypen - - Drag & Drop Sortierung - -4. **Phase 4: Lern-Features** - - Study Session - - Fortschritts-Tracking - - Spaced Repetition - -5. **Phase 5: Social Features** - - Öffentliche Decks - - Bewertungen - - Kommentare - -6. **Phase 6: Premium Features** - - AI-Generierung - - Erweiterte Statistiken - - Offline Sync \ No newline at end of file diff --git a/apps/cards/apps/mobile/Docs/next-steps-implementation-plan.md b/apps/cards/apps/mobile/Docs/next-steps-implementation-plan.md deleted file mode 100644 index 73bcf0835..000000000 --- a/apps/cards/apps/mobile/Docs/next-steps-implementation-plan.md +++ /dev/null @@ -1,244 +0,0 @@ -# Cards - Nächste Implementierungsschritte - -## 🎯 Aktueller Status - -✅ **Phase 1 abgeschlossen:** - -- Authentifizierung funktioniert (Login, Register, Logout) -- Basis UI-Komponenten erstellt -- Navigation mit Tab Bar implementiert -- Deck Store vorbereitet -- Profil-Erstellung bei Registrierung automatisiert - -## 📋 Phase 2: Deck Management (Priorität: HOCH) - -### 2.1 Deck Liste mit echten Daten - -- [ ] Decks aus Datenbank in "Meine Decks" Tab anzeigen -- [ ] Deck-Karten mit tatsächlichen Daten -- [ ] Filter für Favoriten funktionsfähig machen -- [ ] Pull-to-Refresh implementieren -- [ ] Empty State nur wenn wirklich keine Decks vorhanden - -### 2.2 Deck Detail View - -- [ ] `/deck/[id].tsx` Screen erstellen -- [ ] Deck Informationen anzeigen (Titel, Beschreibung, Tags) -- [ ] Karten-Liste des Decks anzeigen -- [ ] Actions: Bearbeiten, Löschen, Favorit toggle -- [ ] Header mit Cover Image oder Gradient - -### 2.3 Deck Bearbeitung - -- [ ] `/deck/[id]/edit.tsx` Screen -- [ ] Deck-Informationen updaten -- [ ] Cover Image Upload (Supabase Storage) -- [ ] Tags Management -- [ ] Öffentlich/Privat Toggle - -### 2.4 Deck Sharing & Discovery - -- [ ] Öffentliche Decks in Explore Tab anzeigen -- [ ] Suche nach öffentlichen Decks -- [ ] Deck kopieren/forken Funktionalität -- [ ] Deck Statistiken (Views, Kopien) - -## 📝 Phase 3: Karten-System (Priorität: HOCH) - -### 3.1 Card CRUD Operationen - -- [ ] Card Store erstellen (`cardStore.ts`) -- [ ] Karten zu Deck hinzufügen -- [ ] Karten bearbeiten/löschen -- [ ] Karten-Positionen speichern - -### 3.2 Card Editor - -- [ ] `/card/create.tsx` mit Deck-Kontext -- [ ] `/card/edit/[id].tsx` für Bearbeitung -- [ ] Rich Text Editor für Karten-Content -- [ ] Kartentyp-Auswahl: - - **Text**: Einfache Textkarte - - **Flashcard**: Vorder-/Rückseite - - **Quiz**: Multiple Choice - - **Mixed**: Kombiniert verschiedene Elemente - -### 3.3 Card Management UI - -- [ ] Karten-Liste in Deck Detail View -- [ ] Sortierung per Drag & Drop -- [ ] Bulk-Aktionen (Mehrere löschen/verschieben) -- [ ] Karten-Vorschau Modal -- [ ] Favoriten markieren - -### 3.4 AI Integration (Optional) - -- [ ] AI-Generierung für Karten -- [ ] Prompt-Templates für verschiedene Lernthemen -- [ ] Batch-Generierung mehrerer Karten - -## 🎓 Phase 4: Lern-Features (Priorität: MITTEL) - -### 4.1 Study Session - -- [ ] `/study/session/[deckId].tsx` implementieren -- [ ] Karten-Navigation (Vor/Zurück) -- [ ] Flip-Animation für Flashcards -- [ ] Quiz-Antwort Validierung -- [ ] Session-Timer - -### 4.2 Lernmodi - -- [ ] **Browse Mode**: Einfaches Durchblättern -- [ ] **Practice Mode**: Mit Selbstbewertung -- [ ] **Quiz Mode**: Mit Punktzahl -- [ ] **Spaced Repetition**: Algorithmus implementieren - -### 4.3 Fortschritts-Tracking - -- [ ] Study Store für Lernfortschritt -- [ ] Karten als "gelernt" markieren -- [ ] Schwierigkeitsgrad pro Karte -- [ ] Wiederholungsintervalle berechnen -- [ ] Statistiken speichern (richtig/falsch) - -### 4.4 Statistiken & Visualisierung - -- [ ] Lernstatistik Dashboard -- [ ] Streak-Counter -- [ ] Fortschritts-Charts -- [ ] Zeitstatistiken -- [ ] Achievements/Badges - -## 🔧 Phase 5: Optimierungen (Priorität: NIEDRIG) - -### 5.1 Performance - -- [ ] Lazy Loading für große Deck-Listen -- [ ] Image Optimization & Caching -- [ ] Offline-Support mit AsyncStorage -- [ ] Optimistische Updates - -### 5.2 UX Verbesserungen - -- [ ] Swipe-Gesten für Karten -- [ ] Haptic Feedback -- [ ] Sound-Effekte (optional) -- [ ] Dark Mode Support -- [ ] Animations & Transitions - -### 5.3 Social Features - -- [ ] Benutzerprofile erweitern -- [ ] Deck-Bewertungen -- [ ] Kommentare zu öffentlichen Decks -- [ ] Follower-System -- [ ] Deck-Empfehlungen - -## 🚀 Phase 6: Premium Features (Zukunft) - -### 6.1 Erweiterte AI Features - -- [ ] GPT-4 Integration für bessere Karten -- [ ] Automatische Zusammenfassungen -- [ ] Lernpfad-Generierung -- [ ] Personalisierte Empfehlungen - -### 6.2 Kollaboration - -- [ ] Gemeinsame Decks -- [ ] Real-time Bearbeitung -- [ ] Gruppen-Lernsessions -- [ ] Lehrer-Schüler Modus - -### 6.3 Export & Integration - -- [ ] Anki Export/Import -- [ ] PDF Export -- [ ] CSV Import für Bulk-Karten -- [ ] API für Drittanbieter - -## 🛠 Technische Schulden - -### Refactoring Needs - -- [ ] Error Boundaries hinzufügen -- [ ] Loading States vereinheitlichen -- [ ] Form Validation Library (react-hook-form) -- [ ] Tests schreiben (Jest + React Testing Library) - -### Infrastructure - -- [ ] CI/CD Pipeline setup -- [ ] Error Tracking (Sentry) -- [ ] Analytics Integration -- [ ] Performance Monitoring - -## 📊 Priorisierung - -### Sofort (Diese Woche) - -1. Deck Liste mit echten Daten -2. Deck Detail View -3. Basis Card CRUD - -### Kurzfristig (2-3 Wochen) - -1. Card Editor mit allen Typen -2. Basis Study Mode -3. Einfaches Fortschritts-Tracking - -### Mittelfristig (1-2 Monate) - -1. Spaced Repetition -2. Statistiken Dashboard -3. Öffentliche Decks & Suche - -### Langfristig (3+ Monate) - -1. AI Features -2. Social Features -3. Premium Funktionen - -## 🎯 MVP Definition - -**Minimum Viable Product beinhaltet:** - -- ✅ User Auth (FERTIG) -- ⏳ Deck CRUD (IN ARBEIT) -- ⏳ Card CRUD -- ⏳ Basis Study Mode -- ⏳ Einfacher Fortschritt - -**Nice-to-have für MVP:** - -- Öffentliche Decks -- Basis-Statistiken -- Dark Mode - -## 📝 Nächste konkrete Schritte - -1. **Deck Liste verbessern** (`app/(tabs)/decks.tsx`) - - useEffect mit fetchDecks() beim Mount - - Echte Deck-Daten anzeigen - - Loading & Error States - -2. **Deck Detail Screen** (`app/deck/[id].tsx`) - - Route Parameter handling - - Deck Daten laden - - Card Liste anzeigen - -3. **Card Store** (`store/cardStore.ts`) - - CRUD Operationen - - Sortierung - - Relationship zu Decks - -4. **Card Components** (`components/card/`) - - CardEditor - - CardView - - CardList - -5. **Study Mode Basis** (`app/study/session/[deckId].tsx`) - - Karten durchblättern - - Flip Animation - - Progress tracking diff --git a/apps/cards/apps/mobile/Docs/phase-3-card-system-plan.md b/apps/cards/apps/mobile/Docs/phase-3-card-system-plan.md deleted file mode 100644 index 382adf3d9..000000000 --- a/apps/cards/apps/mobile/Docs/phase-3-card-system-plan.md +++ /dev/null @@ -1,378 +0,0 @@ -# Phase 3: Karten-System - Detaillierter Implementierungsplan - -## 🎯 Ziel von Phase 3 -Ein vollständiges Karten-Management-System mit verschiedenen Kartentypen, Editor-Funktionalität und intuitive Benutzeroberfläche. - -## 📋 Phase 3.1: Card Store & Datenmodell (Priorität: HOCH) - -### Card Store erstellen (`store/cardStore.ts`) -```typescript -interface Card { - id: string; - deck_id: string; - position: number; - title?: string; - content: CardContent; // JSON für verschiedene Kartentypen - card_type: 'text' | 'flashcard' | 'quiz' | 'mixed'; - ai_model?: string; - ai_prompt?: string; - version: number; - is_favorite: boolean; - created_at: string; - updated_at: string; -} -``` - -### CRUD Operationen -- [x] `fetchCards(deckId)` - Alle Karten eines Decks laden -- [x] `fetchCard(id)` - Einzelne Karte laden -- [x] `createCard(deckId, cardData)` - Neue Karte erstellen -- [x] `updateCard(id, updates)` - Karte bearbeiten -- [x] `deleteCard(id)` - Karte löschen -- [x] `reorderCards(deckId, cardIds[])` - Reihenfolge ändern -- [x] `duplicateCard(id)` - Karte duplizieren -- [x] `toggleFavorite(id)` - Favorit markieren - -### Content-Strukturen für verschiedene Kartentypen -```typescript -// Text Card -interface TextContent { - text: string; - formatting?: FormattingOptions; -} - -// Flashcard -interface FlashcardContent { - front: string; - back: string; - hint?: string; -} - -// Quiz Card -interface QuizContent { - question: string; - options: string[]; - correct_answer: number; - explanation?: string; -} - -// Mixed Card -interface MixedContent { - blocks: ContentBlock[]; -} - -type ContentBlock = - | { type: 'text'; data: { text: string } } - | { type: 'image'; data: { url: string; caption?: string } } - | { type: 'quiz'; data: QuizContent } - | { type: 'flashcard'; data: FlashcardContent }; -``` - -## 📝 Phase 3.2: Card Create Screen (Priorität: HOCH) - -### Screen: `/card/create.tsx` -- **Query Parameter**: `deckId` (aus Deck Detail View) -- **Kartentyp-Auswahl**: Radio/Segmented Control -- **Dynamischer Editor**: Je nach Kartentyp -- **Vorschau-Modus**: Live-Preview der Karte -- **Speichern & Fortfahren**: Direkt nächste Karte erstellen - -### UI-Flow -1. **Kartentyp wählen** (Text, Flashcard, Quiz, Mixed) -2. **Content eingeben** (je nach Typ unterschiedliche Felder) -3. **Vorschau anzeigen** (wie Karte später aussieht) -4. **Speichern** oder **Speichern & Neue erstellen** - -### Kartentyp-spezifische Eingaben - -#### Text Card -- **Titel** (optional) -- **Rich Text Editor** für Hauptinhalt -- **Formatting**: Bold, Italic, Listen, Links - -#### Flashcard -- **Vorderseite** (Frage/Begriff) -- **Rückseite** (Antwort/Definition) -- **Hinweis** (optional) -- **Beide Seiten**: Rich Text Support - -#### Quiz Card -- **Frage** -- **2-6 Antwortoptionen** (dynamisch hinzufügbar) -- **Richtige Antwort markieren** -- **Erklärung** (optional, nach Antwort gezeigt) - -#### Mixed Card (Erweitert) -- **Block-basierter Editor** -- **Drag & Drop** für Reihenfolge -- **Verschiedene Block-Typen**: Text, Bild, Quiz, Flashcard - -## 🔧 Phase 3.3: Card Edit Screen (Priorität: HOCH) - -### Screen: `/card/edit/[id].tsx` -- **Bestehende Daten laden** und vorausfüllen -- **Kartentyp ändern** (mit Warnung vor Datenverlust) -- **Versionierung**: Änderungen tracken -- **Autosave**: Entwürfe automatisch speichern - -### Features -- **Änderungshistorie** anzeigen -- **Rückgängig/Wiederholen** Funktionalität -- **Kollaboration** (für später): Wer hat was geändert - -## 📱 Phase 3.4: Card Liste in Deck Detail View (Priorität: HOCH) - -### Integration in `/deck/[id].tsx` -```typescript -// Ersetze "Karten-Anzeige kommt in Phase 3" mit: - - router.push(`/deck/${id}/cards`)}> - Alle {currentDeck.card_count} Karten anzeigen - -``` - -### CardList Komponente (`components/card/CardList.tsx`) -- **Virtualisierte Liste** für Performance -- **Kompakte Ansicht** vs **Detailansicht** -- **Sortierung**: Position, Erstellung, Alphabet, Typ -- **Filter**: Nach Kartentyp, Favoriten, Lernstatus -- **Swipe-Aktionen**: Bearbeiten, Löschen, Favorit - -### Card Item Komponente -```typescript - router.push(`/card/${card.id}`)} - onEdit={() => router.push(`/card/edit/${card.id}`)} - onDelete={() => handleDelete(card.id)} - onToggleFavorite={() => toggleFavorite(card.id)} -/> -``` - -## 🎨 Phase 3.5: Card View Komponente (Priorität: MITTEL) - -### Komponente: `components/card/CardView.tsx` -- **Multi-Mode Support**: - - `view`: Nur anzeigen - - `study`: Für Lernsessions - - `edit`: Inline-Bearbeitung - - `preview`: Während Erstellung - -### Kartentyp-spezifische Renderer -```typescript -const CardRenderer = ({ card, mode }) => { - switch(card.card_type) { - case 'text': - return ; - case 'flashcard': - return ; - case 'quiz': - return ; - case 'mixed': - return ; - } -}; -``` - -### Interaktivität -- **Flashcard**: Flip-Animation -- **Quiz**: Antworten auswählen + Feedback -- **Text**: Scrolling für lange Inhalte -- **Mixed**: Verschiedene Interaktionen je Block - -## 🛠 Phase 3.6: Card Management Screen (Priorität: NIEDRIG) - -### Screen: `/deck/[id]/cards.tsx` -- **Vollständige Kartenliste** des Decks -- **Bulk-Aktionen**: Mehrere Karten auswählen -- **Drag & Drop Sortierung** -- **Export/Import** Funktionen -- **Erweiterte Filter** und Suche - -### Bulk-Aktionen -- **Mehrfach-Auswahl**: Checkboxes -- **Löschen**: Mehrere Karten auf einmal -- **Verschieben**: In anderes Deck -- **Duplizieren**: Kopien erstellen -- **Favoriten**: Mehrere markieren -- **Export**: Als CSV/JSON - -### Sortierung & Filter -- **Drag & Drop**: Position manuell ändern -- **Auto-Sort**: Nach Alphabet, Datum, Typ -- **Filter**: - - Kartentyp (Text, Flashcard, Quiz, Mixed) - - Status (Favoriten, Kürzlich bearbeitet) - - Lernfortschritt (Gelernt, Schwierig, Neu) - -## 🎨 UI/UX Komponenten-Plan - -### 1. Rich Text Editor (`components/ui/RichTextEditor.tsx`) -```typescript - -``` - -### 2. Card Type Selector (`components/card/CardTypeSelector.tsx`) -```typescript - -``` - -### 3. Quiz Option Builder (`components/card/QuizOptionBuilder.tsx`) -```typescript - -``` - -### 4. Card Preview (`components/card/CardPreview.tsx`) -```typescript - -``` - -## 📊 Datenbank-Optimierungen - -### Indizes für Performance -```sql --- Index für schnelle Deck-Card Abfragen -CREATE INDEX cards_deck_id_position_idx ON cards(deck_id, position); - --- Index für Kartentyp-Filter -CREATE INDEX cards_deck_type_idx ON cards(deck_id, card_type); - --- Index für Favoriten -CREATE INDEX cards_favorite_idx ON cards(deck_id) WHERE is_favorite = true; -``` - -### Trigger für Auto-Position -```sql --- Automatische Position-Zuweisung bei INSERT -CREATE OR REPLACE FUNCTION set_card_position() -RETURNS TRIGGER AS $$ -BEGIN - IF NEW.position IS NULL THEN - NEW.position := COALESCE( - (SELECT MAX(position) + 1 FROM cards WHERE deck_id = NEW.deck_id), - 1 - ); - END IF; - RETURN NEW; -END; -$$ LANGUAGE plpgsql; - -CREATE TRIGGER set_card_position_trigger - BEFORE INSERT ON cards - FOR EACH ROW - EXECUTE FUNCTION set_card_position(); -``` - -## 🧪 Testing-Strategie - -### Unit Tests -- [ ] Card Store CRUD Operationen -- [ ] Card Content Validierung -- [ ] Kartentyp-spezifische Renderer - -### Integration Tests -- [ ] Card Create Flow (alle Typen) -- [ ] Card Edit Flow -- [ ] Bulk-Aktionen -- [ ] Sortierung & Filter - -### E2E Tests -- [ ] Vollständiger Card-Lifecycle -- [ ] Deck → Card → Study Flow -- [ ] Performance mit vielen Karten - -## ⚡ Performance-Überlegungen - -### Optimierungen -1. **Virtualized Lists**: Für große Kartenmengen -2. **Lazy Loading**: Karten-Content nur bei Bedarf -3. **Image Optimization**: Automatische Komprimierung -4. **Debounced Search**: Verzögerte Suche bei Eingabe -5. **Caching**: Häufig genutzte Karten im Memory - -### Bundle Size -- **Code Splitting**: Rich Text Editor nur bei Bedarf laden -- **Tree Shaking**: Ungenutzte Kartentyp-Komponenten entfernen - -## 🚀 Nächste konkrete Schritte - -### Sofort starten (Diese Woche) -1. **Card Store** erstellen (`store/cardStore.ts`) -2. **Basic Card Create Screen** (`/card/create.tsx`) -3. **Einfache Card View** für Text-Karten -4. **Card Liste** in Deck Detail einbauen - -### Kurzfristig (1-2 Wochen) -1. **Flashcard Support** hinzufügen -2. **Quiz Card** implementieren -3. **Card Edit Screen** erstellen -4. **Basis Card Management** - -### Mittelfristig (2-3 Wochen) -1. **Rich Text Editor** integrieren -2. **Mixed Cards** (Block-Editor) -3. **Drag & Drop Sortierung** -4. **Bulk-Aktionen** - -## 💡 Nice-to-Have Features (Zukunft) - -### AI Integration -- **Auto-Generierung**: Flashcards aus Text -- **Quiz-Generierung**: Fragen automatisch erstellen -- **Content-Verbesserung**: Grammatik & Stil-Tipps - -### Kollaboration -- **Gemeinsame Bearbeitung**: Real-time Editing -- **Kommentare**: An Karten anhängen -- **Änderungshistorie**: Wer hat was geändert - -### Import/Export -- **Anki Import**: .apkg Dateien -- **CSV Import**: Bulk-Import von Spreadsheets -- **Markdown Export**: Für Dokumentation -- **PDF Export**: Zum Ausdrucken - -## 🎯 Erfolgskriterien für Phase 3 - -✅ **MVP erreicht wenn:** -- Alle 4 Kartentypen erstell- und bearbeitbar -- Karten in Deck Detail View sichtbar -- Basis-Sortierung funktioniert -- Performance mit 100+ Karten - -🎖 **Excellent erreicht wenn:** -- Rich Text Editor funktioniert -- Drag & Drop Sortierung -- Bulk-Aktionen verfügbar -- Responsive Design perfekt - ---- - -**Empfehlung**: Starten wir mit Phase 3.1 (Card Store) und 3.2 (Card Create) parallel, da diese die Grundlage für alles andere bilden! \ No newline at end of file diff --git a/apps/cards/apps/mobile/Docs/samples/create-system-user.sql b/apps/cards/apps/mobile/Docs/samples/create-system-user.sql deleted file mode 100644 index 82cc7ec44..000000000 --- a/apps/cards/apps/mobile/Docs/samples/create-system-user.sql +++ /dev/null @@ -1,65 +0,0 @@ --- Create System User for Sample Decks --- This script creates a system user that can be used for sample/public decks - --- Insert system user into auth.users table -INSERT INTO auth.users ( - id, - aud, - role, - email, - encrypted_password, - email_confirmed_at, - raw_app_meta_data, - raw_user_meta_data, - created_at, - updated_at, - confirmation_token, - email_change, - email_change_token_new, - recovery_token -) VALUES ( - '00000000-0000-0000-0000-000000000001', - 'authenticated', - 'authenticated', - 'system@cards.app', - '$2a$10$dummyhashforpassword', -- Dummy encrypted password - now(), - '{"provider": "system", "providers": ["system"]}', - '{"display_name": "Cards System", "is_system_user": true}', - now(), - now(), - '', - '', - '', - '' -) ON CONFLICT (id) DO NOTHING; -- Don't fail if user already exists - --- Create corresponding profile for the system user -INSERT INTO public.profiles ( - id, - username, - display_name, - bio, - preferences, - created_at, - updated_at -) VALUES ( - '00000000-0000-0000-0000-000000000001', - 'cards_system', - 'Cards System', - 'System account for managing public sample decks and community content.', - '{"is_system_account": true, "can_create_public_decks": true}', - now(), - now() -) ON CONFLICT (id) DO NOTHING; - --- Verify the system user was created -SELECT - u.id, - u.email, - u.email_confirmed_at IS NOT NULL as email_confirmed, - p.username, - p.display_name -FROM auth.users u -LEFT JOIN public.profiles p ON u.id = p.id -WHERE u.id = '00000000-0000-0000-0000-000000000001'; \ No newline at end of file diff --git a/apps/cards/apps/mobile/Docs/samples/sample-deck-english-basics.sql b/apps/cards/apps/mobile/Docs/samples/sample-deck-english-basics.sql deleted file mode 100644 index b3aea54f8..000000000 --- a/apps/cards/apps/mobile/Docs/samples/sample-deck-english-basics.sql +++ /dev/null @@ -1,168 +0,0 @@ --- Sample Deck: English for Beginners (Englisch für Anfänger) --- This script creates a sample public deck for German speakers learning English --- Uses a system placeholder UUID that can be updated later - --- Insert the deck with a placeholder system user ID -INSERT INTO public.decks ( - id, - user_id, - title, - description, - is_public, - tags, - metadata, - created_at, - updated_at -) VALUES ( - 'b1c2d3e4-f5a6-7890-bcde-f01234567890', - '00000000-0000-0000-0000-000000000001', -- Placeholder system user - 'English for Beginners', - 'Essential English vocabulary for German speakers. Perfect for A1-A2 level with everyday words and phrases.', - true, - ARRAY['Languages', 'English', 'Beginner', 'A1', 'A2', 'Vocabulary'], - '{ - "category": "Sprachen", - "difficulty": "Anfänger", - "target_audience": "Deutschsprachige Englischlernende A1-A2", - "estimated_time": "3-4 Wochen", - "created_by": "System", - "version": "1.0", - "is_sample_deck": true, - "language_pair": "EN-DE" - }'::jsonb, - now(), - now() -); - --- Insert sample cards -INSERT INTO public.cards (deck_id, position, title, card_type, content, created_at, updated_at) VALUES --- Card 1: Days of the Week -('b1c2d3e4-f5a6-7890-bcde-f01234567890', 1, 'Days of the Week', 'mixed', -'{"blocks": [ - {"type": "text", "data": {"text": "Learn the days of the week in English"}}, - {"type": "flashcard", "data": {"front": "Monday", "back": "Montag", "pronunciation": "MAN-day"}}, - {"type": "flashcard", "data": {"front": "Tuesday", "back": "Dienstag", "pronunciation": "TYOOS-day"}}, - {"type": "flashcard", "data": {"front": "Wednesday", "back": "Mittwoch", "pronunciation": "WENZ-day"}}, - {"type": "flashcard", "data": {"front": "Thursday", "back": "Donnerstag", "pronunciation": "THURZ-day"}}, - {"type": "flashcard", "data": {"front": "Friday", "back": "Freitag", "pronunciation": "FRY-day"}}, - {"type": "flashcard", "data": {"front": "Saturday", "back": "Samstag", "pronunciation": "SAT-ur-day"}}, - {"type": "flashcard", "data": {"front": "Sunday", "back": "Sonntag", "pronunciation": "SUN-day"}} -]}'::jsonb, -now(), now()), - --- Card 2: Common Verbs - To be -('b1c2d3e4-f5a6-7890-bcde-f01234567890', 2, 'Verb: to be', 'flashcard', -'{"front": "I am / You are / He is", "back": "Ich bin / Du bist / Er ist", "hint": "The most important verb in English", "example": "I am happy. You are my friend. He is tall.", "grammar_note": "Conjugation: am, are, is"}'::jsonb, -now(), now()), - --- Card 3: Common Verbs - To have -('b1c2d3e4-f5a6-7890-bcde-f01234567890', 3, 'Verb: to have', 'flashcard', -'{"front": "to have", "back": "haben", "hint": "Possession verb", "example": "I have a car. She has two cats.", "pronunciation": "hav", "grammar_note": "I/you/we/they have, he/she/it has"}'::jsonb, -now(), now()), - --- Card 4: House vocabulary -('b1c2d3e4-f5a6-7890-bcde-f01234567890', 4, 'House: Kitchen', 'flashcard', -'{"front": "kitchen", "back": "die Küche", "hint": "Where you cook food", "example": "The kitchen is very modern.", "pronunciation": "KIT-chen"}'::jsonb, -now(), now()), - --- Card 5: House: Bedroom -('b1c2d3e4-f5a6-7890-bcde-f01234567890', 5, 'House: Bedroom', 'flashcard', -'{"front": "bedroom", "back": "das Schlafzimmer", "hint": "Where you sleep", "example": "My bedroom is upstairs.", "pronunciation": "BED-room"}'::jsonb, -now(), now()), - --- Card 6: Quiz - Articles -('b1c2d3e4-f5a6-7890-bcde-f01234567890', 6, 'Articles Quiz', 'quiz', -'{"question": "Which article is used before singular nouns starting with consonants?", "options": ["a", "an", "the", "no article"], "correct_answer": 0, "explanation": "Use \"a\" before singular nouns starting with consonants (a book, a car). Use \"an\" before vowel sounds (an apple, an hour)."}'::jsonb, -now(), now()), - --- Card 7: Time expressions -('b1c2d3e4-f5a6-7890-bcde-f01234567890', 7, 'Time: Morning', 'flashcard', -'{"front": "in the morning", "back": "am Morgen / morgens", "hint": "Time of day expression", "example": "I drink coffee in the morning.", "pronunciation": "in the MOR-ning"}'::jsonb, -now(), now()), - --- Card 8: Time: Evening -('b1c2d3e4-f5a6-7890-bcde-f01234567890', 8, 'Time: Evening', 'flashcard', -'{"front": "in the evening", "back": "am Abend / abends", "hint": "Time of day expression", "example": "We watch TV in the evening.", "pronunciation": "in the EEV-ning"}'::jsonb, -now(), now()), - --- Card 9: Weather vocabulary -('b1c2d3e4-f5a6-7890-bcde-f01234567890', 9, 'Weather: Sunny', 'flashcard', -'{"front": "sunny", "back": "sonnig", "hint": "Weather adjective", "example": "It is sunny today.", "pronunciation": "SUN-ee"}'::jsonb, -now(), now()), - --- Card 10: Weather: Rainy -('b1c2d3e4-f5a6-7890-bcde-f01234567890', 10, 'Weather: Rainy', 'flashcard', -'{"front": "rainy", "back": "regnerisch", "hint": "Weather adjective", "example": "It is rainy in London.", "pronunciation": "RAY-nee"}'::jsonb, -now(), now()), - --- Card 11: Body parts -('b1c2d3e4-f5a6-7890-bcde-f01234567890', 11, 'Body: Head', 'flashcard', -'{"front": "head", "back": "der Kopf", "hint": "Body part on top", "example": "My head hurts.", "pronunciation": "hed"}'::jsonb, -now(), now()), - --- Card 12: Body: Hand -('b1c2d3e4-f5a6-7890-bcde-f01234567890', 12, 'Body: Hand', 'flashcard', -'{"front": "hand", "back": "die Hand", "hint": "Body part with fingers", "example": "Please give me your hand.", "pronunciation": "hand"}'::jsonb, -now(), now()), - --- Card 13: Common Phrases -('b1c2d3e4-f5a6-7890-bcde-f01234567890', 13, 'Phrase: How much?', 'flashcard', -'{"front": "How much does it cost?", "back": "Wie viel kostet es?", "hint": "Shopping phrase", "example": "Excuse me, how much does this cost?", "pronunciation": "hau match daz it kost"}'::jsonb, -now(), now()), - --- Card 14: Quiz - Plural forms -('b1c2d3e4-f5a6-7890-bcde-f01234567890', 14, 'Plural Forms Quiz', 'quiz', -'{"question": "What is the plural of \"child\"?", "options": ["childs", "children", "childes", "childer"], "correct_answer": 1, "explanation": "Child is an irregular plural. The plural of child is children, not childs."}'::jsonb, -now(), now()), - --- Card 15: Common adjectives -('b1c2d3e4-f5a6-7890-bcde-f01234567890', 15, 'Adjective: Big/Small', 'flashcard', -'{"front": "big / small", "back": "groß / klein", "hint": "Size adjectives", "example": "The elephant is big. The mouse is small.", "pronunciation": "big / smawl"}'::jsonb, -now(), now()), - --- Card 16: Adjective: Hot/Cold -('b1c2d3e4-f5a6-7890-bcde-f01234567890', 16, 'Adjective: Hot/Cold', 'flashcard', -'{"front": "hot / cold", "back": "heiß / kalt", "hint": "Temperature adjectives", "example": "The coffee is hot. The ice cream is cold.", "pronunciation": "hot / kohld"}'::jsonb, -now(), now()), - --- Card 17: Question words -('b1c2d3e4-f5a6-7890-bcde-f01234567890', 17, 'Question: Where?', 'flashcard', -'{"front": "Where?", "back": "Wo?", "hint": "Question word for location", "example": "Where is the train station?", "pronunciation": "wair"}'::jsonb, -now(), now()), - --- Card 18: Question: When? -('b1c2d3e4-f5a6-7890-bcde-f01234567890', 18, 'Question: When?', 'flashcard', -'{"front": "When?", "back": "Wann?", "hint": "Question word for time", "example": "When does the movie start?", "pronunciation": "wen"}'::jsonb, -now(), now()), - --- Card 19: Prepositions -('b1c2d3e4-f5a6-7890-bcde-f01234567890', 19, 'Preposition: On/In/At', 'mixed', -'{"blocks": [ - {"type": "text", "data": {"text": "Important prepositions for place and time"}}, - {"type": "flashcard", "data": {"front": "on (the table)", "back": "auf (dem Tisch)", "example": "The book is on the table."}}, - {"type": "flashcard", "data": {"front": "in (the room)", "back": "in (dem Zimmer)", "example": "She is in the room."}}, - {"type": "flashcard", "data": {"front": "at (the station)", "back": "am/an (dem Bahnhof)", "example": "I am at the station."}} -]}'::jsonb, -now(), now()), - --- Card 20: Final Quiz -('b1c2d3e4-f5a6-7890-bcde-f01234567890', 20, 'Final Review Quiz', 'quiz', -'{"question": "How do you say \"Guten Tag\" in English?", "options": ["Good morning", "Good day/Hello", "Good evening", "Goodbye"], "correct_answer": 1, "explanation": "\"Guten Tag\" means \"Good day\" or simply \"Hello\" in English. It is a general greeting used during the day."}'::jsonb, -now(), now()); - --- Update deck metadata with card count -UPDATE public.decks -SET metadata = metadata || '{"card_count": 20}'::jsonb -WHERE id = 'b1c2d3e4-f5a6-7890-bcde-f01234567890'; - --- Verification: Show what was created -SELECT - d.title, - d.is_public, - d.user_id, - array_length(d.tags, 1) as tag_count, - COUNT(c.id) as card_count -FROM public.decks d -LEFT JOIN public.cards c ON d.id = c.deck_id -WHERE d.id = 'b1c2d3e4-f5a6-7890-bcde-f01234567890' -GROUP BY d.id, d.title, d.is_public, d.user_id, d.tags; \ No newline at end of file diff --git a/apps/cards/apps/mobile/Docs/samples/sample-deck-german-basics-simple.sql b/apps/cards/apps/mobile/Docs/samples/sample-deck-german-basics-simple.sql deleted file mode 100644 index f351646d7..000000000 --- a/apps/cards/apps/mobile/Docs/samples/sample-deck-german-basics-simple.sql +++ /dev/null @@ -1,128 +0,0 @@ --- Sample Deck: Deutsch für Anfänger (German Basics) - Simple Version --- This script creates a sample public deck without needing existing users --- Uses a system placeholder UUID that can be updated later - --- Insert the deck with a placeholder system user ID -INSERT INTO public.decks ( - id, - user_id, - title, - description, - is_public, - tags, - metadata, - created_at, - updated_at -) VALUES ( - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - '00000000-0000-0000-0000-000000000001', -- Placeholder system user - 'Deutsch für Anfänger', - 'Grundwortschatz für Deutsche-Lernende. Perfekt für A1-A2 Niveau mit den wichtigsten Alltagswörtern und Phrasen.', - true, - ARRAY['Sprachen', 'Deutsch', 'Anfänger', 'A1', 'A2', 'Grundwortschatz'], - '{ - "category": "Sprachen", - "difficulty": "Anfänger", - "target_audience": "Deutschlernende A1-A2", - "estimated_time": "2-3 Wochen", - "created_by": "System", - "version": "1.0", - "is_sample_deck": true - }'::jsonb, - now(), - now() -); - --- Insert sample cards -INSERT INTO public.cards (deck_id, position, title, card_type, content, created_at, updated_at) VALUES --- Card 1: Greetings -('a0b1c2d3-e4f5-6789-abcd-ef0123456789', 1, 'Begrüßung - Hallo', 'flashcard', -'{"front": "Hallo", "back": "Hello", "hint": "Standard greeting in German", "example": "Hallo, wie geht es dir?", "pronunciation": "HAH-lo"}'::jsonb, -now(), now()), - --- Card 2: Thank you -('a0b1c2d3-e4f5-6789-abcd-ef0123456789', 2, 'Danke sagen', 'flashcard', -'{"front": "Danke", "back": "Thank you", "hint": "Basic way to express gratitude", "example": "Danke für deine Hilfe!", "pronunciation": "DAHN-keh"}'::jsonb, -now(), now()), - --- Card 3: Please -('a0b1c2d3-e4f5-6789-abcd-ef0123456789', 3, 'Höflich bitten', 'flashcard', -'{"front": "Bitte", "back": "Please", "hint": "Used when asking for something politely", "example": "Können Sie mir bitte helfen?", "pronunciation": "BIT-teh"}'::jsonb, -now(), now()), - --- Card 4: Excuse me -('a0b1c2d3-e4f5-6789-abcd-ef0123456789', 4, 'Entschuldigung', 'flashcard', -'{"front": "Entschuldigung", "back": "Excuse me / Sorry", "hint": "Used to get attention or apologize", "example": "Entschuldigung, wo ist der Bahnhof?", "pronunciation": "ent-SHUL-di-gung"}'::jsonb, -now(), now()), - --- Card 5: Yes/No Quiz -('a0b1c2d3-e4f5-6789-abcd-ef0123456789', 5, 'Ja und Nein', 'quiz', -'{"question": "Wie sagt man \"Yes\" auf Deutsch?", "options": ["Ja", "Nein", "Vielleicht", "Okay"], "correct_answer": 0, "explanation": "\"Ja\" bedeutet \"Yes\" auf Deutsch. \"Nein\" bedeutet \"No\"."}'::jsonb, -now(), now()), - --- Card 6: Good morning -('a0b1c2d3-e4f5-6789-abcd-ef0123456789', 6, 'Guten Morgen', 'flashcard', -'{"front": "Guten Morgen", "back": "Good morning", "hint": "Morning greeting until about 10 AM", "example": "Guten Morgen! Haben Sie gut geschlafen?", "pronunciation": "GOO-ten MOR-gen"}'::jsonb, -now(), now()), - --- Card 7: Good evening -('a0b1c2d3-e4f5-6789-abcd-ef0123456789', 7, 'Guten Abend', 'flashcard', -'{"front": "Guten Abend", "back": "Good evening", "hint": "Evening greeting from about 6 PM", "example": "Guten Abend, wie war Ihr Tag?", "pronunciation": "GOO-ten AH-bent"}'::jsonb, -now(), now()), - --- Card 8: Numbers -('a0b1c2d3-e4f5-6789-abcd-ef0123456789', 8, 'Zahlen 1-5', 'mixed', -'{"front": "Die Zahlen von 1 bis 5", "back": "1 = eins, 2 = zwei, 3 = drei, 4 = vier, 5 = fünf", "hint": "Basic counting in German", "additional_info": "These are the most basic numbers you need to know"}'::jsonb, -now(), now()), - --- Card 9: Colors - Red -('a0b1c2d3-e4f5-6789-abcd-ef0123456789', 9, 'Farbe: Rot', 'flashcard', -'{"front": "rot", "back": "red", "hint": "The color of a rose or blood", "example": "Das Auto ist rot.", "pronunciation": "roht"}'::jsonb, -now(), now()), - --- Card 10: Colors - Blue -('a0b1c2d3-e4f5-6789-abcd-ef0123456789', 10, 'Farbe: Blau', 'flashcard', -'{"front": "blau", "back": "blue", "hint": "The color of the sky or ocean", "example": "Der Himmel ist blau.", "pronunciation": "blau"}'::jsonb, -now(), now()), - --- Card 11: Food - Bread -('a0b1c2d3-e4f5-6789-abcd-ef0123456789', 11, 'Essen: Brot', 'flashcard', -'{"front": "das Brot", "back": "the bread", "hint": "Basic food item, neuter noun", "example": "Ich esse Brot zum Frühstück.", "pronunciation": "dahs broht", "grammar_note": "neuter noun (das)"}'::jsonb, -now(), now()), - --- Card 12: Drink - Water -('a0b1c2d3-e4f5-6789-abcd-ef0123456789', 12, 'Getränk: Wasser', 'flashcard', -'{"front": "das Wasser", "back": "the water", "hint": "Essential drink, neuter noun", "example": "Ich trinke Wasser.", "pronunciation": "dahs VAH-ser", "grammar_note": "neuter noun (das)"}'::jsonb, -now(), now()), - --- Card 13: Family - Mother -('a0b1c2d3-e4f5-6789-abcd-ef0123456789', 13, 'Familie: Mutter', 'flashcard', -'{"front": "die Mutter", "back": "the mother", "hint": "Female parent, feminine noun", "example": "Meine Mutter ist sehr nett.", "pronunciation": "dee MUT-ter", "grammar_note": "feminine noun (die)"}'::jsonb, -now(), now()), - --- Card 14: Family - Father -('a0b1c2d3-e4f5-6789-abcd-ef0123456789', 14, 'Familie: Vater', 'flashcard', -'{"front": "der Vater", "back": "the father", "hint": "Male parent, masculine noun", "example": "Mein Vater arbeitet viel.", "pronunciation": "der FAH-ter", "grammar_note": "masculine noun (der)"}'::jsonb, -now(), now()), - --- Card 15: Question - How are you? -('a0b1c2d3-e4f5-6789-abcd-ef0123456789', 15, 'Frage: Wie geht es dir?', 'flashcard', -'{"front": "Wie geht es dir?", "back": "How are you? (informal)", "hint": "Common question when greeting friends", "example": "Hallo Maria! Wie geht es dir?", "pronunciation": "vee gayt es deer", "additional_info": "Formal version: Wie geht es Ihnen?"}'::jsonb, -now(), now()); - --- Update deck metadata with card count -UPDATE public.decks -SET metadata = metadata || '{"card_count": 15}'::jsonb -WHERE id = 'a0b1c2d3-e4f5-6789-abcd-ef0123456789'; - --- Verification: Show what was created -SELECT - d.title, - d.is_public, - d.user_id, - array_length(d.tags, 1) as tag_count, - COUNT(c.id) as card_count -FROM public.decks d -LEFT JOIN public.cards c ON d.id = c.deck_id -WHERE d.id = 'a0b1c2d3-e4f5-6789-abcd-ef0123456789' -GROUP BY d.id, d.title, d.is_public, d.user_id, d.tags; \ No newline at end of file diff --git a/apps/cards/apps/mobile/Docs/samples/sample-deck-german-basics.sql b/apps/cards/apps/mobile/Docs/samples/sample-deck-german-basics.sql deleted file mode 100644 index 17f252419..000000000 --- a/apps/cards/apps/mobile/Docs/samples/sample-deck-german-basics.sql +++ /dev/null @@ -1,661 +0,0 @@ --- Sample Deck: Deutsch für Anfänger (German Basics) --- This SQL script creates a sample public deck with basic German vocabulary --- To be executed by administrators or for initial seeding - --- First, check if we have any existing users, otherwise create a system user -DO $$ -DECLARE - system_user_id uuid; -BEGIN - -- Try to find an existing user - SELECT id INTO system_user_id FROM auth.users LIMIT 1; - - -- If no user exists, we'll use a fixed UUID for the system user - -- This would typically be handled by having a proper admin user - IF system_user_id IS NULL THEN - system_user_id := '00000000-0000-0000-0000-000000000001'; - - -- Note: In a real system, you would have a proper admin user - -- For now, we'll just use this fixed UUID as a placeholder - RAISE NOTICE 'Using system placeholder UUID: %', system_user_id; - END IF; -END $$; - --- Insert the deck using a system user or the first available user -INSERT INTO public.decks ( - id, - user_id, - title, - description, - is_public, - tags, - metadata, - created_at, - updated_at -) VALUES ( - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - COALESCE( - (SELECT id FROM auth.users LIMIT 1), - '00000000-0000-0000-0000-000000000001'::uuid - ), -- Use first available user or system placeholder - 'Deutsch für Anfänger', - 'Grundwortschatz für Deutsche-Lernende. Perfekt für A1-A2 Niveau mit den wichtigsten Alltagswörtern und Phrasen.', - true, - ARRAY['Sprachen', 'Deutsch', 'Anfänger', 'A1', 'A2', 'Grundwortschatz'], - '{ - "category": "Sprachen", - "difficulty": "Anfänger", - "target_audience": "Deutschlernende A1-A2", - "estimated_time": "2-3 Wochen", - "created_by": "Admin", - "version": "1.0" - }'::jsonb, - now(), - now() -); - --- Insert cards for the German basics deck --- Card 1: Greetings -INSERT INTO public.cards ( - id, - deck_id, - position, - title, - card_type, - content, - created_at, - updated_at -) VALUES ( - gen_random_uuid(), - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - 1, - 'Begrüßung - Hallo', - 'flashcard', - '{ - "front": "Hallo", - "back": "Hello", - "hint": "Standard greeting in German", - "example": "Hallo, wie geht es dir?", - "pronunciation": "HAH-lo" - }'::jsonb, - now(), - now() -); - --- Card 2: Thank you -INSERT INTO public.cards ( - id, - deck_id, - position, - title, - card_type, - content, - created_at, - updated_at -) VALUES ( - gen_random_uuid(), - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - 2, - 'Danke sagen', - 'flashcard', - '{ - "front": "Danke", - "back": "Thank you", - "hint": "Basic way to express gratitude", - "example": "Danke für deine Hilfe!", - "pronunciation": "DAHN-keh" - }'::jsonb, - now(), - now() -); - --- Card 3: Please -INSERT INTO public.cards ( - id, - deck_id, - position, - title, - card_type, - content, - created_at, - updated_at -) VALUES ( - gen_random_uuid(), - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - 3, - 'Höflich bitten', - 'flashcard', - '{ - "front": "Bitte", - "back": "Please", - "hint": "Used when asking for something politely", - "example": "Können Sie mir bitte helfen?", - "pronunciation": "BIT-teh" - }'::jsonb, - now(), - now() -); - --- Card 4: Excuse me -INSERT INTO public.cards ( - id, - deck_id, - position, - title, - card_type, - content, - created_at, - updated_at -) VALUES ( - gen_random_uuid(), - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - 4, - 'Entschuldigung', - 'flashcard', - '{ - "front": "Entschuldigung", - "back": "Excuse me / Sorry", - "hint": "Used to get attention or apologize", - "example": "Entschuldigung, wo ist der Bahnhof?", - "pronunciation": "ent-SHUL-di-gung" - }'::jsonb, - now(), - now() -); - --- Card 5: Yes/No -INSERT INTO public.cards ( - id, - deck_id, - position, - title, - card_type, - content, - created_at, - updated_at -) VALUES ( - gen_random_uuid(), - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - 5, - 'Ja und Nein', - 'quiz', - '{ - "question": "Wie sagt man ''Yes'' auf Deutsch?", - "options": ["Ja", "Nein", "Vielleicht", "Okay"], - "correct_answer": 0, - "explanation": "''Ja'' bedeutet ''Yes'' auf Deutsch. ''Nein'' bedeutet ''No''." - }'::jsonb, - now(), - now() -); - --- Card 6: Good morning -INSERT INTO public.cards ( - id, - deck_id, - position, - title, - card_type, - content, - created_at, - updated_at -) VALUES ( - gen_random_uuid(), - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - 6, - 'Guten Morgen', - 'flashcard', - '{ - "front": "Guten Morgen", - "back": "Good morning", - "hint": "Morning greeting until about 10 AM", - "example": "Guten Morgen! Haben Sie gut geschlafen?", - "pronunciation": "GOO-ten MOR-gen" - }'::jsonb, - now(), - now() -); - --- Card 7: Good evening -INSERT INTO public.cards ( - id, - deck_id, - position, - title, - card_type, - content, - created_at, - updated_at -) VALUES ( - gen_random_uuid(), - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - 7, - 'Guten Abend', - 'flashcard', - '{ - "front": "Guten Abend", - "back": "Good evening", - "hint": "Evening greeting from about 6 PM", - "example": "Guten Abend, wie war Ihr Tag?", - "pronunciation": "GOO-ten AH-bent" - }'::jsonb, - now(), - now() -); - --- Card 8: Numbers 1-5 -INSERT INTO public.cards ( - id, - deck_id, - position, - title, - card_type, - content, - created_at, - updated_at -) VALUES ( - gen_random_uuid(), - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - 8, - 'Zahlen 1-5', - 'mixed', - '{ - "front": "Die Zahlen von 1 bis 5", - "back": "1 = eins, 2 = zwei, 3 = drei, 4 = vier, 5 = fünf", - "hint": "Basic counting in German", - "additional_info": "These are the most basic numbers you need to know" - }'::jsonb, - now(), - now() -); - --- Card 9: Colors - Red -INSERT INTO public.cards ( - id, - deck_id, - position, - title, - card_type, - content, - created_at, - updated_at -) VALUES ( - gen_random_uuid(), - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - 9, - 'Farbe: Rot', - 'flashcard', - '{ - "front": "rot", - "back": "red", - "hint": "The color of a rose or blood", - "example": "Das Auto ist rot.", - "pronunciation": "roht" - }'::jsonb, - now(), - now() -); - --- Card 10: Colors - Blue -INSERT INTO public.cards ( - id, - deck_id, - position, - title, - card_type, - content, - created_at, - updated_at -) VALUES ( - gen_random_uuid(), - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - 10, - 'Farbe: Blau', - 'flashcard', - '{ - "front": "blau", - "back": "blue", - "hint": "The color of the sky or ocean", - "example": "Der Himmel ist blau.", - "pronunciation": "blau" - }'::jsonb, - now(), - now() -); - --- Card 11: Food - Bread -INSERT INTO public.cards ( - id, - deck_id, - position, - title, - card_type, - content, - created_at, - updated_at -) VALUES ( - gen_random_uuid(), - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - 11, - 'Essen: Brot', - 'flashcard', - '{ - "front": "das Brot", - "back": "the bread", - "hint": "Basic food item, neuter noun", - "example": "Ich esse Brot zum Frühstück.", - "pronunciation": "dahs broht", - "grammar_note": "neuter noun (das)" - }'::jsonb, - now(), - now() -); - --- Card 12: Food - Water -INSERT INTO public.cards ( - id, - deck_id, - position, - title, - card_type, - content, - created_at, - updated_at -) VALUES ( - gen_random_uuid(), - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - 12, - 'Getränk: Wasser', - 'flashcard', - '{ - "front": "das Wasser", - "back": "the water", - "hint": "Essential drink, neuter noun", - "example": "Ich trinke Wasser.", - "pronunciation": "dahs VAH-ser", - "grammar_note": "neuter noun (das)" - }'::jsonb, - now(), - now() -); - --- Card 13: Family - Mother -INSERT INTO public.cards ( - id, - deck_id, - position, - title, - card_type, - content, - created_at, - updated_at -) VALUES ( - gen_random_uuid(), - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - 13, - 'Familie: Mutter', - 'flashcard', - '{ - "front": "die Mutter", - "back": "the mother", - "hint": "Female parent, feminine noun", - "example": "Meine Mutter ist sehr nett.", - "pronunciation": "dee MUT-ter", - "grammar_note": "feminine noun (die)" - }'::jsonb, - now(), - now() -); - --- Card 14: Family - Father -INSERT INTO public.cards ( - id, - deck_id, - position, - title, - card_type, - content, - created_at, - updated_at -) VALUES ( - gen_random_uuid(), - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - 14, - 'Familie: Vater', - 'flashcard', - '{ - "front": "der Vater", - "back": "the father", - "hint": "Male parent, masculine noun", - "example": "Mein Vater arbeitet viel.", - "pronunciation": "der FAH-ter", - "grammar_note": "masculine noun (der)" - }'::jsonb, - now(), - now() -); - --- Card 15: Question - How are you? -INSERT INTO public.cards ( - id, - deck_id, - position, - title, - card_type, - content, - created_at, - updated_at -) VALUES ( - gen_random_uuid(), - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - 15, - 'Frage: Wie geht es dir?', - 'flashcard', - '{ - "front": "Wie geht es dir?", - "back": "How are you? (informal)", - "hint": "Common question when greeting friends", - "example": "Hallo Maria! Wie geht es dir?", - "pronunciation": "vee gayt es deer", - "additional_info": "Formal version: Wie geht es Ihnen?" - }'::jsonb, - now(), - now() -); - --- Card 16: Weather - Sun -INSERT INTO public.cards ( - id, - deck_id, - position, - title, - card_type, - content, - created_at, - updated_at -) VALUES ( - gen_random_uuid(), - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - 16, - 'Wetter: Sonne', - 'flashcard', - '{ - "front": "die Sonne", - "back": "the sun", - "hint": "Bright object in the sky, feminine noun", - "example": "Die Sonne scheint heute.", - "pronunciation": "dee SON-neh", - "grammar_note": "feminine noun (die)" - }'::jsonb, - now(), - now() -); - --- Card 17: Days - Today -INSERT INTO public.cards ( - id, - deck_id, - position, - title, - card_type, - content, - created_at, - updated_at -) VALUES ( - gen_random_uuid(), - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - 17, - 'Zeit: Heute', - 'flashcard', - '{ - "front": "heute", - "back": "today", - "hint": "Refers to the current day", - "example": "Heute ist ein schöner Tag.", - "pronunciation": "HOY-teh" - }'::jsonb, - now(), - now() -); - --- Card 18: Basic verb - to be -INSERT INTO public.cards ( - id, - deck_id, - position, - title, - card_type, - content, - created_at, - updated_at -) VALUES ( - gen_random_uuid(), - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - 18, - 'Verb: sein (to be)', - 'mixed', - '{ - "front": "sein - to be", - "back": "ich bin (I am), du bist (you are), er/sie/es ist (he/she/it is)", - "hint": "Most important verb in German", - "example": "Ich bin müde. Du bist nett. Er ist groß.", - "pronunciation": "zine" - }'::jsonb, - now(), - now() -); - --- Card 19: Basic verb - to have -INSERT INTO public.cards ( - id, - deck_id, - position, - title, - card_type, - content, - created_at, - updated_at -) VALUES ( - gen_random_uuid(), - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - 19, - 'Verb: haben (to have)', - 'mixed', - '{ - "front": "haben - to have", - "back": "ich habe (I have), du hast (you have), er/sie/es hat (he/she/it has)", - "hint": "Second most important verb in German", - "example": "Ich habe Hunger. Du hast Zeit. Sie hat ein Auto.", - "pronunciation": "HAH-ben" - }'::jsonb, - now(), - now() -); - --- Card 20: Goodbye -INSERT INTO public.cards ( - id, - deck_id, - position, - title, - card_type, - content, - created_at, - updated_at -) VALUES ( - gen_random_uuid(), - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - 20, - 'Abschied: Auf Wiedersehen', - 'flashcard', - '{ - "front": "Auf Wiedersehen", - "back": "Goodbye", - "hint": "Formal way to say goodbye", - "example": "Auf Wiedersehen, bis morgen!", - "pronunciation": "owf VEE-der-zay-en", - "additional_info": "Informal: Tschüss (CHOOS)" - }'::jsonb, - now(), - now() -); - --- Update deck metadata to reflect the actual card count -UPDATE public.decks -SET metadata = metadata || '{"card_count": 20}'::jsonb -WHERE id = 'a0b1c2d3-e4f5-6789-abcd-ef0123456789'; - --- Add some sample study sessions and progress (optional) --- This would typically be generated as users study, but can be added for demo purposes - --- Comment out the following if you don't want demo progress data: -/* --- Sample study session (replace USER_ID with actual user) -INSERT INTO public.study_sessions ( - id, - user_id, - deck_id, - mode, - started_at, - ended_at, - total_cards, - completed_cards, - correct_answers, - incorrect_answers, - total_time_seconds, - average_card_time_seconds -) VALUES ( - gen_random_uuid(), - 'YOUR_USER_ID', - 'a0b1c2d3-e4f5-6789-abcd-ef0123456789', - 'all', - now() - interval '1 day', - now() - interval '1 day' + interval '15 minutes', - 20, - 20, - 16, - 4, - 900, -- 15 minutes - 45 -- 45 seconds per card -); -*/ - --- Verification queries (uncomment to run after insertion): -/* --- Verify the deck was created -SELECT id, title, description, is_public, array_length(tags, 1) as tag_count -FROM public.decks -WHERE id = 'a0b1c2d3-e4f5-6789-abcd-ef0123456789'; - --- Count cards in the deck -SELECT COUNT(*) as card_count -FROM public.cards -WHERE deck_id = 'a0b1c2d3-e4f5-6789-abcd-ef0123456789'; - --- Show first few cards -SELECT position, title, card_type, content->>'front' as front_text, content->>'back' as back_text -FROM public.cards -WHERE deck_id = 'a0b1c2d3-e4f5-6789-abcd-ef0123456789' -ORDER BY position -LIMIT 5; -*/ \ No newline at end of file diff --git a/apps/cards/apps/mobile/Docs/samples/sample-deck-history-world.sql b/apps/cards/apps/mobile/Docs/samples/sample-deck-history-world.sql deleted file mode 100644 index ae1aa3482..000000000 --- a/apps/cards/apps/mobile/Docs/samples/sample-deck-history-world.sql +++ /dev/null @@ -1,215 +0,0 @@ --- Sample Deck: Weltgeschichte - Wichtige Ereignisse (World History - Key Events) --- This script creates a sample public deck for learning important historical events --- Uses a system placeholder UUID that can be updated later - --- Insert the deck with a placeholder system user ID -INSERT INTO public.decks ( - id, - user_id, - title, - description, - is_public, - tags, - metadata, - created_at, - updated_at -) VALUES ( - 'd3e4f5a6-b7c8-9012-def0-123456789012', - '00000000-0000-0000-0000-000000000001', -- Placeholder system user - 'Weltgeschichte - Wichtige Ereignisse', - 'Die wichtigsten Ereignisse der Weltgeschichte von der Antike bis zur Moderne. Ideal für Schüler und Geschichtsinteressierte.', - true, - ARRAY['Geschichte', 'Weltgeschichte', 'Ereignisse', 'Daten', 'Epochen', 'Bildung'], - '{ - "category": "Geschichte", - "difficulty": "Mittel", - "target_audience": "Schüler ab 7. Klasse, Geschichtsinteressierte", - "estimated_time": "5-6 Wochen", - "created_by": "System", - "version": "1.0", - "is_sample_deck": true, - "time_period": "3000 v.Chr. - 21. Jahrhundert" - }'::jsonb, - now(), - now() -); - --- Insert sample cards -INSERT INTO public.cards (deck_id, position, title, card_type, content, created_at, updated_at) VALUES --- Card 1: Ancient Egypt -('d3e4f5a6-b7c8-9012-def0-123456789012', 1, 'Altes Ägypten: Pyramiden', 'flashcard', -'{"front": "Wann wurden die Pyramiden von Gizeh erbaut?", "back": "ca. 2580-2560 v.Chr.", "hint": "Während der 4. Dynastie des Alten Reichs", "context": "Die Große Pyramide des Cheops ist eines der sieben Weltwunder der Antike", "significance": "Zeugnis der fortgeschrittenen Baukunst und Organisation im alten Ägypten"}'::jsonb, -now(), now()), - --- Card 2: Ancient Greece -('d3e4f5a6-b7c8-9012-def0-123456789012', 2, 'Antikes Griechenland: Demokratie', 'mixed', -'{"blocks": [ - {"type": "text", "data": {"text": "Die Geburt der Demokratie in Athen"}}, - {"type": "flashcard", "data": {"front": "Wer führte demokratische Reformen in Athen ein?", "back": "Kleisthenes (508/507 v.Chr.)", "context": "Begründer der attischen Demokratie"}}, - {"type": "flashcard", "data": {"front": "Was bedeutet Demokratie wörtlich?", "back": "Herrschaft des Volkes", "etymology": "demos (Volk) + kratos (Herrschaft)"}}, - {"type": "quiz", "data": {"question": "Wer durfte in der athenischen Demokratie wählen?", "options": ["Alle Einwohner", "Nur freie Männer über 18", "Nur Adlige", "Männer und Frauen über 21"], "correct_answer": 1, "explanation": "Nur freie männliche Bürger über 18 Jahren durften wählen - Frauen, Sklaven und Metöken (Fremde) waren ausgeschlossen"}} -]}'::jsonb, -now(), now()), - --- Card 3: Roman Empire -('d3e4f5a6-b7c8-9012-def0-123456789012', 3, 'Römisches Reich: Untergang', 'quiz', -'{"question": "In welchem Jahr endete das Weströmische Reich?", "options": ["376 n.Chr.", "476 n.Chr.", "576 n.Chr.", "1453 n.Chr."], "correct_answer": 1, "explanation": "476 n.Chr. wurde der letzte weströmische Kaiser Romulus Augustulus abgesetzt. Das Oströmische Reich (Byzanz) bestand noch bis 1453."}'::jsonb, -now(), now()), - --- Card 4: Middle Ages -('d3e4f5a6-b7c8-9012-def0-123456789012', 4, 'Mittelalter: Karl der Große', 'flashcard', -'{"front": "Wann wurde Karl der Große zum Kaiser gekrönt?", "back": "25. Dezember 800 n.Chr.", "location": "Rom, durch Papst Leo III.", "significance": "Begründung des Heiligen Römischen Reiches", "empire": "Vereinte große Teile West- und Mitteleuropas"}'::jsonb, -now(), now()), - --- Card 5: The Crusades -('d3e4f5a6-b7c8-9012-def0-123456789012', 5, 'Kreuzzüge: Erster Kreuzzug', 'flashcard', -'{"front": "Zeitraum des Ersten Kreuzzugs?", "back": "1096-1099", "goal": "Eroberung Jerusalems von den Muslimen", "result": "Eroberung Jerusalems 1099, Gründung der Kreuzfahrerstaaten", "called_by": "Papst Urban II. auf dem Konzil von Clermont (1095)"}'::jsonb, -now(), now()), - --- Card 6: Black Death -('d3e4f5a6-b7c8-9012-def0-123456789012', 6, 'Mittelalter: Der Schwarze Tod', 'mixed', -'{"blocks": [ - {"type": "text", "data": {"text": "Die verheerendste Pandemie des Mittelalters"}}, - {"type": "flashcard", "data": {"front": "Zeitraum der Pest in Europa?", "back": "1347-1353", "peak": "Höhepunkt 1348-1350"}}, - {"type": "flashcard", "data": {"front": "Geschätzte Todesopfer in Europa?", "back": "30-60% der Bevölkerung", "numbers": "Ca. 25 Millionen Menschen"}}, - {"type": "text", "data": {"text": "Folgen: Arbeitskräftemangel, soziale Umwälzungen, Judenverfolgungen, Entstehung neuer religiöser Bewegungen"}} -]}'::jsonb, -now(), now()), - --- Card 7: Renaissance -('d3e4f5a6-b7c8-9012-def0-123456789012', 7, 'Renaissance: Beginn', 'quiz', -'{"question": "Wo begann die Renaissance?", "options": ["Frankreich", "Deutschland", "Italien", "England"], "correct_answer": 2, "explanation": "Die Renaissance begann im 14. Jahrhundert in Italien, besonders in Florenz, und verbreitete sich dann über ganz Europa."}'::jsonb, -now(), now()), - --- Card 8: Columbus -('d3e4f5a6-b7c8-9012-def0-123456789012', 8, 'Entdeckungen: Kolumbus', 'flashcard', -'{"front": "Wann erreichte Kolumbus Amerika?", "back": "12. Oktober 1492", "location": "Landung auf einer Bahamas-Insel (wahrscheinlich San Salvador)", "ships": "Mit drei Schiffen: Santa Maria, Pinta, Niña", "misconception": "Er glaubte, einen neuen Weg nach Indien gefunden zu haben"}'::jsonb, -now(), now()), - --- Card 9: Reformation -('d3e4f5a6-b7c8-9012-def0-123456789012', 9, 'Reformation: Martin Luther', 'mixed', -'{"blocks": [ - {"type": "flashcard", "data": {"front": "Wann schlug Luther seine 95 Thesen an?", "back": "31. Oktober 1517", "location": "Schlosskirche zu Wittenberg"}}, - {"type": "text", "data": {"text": "Kritik am Ablasshandel und Beginn der Reformation"}}, - {"type": "quiz", "data": {"question": "Was war Luthers wichtigste Übersetzungsleistung?", "options": ["Lateinische Messe", "Bibel ins Deutsche", "Griechische Philosophen", "Kirchenlieder"], "correct_answer": 1, "explanation": "Luther übersetzte die Bibel ins Deutsche (Neues Testament 1522, vollständige Bibel 1534)"}} -]}'::jsonb, -now(), now()), - --- Card 10: Thirty Years War -('d3e4f5a6-b7c8-9012-def0-123456789012', 10, 'Dreißigjähriger Krieg', 'flashcard', -'{"front": "Zeitraum des Dreißigjährigen Krieges?", "back": "1618-1648", "cause": "Religiöse und machtpolitische Konflikte im Heiligen Römischen Reich", "end": "Westfälischer Friede", "consequences": "Verwüstung Mitteleuropas, ca. 30% Bevölkerungsverlust in deutschen Gebieten"}'::jsonb, -now(), now()), - --- Card 11: French Revolution -('d3e4f5a6-b7c8-9012-def0-123456789012', 11, 'Französische Revolution', 'mixed', -'{"blocks": [ - {"type": "flashcard", "data": {"front": "Sturm auf die Bastille?", "back": "14. Juli 1789", "significance": "Symbol für den Beginn der Revolution"}}, - {"type": "flashcard", "data": {"front": "Motto der Revolution?", "back": "Liberté, Égalité, Fraternité", "translation": "Freiheit, Gleichheit, Brüderlichkeit"}}, - {"type": "quiz", "data": {"question": "Wer wurde 1793 hingerichtet?", "options": ["Napoleon", "Ludwig XIV.", "Ludwig XVI.", "Robespierre"], "correct_answer": 2, "explanation": "König Ludwig XVI. wurde am 21. Januar 1793 guillotiniert, seine Frau Marie Antoinette im Oktober 1793"}} -]}'::jsonb, -now(), now()), - --- Card 12: Napoleon -('d3e4f5a6-b7c8-9012-def0-123456789012', 12, 'Napoleon: Kaiserkrönung', 'flashcard', -'{"front": "Wann krönte sich Napoleon zum Kaiser?", "back": "2. Dezember 1804", "location": "Notre-Dame de Paris", "special": "Er krönte sich selbst, um seine Unabhängigkeit vom Papst zu demonstrieren", "end_of_reign": "Abdankung 1814, Verbannung nach Elba, 100 Tage, finale Niederlage bei Waterloo 1815"}'::jsonb, -now(), now()), - --- Card 13: Industrial Revolution -('d3e4f5a6-b7c8-9012-def0-123456789012', 13, 'Industrielle Revolution', 'quiz', -'{"question": "Wo begann die Industrielle Revolution?", "options": ["Deutschland", "USA", "Großbritannien", "Frankreich"], "correct_answer": 2, "explanation": "Die Industrielle Revolution begann um 1760 in Großbritannien mit der Mechanisierung der Textilindustrie und der Erfindung der Dampfmaschine."}'::jsonb, -now(), now()), - --- Card 14: American Civil War -('d3e4f5a6-b7c8-9012-def0-123456789012', 14, 'Amerikanischer Bürgerkrieg', 'flashcard', -'{"front": "Zeitraum des Amerikanischen Bürgerkriegs?", "back": "1861-1865", "sides": "Nordstaaten (Union) vs. Südstaaten (Konföderation)", "main_issue": "Sklaverei und Rechte der Einzelstaaten", "outcome": "Sieg der Union, Abschaffung der Sklaverei (13. Amendment)", "casualties": "Ca. 620.000 Tote"}'::jsonb, -now(), now()), - --- Card 15: German Unification -('d3e4f5a6-b7c8-9012-def0-123456789012', 15, 'Deutsche Reichsgründung', 'flashcard', -'{"front": "Wann wurde das Deutsche Reich gegründet?", "back": "18. Januar 1871", "location": "Spiegelsaal von Versailles", "first_kaiser": "Wilhelm I.", "architect": "Otto von Bismarck (Reichskanzler)", "context": "Nach dem Sieg im Deutsch-Französischen Krieg 1870/71"}'::jsonb, -now(), now()), - --- Card 16: World War I -('d3e4f5a6-b7c8-9012-def0-123456789012', 16, 'Erster Weltkrieg', 'mixed', -'{"blocks": [ - {"type": "flashcard", "data": {"front": "Zeitraum des Ersten Weltkriegs?", "back": "1914-1918", "trigger": "Attentat von Sarajevo (28. Juni 1914)"}}, - {"type": "flashcard", "data": {"front": "Waffenstillstand?", "back": "11. November 1918", "time": "11 Uhr (11.11. um 11 Uhr)"}}, - {"type": "quiz", "data": {"question": "Welcher Vertrag beendete offiziell den Krieg mit Deutschland?", "options": ["Vertrag von Verdun", "Vertrag von Versailles", "Vertrag von Wien", "Vertrag von Potsdam"], "correct_answer": 1, "explanation": "Der Vertrag von Versailles wurde am 28. Juni 1919 unterzeichnet"}} -]}'::jsonb, -now(), now()), - --- Card 17: Russian Revolution -('d3e4f5a6-b7c8-9012-def0-123456789012', 17, 'Russische Revolution', 'flashcard', -'{"front": "Oktoberrevolution in Russland?", "back": "7. November 1917 (25. Oktober alten Stils)", "leader": "Wladimir Lenin", "party": "Bolschewiki", "result": "Sturz der provisorischen Regierung, Beginn der Sowjetmacht", "civil_war": "Russischer Bürgerkrieg 1918-1921"}'::jsonb, -now(), now()), - --- Card 18: Great Depression -('d3e4f5a6-b7c8-9012-def0-123456789012', 18, 'Weltwirtschaftskrise', 'quiz', -'{"question": "Mit welchem Ereignis begann die Weltwirtschaftskrise?", "options": ["Krieg in Europa", "Börsenkrach in New York", "Bankenkrise in London", "Revolution in Russland"], "correct_answer": 1, "explanation": "Der Schwarze Donnerstag (24. Oktober 1929) und Schwarze Dienstag (29. Oktober 1929) an der New Yorker Börse lösten die Weltwirtschaftskrise aus."}'::jsonb, -now(), now()), - --- Card 19: World War II -('d3e4f5a6-b7c8-9012-def0-123456789012', 19, 'Zweiter Weltkrieg', 'mixed', -'{"blocks": [ - {"type": "flashcard", "data": {"front": "Beginn des Zweiten Weltkriegs?", "back": "1. September 1939", "event": "Deutscher Überfall auf Polen"}}, - {"type": "flashcard", "data": {"front": "Ende in Europa?", "back": "8. Mai 1945", "event": "Bedingungslose Kapitulation Deutschlands"}}, - {"type": "flashcard", "data": {"front": "Ende in Asien?", "back": "2. September 1945", "event": "Kapitulation Japans nach Atombomben auf Hiroshima und Nagasaki"}}, - {"type": "text", "data": {"text": "Geschätzte Opferzahl: 70-85 Millionen Menschen, davon etwa 6 Millionen Juden im Holocaust"}} -]}'::jsonb, -now(), now()), - --- Card 20: United Nations -('d3e4f5a6-b7c8-9012-def0-123456789012', 20, 'Vereinte Nationen', 'flashcard', -'{"front": "Gründung der UNO?", "back": "24. Oktober 1945", "location": "San Francisco", "charter": "UN-Charta unterzeichnet am 26. Juni 1945", "members": "Ursprünglich 51 Mitgliedsstaaten, heute 193", "goals": "Weltfrieden, internationale Sicherheit, Menschenrechte"}'::jsonb, -now(), now()), - --- Card 21: Cold War -('d3e4f5a6-b7c8-9012-def0-123456789012', 21, 'Kalter Krieg: Berliner Mauer', 'mixed', -'{"blocks": [ - {"type": "flashcard", "data": {"front": "Bau der Berliner Mauer?", "back": "13. August 1961", "reason": "Stopp der Massenflucht aus der DDR"}}, - {"type": "flashcard", "data": {"front": "Fall der Berliner Mauer?", "back": "9. November 1989", "trigger": "Friedliche Revolution in der DDR"}}, - {"type": "text", "data": {"text": "Die Mauer stand 28 Jahre und teilte Berlin und Deutschland"}} -]}'::jsonb, -now(), now()), - --- Card 22: Moon Landing -('d3e4f5a6-b7c8-9012-def0-123456789012', 22, 'Raumfahrt: Mondlandung', 'flashcard', -'{"front": "Erste bemannte Mondlandung?", "back": "20. Juli 1969", "mission": "Apollo 11", "astronauts": "Neil Armstrong (erster Mensch auf dem Mond), Buzz Aldrin, Michael Collins", "famous_quote": "That\'s one small step for man, one giant leap for mankind", "country": "USA"}'::jsonb, -now(), now()), - --- Card 23: European Union -('d3e4f5a6-b7c8-9012-def0-123456789012', 23, 'Europäische Union', 'quiz', -'{"question": "Welcher Vertrag begründete die EWG (Vorläufer der EU)?", "options": ["Vertrag von Lissabon", "Römische Verträge", "Vertrag von Maastricht", "Vertrag von Amsterdam"], "correct_answer": 1, "explanation": "Die Römischen Verträge wurden am 25. März 1957 unterzeichnet und begründeten die Europäische Wirtschaftsgemeinschaft (EWG). Die EU entstand 1993 durch den Vertrag von Maastricht."}'::jsonb, -now(), now()), - --- Card 24: 9/11 Attacks -('d3e4f5a6-b7c8-9012-def0-123456789012', 24, 'Terroranschläge 9/11', 'flashcard', -'{"front": "Datum der Anschläge auf das World Trade Center?", "back": "11. September 2001", "location": "New York City und Washington D.C.", "perpetrator": "Al-Qaida unter Osama bin Laden", "victims": "Fast 3.000 Menschen", "consequences": "Krieg gegen den Terror, Afghanistan-Krieg, veränderte Sicherheitspolitik weltweit"}'::jsonb, -now(), now()), - --- Card 25: COVID-19 Pandemic -('d3e4f5a6-b7c8-9012-def0-123456789012', 25, 'COVID-19 Pandemie', 'mixed', -'{"blocks": [ - {"type": "flashcard", "data": {"front": "Wann erklärte die WHO COVID-19 zur Pandemie?", "back": "11. März 2020", "first_cases": "Dezember 2019 in Wuhan, China"}}, - {"type": "text", "data": {"text": "Erste mRNA-Impfstoffe in der Geschichte, entwickelt in Rekordzeit"}}, - {"type": "flashcard", "data": {"front": "Erste Impfstoffzulassung?", "back": "Dezember 2020", "vaccines": "BioNTech/Pfizer, Moderna"}}, - {"type": "text", "data": {"text": "Globale Auswirkungen: Lockdowns, Wirtschaftskrise, Digitalisierungsschub, über 6 Millionen Tote weltweit"}} -]}'::jsonb, -now(), now()); - --- Update deck metadata with card count -UPDATE public.decks -SET metadata = metadata || '{"card_count": 25}'::jsonb -WHERE id = 'd3e4f5a6-b7c8-9012-def0-123456789012'; - --- Verification: Show what was created -SELECT - d.title, - d.is_public, - d.user_id, - array_length(d.tags, 1) as tag_count, - COUNT(c.id) as card_count -FROM public.decks d -LEFT JOIN public.cards c ON d.id = c.deck_id -WHERE d.id = 'd3e4f5a6-b7c8-9012-def0-123456789012' -GROUP BY d.id, d.title, d.is_public, d.user_id, d.tags; \ No newline at end of file diff --git a/apps/cards/apps/mobile/Docs/samples/sample-deck-math-basics.sql b/apps/cards/apps/mobile/Docs/samples/sample-deck-math-basics.sql deleted file mode 100644 index 8953b6f2d..000000000 --- a/apps/cards/apps/mobile/Docs/samples/sample-deck-math-basics.sql +++ /dev/null @@ -1,216 +0,0 @@ --- Sample Deck: Mathematik Grundlagen (Mathematics Basics) --- This script creates a sample public deck for learning basic math concepts --- Uses a system placeholder UUID that can be updated later - --- Insert the deck with a placeholder system user ID -INSERT INTO public.decks ( - id, - user_id, - title, - description, - is_public, - tags, - metadata, - created_at, - updated_at -) VALUES ( - 'c2d3e4f5-a6b7-8901-cdef-012345678901', - '00000000-0000-0000-0000-000000000001', -- Placeholder system user - 'Mathematik Grundlagen', - 'Grundlegende mathematische Konzepte und Formeln. Perfekt für Schüler der Mittelstufe und zur Auffrischung.', - true, - ARRAY['Mathematik', 'Grundlagen', 'Formeln', 'Geometrie', 'Algebra', 'Mittelstufe'], - '{ - "category": "Mathematik", - "difficulty": "Grundlagen", - "target_audience": "Schüler 5.-8. Klasse", - "estimated_time": "4-5 Wochen", - "created_by": "System", - "version": "1.0", - "is_sample_deck": true, - "includes_formulas": true - }'::jsonb, - now(), - now() -); - --- Insert sample cards -INSERT INTO public.cards (deck_id, position, title, card_type, content, created_at, updated_at) VALUES --- Card 1: Addition und Subtraktion -('c2d3e4f5-a6b7-8901-cdef-012345678901', 1, 'Grundrechenarten: Addition', 'flashcard', -'{"front": "Was ist 47 + 38?", "back": "85", "hint": "Addiere zuerst die Einer (7+8=15), schreibe 5 und merke 1, dann die Zehner (4+3+1=8)", "explanation": "Addition ist das Zusammenzählen von Zahlen"}'::jsonb, -now(), now()), - --- Card 2: Multiplication Table -('c2d3e4f5-a6b7-8901-cdef-012345678901', 2, 'Einmaleins: 7er-Reihe', 'quiz', -'{"question": "Was ist 7 × 8?", "options": ["54", "56", "58", "63"], "correct_answer": 1, "explanation": "7 × 8 = 56. Tipp: 7 × 8 ist dasselbe wie 8 × 7, und 8 × 7 = 56"}'::jsonb, -now(), now()), - --- Card 3: Brüche Grundlagen -('c2d3e4f5-a6b7-8901-cdef-012345678901', 3, 'Brüche: Grundbegriffe', 'mixed', -'{"blocks": [ - {"type": "text", "data": {"text": "Ein Bruch besteht aus Zähler (oben) und Nenner (unten)"}}, - {"type": "flashcard", "data": {"front": "Was ist 1/2 + 1/2?", "back": "1 (oder 2/2)", "hint": "Gleiche Nenner: Addiere die Zähler"}}, - {"type": "flashcard", "data": {"front": "Was ist 3/4 in Dezimalform?", "back": "0,75", "hint": "Teile 3 durch 4"}}, - {"type": "quiz", "data": {"question": "Welcher Bruch ist größer: 2/3 oder 3/4?", "options": ["2/3", "3/4", "Gleich groß"], "correct_answer": 1, "explanation": "3/4 = 0,75 und 2/3 = 0,67, also ist 3/4 größer"}} -]}'::jsonb, -now(), now()), - --- Card 4: Prozentrechnung -('c2d3e4f5-a6b7-8901-cdef-012345678901', 4, 'Prozentrechnung: Grundformel', 'flashcard', -'{"front": "Wie berechnet man 20% von 150?", "back": "30", "hint": "20% = 20/100 = 0,2. Dann: 0,2 × 150 = 30", "formula": "Prozentwert = Grundwert × Prozentsatz/100", "example": "20% von 150 = 150 × 20/100 = 30"}'::jsonb, -now(), now()), - --- Card 5: Geometrie - Flächenberechnung -('c2d3e4f5-a6b7-8901-cdef-012345678901', 5, 'Geometrie: Rechteck', 'flashcard', -'{"front": "Formel für die Fläche eines Rechtecks?", "back": "A = Länge × Breite", "hint": "Multipliziere die beiden Seitenlängen", "example": "Ein Rechteck mit Länge 5cm und Breite 3cm hat die Fläche: A = 5 × 3 = 15 cm²", "unit": "Fläche wird in Quadrateinheiten gemessen (cm², m²)"}'::jsonb, -now(), now()), - --- Card 6: Kreisberechnung -('c2d3e4f5-a6b7-8901-cdef-012345678901', 6, 'Geometrie: Kreis', 'mixed', -'{"blocks": [ - {"type": "text", "data": {"text": "Wichtige Formeln für den Kreis"}}, - {"type": "flashcard", "data": {"front": "Umfang eines Kreises", "back": "U = 2 × π × r", "hint": "r ist der Radius, π ≈ 3,14"}}, - {"type": "flashcard", "data": {"front": "Fläche eines Kreises", "back": "A = π × r²", "hint": "r² bedeutet r × r"}}, - {"type": "quiz", "data": {"question": "Was ist der Umfang eines Kreises mit Radius 5cm?", "options": ["15,7 cm", "31,4 cm", "78,5 cm", "25 cm"], "correct_answer": 1, "explanation": "U = 2 × π × r = 2 × 3,14 × 5 = 31,4 cm"}} -]}'::jsonb, -now(), now()), - --- Card 7: Negative Zahlen -('c2d3e4f5-a6b7-8901-cdef-012345678901', 7, 'Negative Zahlen: Rechnen', 'quiz', -'{"question": "Was ist (-5) + 3?", "options": ["-8", "-2", "2", "8"], "correct_answer": 1, "explanation": "Bei (-5) + 3 gehst du von -5 drei Schritte nach rechts auf dem Zahlenstrahl, landest bei -2"}'::jsonb, -now(), now()), - --- Card 8: Potenzen -('c2d3e4f5-a6b7-8901-cdef-012345678901', 8, 'Potenzen: Grundlagen', 'flashcard', -'{"front": "Was ist 2⁴?", "back": "16", "hint": "2⁴ = 2 × 2 × 2 × 2", "explanation": "Eine Potenz ist eine verkürzte Schreibweise für wiederholte Multiplikation", "examples": "2¹ = 2, 2² = 4, 2³ = 8, 2⁴ = 16, 2⁵ = 32"}'::jsonb, -now(), now()), - --- Card 9: Gleichungen lösen -('c2d3e4f5-a6b7-8901-cdef-012345678901', 9, 'Gleichungen: Einfache Lösung', 'flashcard', -'{"front": "Löse: x + 5 = 12", "back": "x = 7", "hint": "Subtrahiere 5 von beiden Seiten", "steps": "x + 5 = 12 | -5 auf beiden Seiten → x = 7", "check": "Probe: 7 + 5 = 12 ✓"}'::jsonb, -now(), now()), - --- Card 10: Dreisatz -('c2d3e4f5-a6b7-8901-cdef-012345678901', 10, 'Dreisatz: Proportional', 'mixed', -'{"blocks": [ - {"type": "text", "data": {"text": "Der Dreisatz löst Verhältnisaufgaben"}}, - {"type": "flashcard", "data": {"front": "3 Äpfel kosten 2€. Was kosten 9 Äpfel?", "back": "6€", "hint": "9 Äpfel sind 3× so viele, also 3× so teuer"}}, - {"type": "text", "data": {"text": "Rechnung: 3 Äpfel → 2€, 1 Apfel → 2€/3, 9 Äpfel → 2€/3 × 9 = 6€"}} -]}'::jsonb, -now(), now()), - --- Card 11: Primzahlen -('c2d3e4f5-a6b7-8901-cdef-012345678901', 11, 'Zahlentheorie: Primzahlen', 'quiz', -'{"question": "Welche dieser Zahlen ist KEINE Primzahl?", "options": ["17", "19", "21", "23"], "correct_answer": 2, "explanation": "21 ist keine Primzahl, da 21 = 3 × 7. Primzahlen sind nur durch 1 und sich selbst teilbar."}'::jsonb, -now(), now()), - --- Card 12: Quadratwurzeln -('c2d3e4f5-a6b7-8901-cdef-012345678901', 12, 'Wurzeln: Quadratwurzel', 'flashcard', -'{"front": "Was ist √64?", "back": "8", "hint": "Welche Zahl mal sich selbst ergibt 64?", "explanation": "√64 = 8, weil 8 × 8 = 64", "more_examples": "√4 = 2, √9 = 3, √16 = 4, √25 = 5, √36 = 6, √49 = 7"}'::jsonb, -now(), now()), - --- Card 13: Mittelwerte -('c2d3e4f5-a6b7-8901-cdef-012345678901', 13, 'Statistik: Durchschnitt', 'flashcard', -'{"front": "Durchschnitt von: 4, 7, 9, 12, 18?", "back": "10", "hint": "Addiere alle Zahlen und teile durch die Anzahl", "calculation": "(4 + 7 + 9 + 12 + 18) ÷ 5 = 50 ÷ 5 = 10", "formula": "Durchschnitt = Summe aller Werte ÷ Anzahl der Werte"}'::jsonb, -now(), now()), - --- Card 14: Winkel -('c2d3e4f5-a6b7-8901-cdef-012345678901', 14, 'Geometrie: Winkelarten', 'mixed', -'{"blocks": [ - {"type": "text", "data": {"text": "Verschiedene Winkelarten und ihre Größen"}}, - {"type": "flashcard", "data": {"front": "Spitzer Winkel", "back": "0° < Winkel < 90°", "example": "45° ist ein spitzer Winkel"}}, - {"type": "flashcard", "data": {"front": "Rechter Winkel", "back": "Genau 90°", "symbol": "∟"}}, - {"type": "flashcard", "data": {"front": "Stumpfer Winkel", "back": "90° < Winkel < 180°", "example": "120° ist ein stumpfer Winkel"}}, - {"type": "flashcard", "data": {"front": "Gestreckter Winkel", "back": "Genau 180°", "note": "Eine gerade Linie"}} -]}'::jsonb, -now(), now()), - --- Card 15: Teilbarkeitsregeln -('c2d3e4f5-a6b7-8901-cdef-012345678901', 15, 'Teilbarkeit: Regeln', 'mixed', -'{"blocks": [ - {"type": "text", "data": {"text": "Wichtige Teilbarkeitsregeln"}}, - {"type": "flashcard", "data": {"front": "Teilbar durch 2", "back": "Wenn die letzte Ziffer gerade ist (0,2,4,6,8)", "example": "124 ist durch 2 teilbar"}}, - {"type": "flashcard", "data": {"front": "Teilbar durch 3", "back": "Wenn die Quersumme durch 3 teilbar ist", "example": "123: 1+2+3=6, 6 ist durch 3 teilbar"}}, - {"type": "flashcard", "data": {"front": "Teilbar durch 5", "back": "Wenn die letzte Ziffer 0 oder 5 ist", "example": "145 ist durch 5 teilbar"}}, - {"type": "flashcard", "data": {"front": "Teilbar durch 9", "back": "Wenn die Quersumme durch 9 teilbar ist", "example": "81: 8+1=9, 9 ist durch 9 teilbar"}} -]}'::jsonb, -now(), now()), - --- Card 16: Römische Zahlen -('c2d3e4f5-a6b7-8901-cdef-012345678901', 16, 'Zahlensysteme: Römische Zahlen', 'quiz', -'{"question": "Was ist XIV in arabischen Zahlen?", "options": ["14", "16", "19", "24"], "correct_answer": 0, "explanation": "XIV = 10 (X) + 4 (IV) = 14. IV bedeutet 5-1=4"}'::jsonb, -now(), now()), - --- Card 17: Volumenberechnung -('c2d3e4f5-a6b7-8901-cdef-012345678901', 17, 'Geometrie: Würfelvolumen', 'flashcard', -'{"front": "Volumen eines Würfels mit Kantenlänge 4cm?", "back": "64 cm³", "formula": "V = a³ (a × a × a)", "calculation": "V = 4³ = 4 × 4 × 4 = 64 cm³", "hint": "Bei einem Würfel sind alle Kanten gleich lang"}'::jsonb, -now(), now()), - --- Card 18: Binomische Formeln -('c2d3e4f5-a6b7-8901-cdef-012345678901', 18, 'Algebra: Binomische Formeln', 'mixed', -'{"blocks": [ - {"type": "text", "data": {"text": "Die drei binomischen Formeln"}}, - {"type": "flashcard", "data": {"front": "1. Binomische Formel", "back": "(a + b)² = a² + 2ab + b²", "example": "(x + 3)² = x² + 6x + 9"}}, - {"type": "flashcard", "data": {"front": "2. Binomische Formel", "back": "(a - b)² = a² - 2ab + b²", "example": "(x - 2)² = x² - 4x + 4"}}, - {"type": "flashcard", "data": {"front": "3. Binomische Formel", "back": "(a + b)(a - b) = a² - b²", "example": "(x + 5)(x - 5) = x² - 25"}} -]}'::jsonb, -now(), now()), - --- Card 19: Pythagoras -('c2d3e4f5-a6b7-8901-cdef-012345678901', 19, 'Geometrie: Satz des Pythagoras', 'flashcard', -'{"front": "Satz des Pythagoras", "back": "a² + b² = c²", "hint": "In einem rechtwinkligen Dreieck", "explanation": "a und b sind die Katheten (kurze Seiten), c ist die Hypotenuse (längste Seite)", "example": "Dreieck mit a=3, b=4: c² = 9 + 16 = 25, also c = 5"}'::jsonb, -now(), now()), - --- Card 20: Wahrscheinlichkeit -('c2d3e4f5-a6b7-8901-cdef-012345678901', 20, 'Stochastik: Wahrscheinlichkeit', 'quiz', -'{"question": "Wie groß ist die Wahrscheinlichkeit, mit einem Würfel eine 6 zu würfeln?", "options": ["1/2", "1/3", "1/6", "1/12"], "correct_answer": 2, "explanation": "Ein Würfel hat 6 Seiten, nur eine zeigt die 6. Wahrscheinlichkeit = günstige Fälle / mögliche Fälle = 1/6 ≈ 16,7%"}'::jsonb, -now(), now()), - --- Card 21: Lineare Funktionen -('c2d3e4f5-a6b7-8901-cdef-012345678901', 21, 'Funktionen: Linear', 'flashcard', -'{"front": "Allgemeine Form einer linearen Funktion?", "back": "y = mx + b", "explanation": "m = Steigung, b = y-Achsenabschnitt", "example": "y = 2x + 3 hat Steigung 2 und schneidet die y-Achse bei 3", "graph_info": "Der Graph ist immer eine Gerade"}'::jsonb, -now(), now()), - --- Card 22: Größenumrechnung -('c2d3e4f5-a6b7-8901-cdef-012345678901', 22, 'Einheiten: Längen umrechnen', 'mixed', -'{"blocks": [ - {"type": "text", "data": {"text": "Wichtige Längeneinheiten und ihre Umrechnung"}}, - {"type": "flashcard", "data": {"front": "1 km = ? m", "back": "1000 m", "hint": "kilo = 1000"}}, - {"type": "flashcard", "data": {"front": "1 m = ? cm", "back": "100 cm", "hint": "centi = 1/100"}}, - {"type": "flashcard", "data": {"front": "1 cm = ? mm", "back": "10 mm", "hint": "milli = 1/1000"}}, - {"type": "quiz", "data": {"question": "2,5 km sind wie viele Meter?", "options": ["25 m", "250 m", "2500 m", "25000 m"], "correct_answer": 2}} -]}'::jsonb, -now(), now()), - --- Card 23: Logarithmus Grundlagen -('c2d3e4f5-a6b7-8901-cdef-012345678901', 23, 'Logarithmus: Einführung', 'flashcard', -'{"front": "Was ist log₁₀(100)?", "back": "2", "hint": "10 hoch was ergibt 100?", "explanation": "log₁₀(100) = 2, weil 10² = 100", "rule": "Der Logarithmus ist die Umkehrfunktion der Potenz"}'::jsonb, -now(), now()), - --- Card 24: Symmetrie -('c2d3e4f5-a6b7-8901-cdef-012345678901', 24, 'Geometrie: Symmetrie', 'quiz', -'{"question": "Wie viele Symmetrieachsen hat ein Quadrat?", "options": ["2", "3", "4", "8"], "correct_answer": 2, "explanation": "Ein Quadrat hat 4 Symmetrieachsen: 2 durch die Mittelpunkte gegenüberliegender Seiten und 2 durch gegenüberliegende Ecken"}'::jsonb, -now(), now()), - --- Card 25: Abschluss-Quiz -('c2d3e4f5-a6b7-8901-cdef-012345678901', 25, 'Abschluss: Gemischtes Quiz', 'quiz', -'{"question": "Ein Rechteck hat einen Umfang von 20cm und eine Länge von 6cm. Wie breit ist es?", "options": ["2 cm", "4 cm", "8 cm", "14 cm"], "correct_answer": 1, "explanation": "Umfang = 2×(Länge + Breite). 20 = 2×(6 + Breite). 10 = 6 + Breite. Breite = 4 cm"}'::jsonb, -now(), now()); - --- Update deck metadata with card count -UPDATE public.decks -SET metadata = metadata || '{"card_count": 25}'::jsonb -WHERE id = 'c2d3e4f5-a6b7-8901-cdef-012345678901'; - --- Verification: Show what was created -SELECT - d.title, - d.is_public, - d.user_id, - array_length(d.tags, 1) as tag_count, - COUNT(c.id) as card_count -FROM public.decks d -LEFT JOIN public.cards c ON d.id = c.deck_id -WHERE d.id = 'c2d3e4f5-a6b7-8901-cdef-012345678901' -GROUP BY d.id, d.title, d.is_public, d.user_id, d.tags; \ No newline at end of file diff --git a/apps/cards/apps/mobile/Docs/spaced-repetition.md b/apps/cards/apps/mobile/Docs/spaced-repetition.md deleted file mode 100644 index cda220d67..000000000 --- a/apps/cards/apps/mobile/Docs/spaced-repetition.md +++ /dev/null @@ -1,276 +0,0 @@ -# Spaced Repetition System - Dokumentation - -## Überblick - -Cards implementiert ein wissenschaftlich fundiertes **Spaced Repetition System (SRS)** basierend auf dem **SuperMemo 2 (SM-2) Algorithmus**. Dieses System optimiert den Lernprozess durch intelligente Wiederholungsintervalle, die sich an die individuelle Lernleistung anpassen. - -## Was ist Spaced Repetition? - -Spaced Repetition ist eine Lernmethode, die auf der **Vergessenskurve** von Hermann Ebbinghaus basiert. Das Prinzip: -- Informationen werden in zunehmend größeren Intervallen wiederholt -- Je besser man sich erinnert, desto länger das nächste Intervall -- Schwierige Karten werden öfter wiederholt als leichte - -## Der SM-2 Algorithmus - -### Grundprinzipien - -Der SM-2 Algorithmus berechnet optimale Wiederholungsintervalle basierend auf: - -1. **Qualität der Antwort (Q)**: Bewertung von 0-5 -2. **Ease Factor (EF)**: Schwierigkeitsgrad der Karte (min. 1.3) -3. **Interval (I)**: Tage bis zur nächsten Wiederholung -4. **Repetitions (R)**: Anzahl erfolgreicher Wiederholungen - -### Qualitätsstufen - -In Cards werden 4 Bewertungsstufen verwendet: - -| Button | Qualität (Q) | Bedeutung | Typisches Intervall | -|--------|--------------|-----------|-------------------| -| **Nochmal** | 1 | Antwort vergessen | < 1 Minute | -| **Schwer** | 3 | Mit Mühe erinnert | ~6 Minuten | -| **Gut** | 4 | Normal erinnert | ~10 Minuten / 1 Tag | -| **Leicht** | 5 | Perfekt erinnert | ~4 Tage | - -### Algorithmus-Formel - -```typescript -// Ease Factor Berechnung -EF' = EF + (0.1 - (5 - Q) * (0.08 + (5 - Q) * 0.02)) -EF = max(1.3, EF') // Minimum 1.3 - -// Intervall-Berechnung -if (Q < 3) { - // Falsche Antwort - R = 0 - I = 1 Tag -} else { - // Richtige Antwort - if (R == 0) I = 1 Tag - else if (R == 1) I = 6 Tage - else I = I(prev) * EF - - R = R + 1 -} -``` - -## Implementation in Cards - -### Datenbankstruktur - -#### `card_progress` Tabelle -```sql -- id: UUID (Primary Key) -- user_id: UUID (Foreign Key → users) -- card_id: UUID (Foreign Key → cards) -- deck_id: UUID (Foreign Key → decks) -- ease_factor: Decimal (Default: 2.5) -- interval: Integer (Tage) -- repetitions: Integer -- next_review_date: Timestamp -- last_reviewed_at: Timestamp -- total_reviews: Integer -- correct_reviews: Integer -- incorrect_reviews: Integer -- status: Enum ('new', 'learning', 'review', 'relearning') -``` - -### Karten-Status - -1. **new**: Noch nie gelernt -2. **learning**: In Lernphase (Intervall < 10 Tage) -3. **review**: Langzeit-Wiederholung (Intervall ≥ 10 Tage) -4. **relearning**: Nach Fehler zurück in Lernphase - -### Lernmodi - -#### 1. Alle Karten -- Zeigt alle Karten des Decks -- Standardreihenfolge nach Position - -#### 2. Neue Karten -- Nur Karten mit Status `new` -- Noch nie studierte Karten - -#### 3. Wiederholung -- Karten mit `next_review_date ≤ heute` -- Sortiert nach Überfälligkeit (älteste zuerst) - -#### 4. Favoriten -- Nur als Favorit markierte Karten - -#### 5. Zufällig -- Alle Karten in zufälliger Reihenfolge - -## Lernablauf - -### 1. Session Start -```typescript -1. Deck auswählen -2. Lernmodus wählen -3. Karten werden gefiltert/sortiert -4. Session wird in Datenbank erstellt -``` - -### 2. Karte lernen -```typescript -1. Karte anzeigen -2. Antwort geben (Flashcard umdrehen, Quiz beantworten) -3. Schwierigkeit bewerten -4. SM-2 berechnet nächstes Review-Datum -5. Progress in Datenbank speichern -``` - -### 3. Session Ende -```typescript -1. Statistiken berechnen -2. Session in Datenbank aktualisieren -3. Zusammenfassung anzeigen -``` - -## Beispiel-Lernverlauf - -### Tag 1: Erste Begegnung -- Neue Karte lernen -- Bewertung: "Gut" (Q=4) -- Nächste Review: **Morgen** - -### Tag 2: Erste Wiederholung -- Bewertung: "Gut" (Q=4) -- EF bleibt bei 2.5 -- Nächste Review: **In 6 Tagen** - -### Tag 8: Zweite Wiederholung -- Bewertung: "Leicht" (Q=5) -- EF steigt auf 2.6 -- Nächste Review: **In 15 Tagen** (6 * 2.6) - -### Tag 23: Dritte Wiederholung -- Bewertung: "Schwer" (Q=3) -- EF sinkt auf 2.36 -- Nächste Review: **In 35 Tagen** (15 * 2.36) - -## Vorteile des Systems - -### 1. **Effizienz** -- Minimaler Zeitaufwand -- Fokus auf schwierige Karten -- Automatische Intervall-Anpassung - -### 2. **Langzeit-Retention** -- Optimale Wiederholungszeitpunkte -- Bekämpft die Vergessenskurve -- Nachweislich 90%+ Retention möglich - -### 3. **Personalisierung** -- Individuelle Ease Factors pro Karte -- Anpassung an Lerngeschwindigkeit -- Berücksichtigt Schwierigkeitsgrad - -## Code-Referenzen - -### Hauptdateien - -1. **`utils/spacedRepetition.ts`** - - SM-2 Algorithmus Implementation - - Hilfsfunktionen für Intervalle - -2. **`store/studyStore.ts`** - - Progress Management - - Session Verwaltung - - Supabase Integration - -3. **`app/study/session/[id].tsx`** - - Lern-UI mit Bewertungsbuttons - - Intervall-Vorschau - -4. **Datenbank-Migrationen** - - `create_card_progress_table` - - `create_study_sessions_table` - -### Wichtige Funktionen - -```typescript -// Hauptfunktion für SM-2 Berechnung -calculateSM2(quality, repetitions, previousInterval, previousEaseFactor) - -// Schwierigkeit zu Qualität konvertieren -difficultyToQuality(difficulty: 'easy' | 'medium' | 'hard' | 'again') - -// Prüfen ob Karte fällig ist -isCardDue(nextReviewDate: Date | string) - -// Review-Queue organisieren -organizeReviewQueue(cards: CardProgress[]) -``` - -## Best Practices - -### Für Nutzer - -1. **Ehrliche Bewertung**: Bewerte Karten ehrlich für optimale Intervalle -2. **Tägliches Lernen**: Regelmäßigkeit ist wichtiger als Intensität -3. **Reviews priorisieren**: Fällige Reviews vor neuen Karten - -### Für Entwickler - -1. **Ease Factor Grenzen**: Nie unter 1.3 fallen lassen -2. **Timezone-Handling**: Reviews um 4 Uhr morgens zurücksetzen -3. **Progress Backup**: Regelmäßig in Datenbank persistieren - -## Wissenschaftliche Grundlagen - -### Forschung -- Basiert auf Piotr Wozniak's SuperMemo Forschung (1987) -- Ebbinghaus Vergessenskurve (1885) -- Cognitive Science Prinzipien - -### Effektivität -- **Studien zeigen**: 50% weniger Lernzeit bei gleicher Retention -- **Langzeit-Retention**: Bis zu 95% nach 1 Jahr möglich -- **Optimal für**: Vokabeln, Fakten, Formeln, Konzepte - -## Vergleich mit anderen Systemen - -| Feature | Cards | Anki | Quizlet | -|---------|----------|------|---------| -| Algorithmus | SM-2 | SM-2+ | Proprietary | -| Open Source | ✅ | ✅ | ❌ | -| Cloud Sync | ✅ | Partial | ✅ | -| Mobile App | ✅ | ✅ | ✅ | -| Kostenlos | ✅ | ✅ | Freemium | - -## Zukünftige Verbesserungen - -### Geplant -- [ ] FSRS (Free Spaced Repetition Scheduler) als Alternative -- [ ] Machine Learning für personalisierte Intervalle -- [ ] Heatmap-Kalender für Lernstreak -- [ ] Detaillierte Statistiken pro Karte -- [ ] Import/Export von Anki-Decks - -### Experimentell -- [ ] Adaptive Tageszeit-Optimierung -- [ ] Kontext-basierte Schwierigkeit -- [ ] Gruppen-Lernstatistiken - -## Troubleshooting - -### Problem: Zu viele Reviews -**Lösung**: Tägliches Limit einführen, schwierige Karten vereinfachen - -### Problem: Karten werden zu schnell vergessen -**Lösung**: Ease Factor manuell reduzieren, mehr Kontext hinzufügen - -### Problem: Intervalle zu lang -**Lösung**: Bei Unsicherheit "Schwer" statt "Gut" wählen - -## Fazit - -Das Spaced Repetition System in Cards bietet eine wissenschaftlich fundierte, effiziente Methode zum Langzeit-Lernen. Durch die SM-2 Implementation erreichen Nutzer optimale Lernresultate mit minimalem Zeitaufwand. - ---- - -*Letzte Aktualisierung: November 2024* -*Version: 1.0.0* \ No newline at end of file diff --git a/apps/cards/apps/mobile/Docs/user-guides/deck-creation.md b/apps/cards/apps/mobile/Docs/user-guides/deck-creation.md deleted file mode 100644 index dc62adf2a..000000000 --- a/apps/cards/apps/mobile/Docs/user-guides/deck-creation.md +++ /dev/null @@ -1,154 +0,0 @@ -# Decks erstellen in Cards - -## Übersicht - -Cards ermöglicht es Benutzern, eigene Lernkarten-Decks zu erstellen und zu verwalten. Diese Anleitung zeigt dir, wie du neue Decks erstellen und konfigurieren kannst. - -## Deck-Erstellung Schritt für Schritt - -### 1. Deck-Erstellung starten - -Es gibt mehrere Wege, ein neues Deck zu erstellen: - -- **Home-Seite**: Klicke auf den "Neues Deck erstellen" Button im Schnellstart-Bereich -- **Decks-Seite**: Wenn noch keine Decks vorhanden sind, klicke auf "Deck erstellen" -- **Direkter Weg**: Navigiere zu `/deck/create` - -### 2. Deck-Informationen eingeben - -Beim Erstellen eines neuen Decks musst du folgende Informationen angeben: - -#### Grunddaten - -- **Titel**: Ein aussagekräftiger Name für dein Deck -- **Beschreibung**: Eine kurze Erklärung, worum es in dem Deck geht -- **Kategorie**: Wähle eine passende Kategorie (Sprachen, Wissenschaft, Mathematik, etc.) - -#### Sichtbarkeits-Einstellungen - -- **Privat**: Nur du kannst das Deck sehen und verwenden -- **Öffentlich**: Andere Benutzer können dein Deck in der Explore-Sektion finden - -### 3. Karten hinzufügen - -Nach der Deck-Erstellung kannst du Karten hinzufügen: - -#### Kartentypen - -Cards unterstützt verschiedene Kartentypen: - -1. **Text-Karten**: Klassische Vorderseite/Rückseite Karten -2. **Bild-Karten**: Karten mit Bildern -3. **Audio-Karten**: Karten mit Audiodateien -4. **Multiple-Choice**: Karten mit Auswahlmöglichkeiten - -#### Karten-Erstellung - -- **Vorderseite**: Die Frage oder der Begriff -- **Rückseite**: Die Antwort oder Erklärung -- **Hinweise**: Optionale Hilfestellungen -- **Tags**: Zur besseren Organisation und Suche - -### 4. KI-unterstützte Erstellung - -Cards bietet KI-Features zur Deck-Erstellung: - -#### Smart Card Creator - -- Automatische Generierung von Karten basierend auf einem Thema -- KI schlägt passende Fragen und Antworten vor -- Unterstützt verschiedene Schwierigkeitsgrade - -#### Image Card Creator - -- Erstellung von Bildkarten mit KI-generierten oder hochgeladenen Bildern -- Automatische Beschreibungen und Fragen zu Bildern - -### 5. Deck-Verwaltung - -#### Einstellungen - -- **Metadaten bearbeiten**: Titel, Beschreibung, Kategorie ändern -- **Sichtbarkeit**: Zwischen privat und öffentlich wechseln -- **Tags**: Deck-Tags für bessere Organisation - -#### Organisation - -- **Favoriten**: Wichtige Decks als Favoriten markieren -- **Sortierung**: Decks nach verschiedenen Kriterien sortieren -- **Suchfunktion**: Decks schnell finden - -## Best Practices - -### Deck-Design - -1. **Klare Titel**: Verwende aussagekräftige und spezifische Titel -2. **Gute Beschreibungen**: Erkläre kurz, was gelernt wird und für wen das Deck geeignet ist -3. **Konsistente Struktur**: Halte das Format der Karten einheitlich -4. **Angemessene Größe**: 20-50 Karten pro Deck für optimales Lernen - -### Karten-Gestaltung - -1. **Eine Idee pro Karte**: Jede Karte sollte nur ein Konzept behandeln -2. **Klare Formulierungen**: Vermeide mehrdeutige Fragen -3. **Sinnvolle Reihenfolge**: Ordne Karten logisch an -4. **Regelmäßige Updates**: Überarbeite und verbessere deine Karten - -### Öffentliche Decks - -Wenn du dein Deck öffentlich machst: - -1. **Qualität sicherstellen**: Überprüfe alle Karten auf Richtigkeit -2. **Vollständigkeit**: Stelle sicher, dass das Deck ein Thema vollständig abdeckt -3. **Zielgruppe definieren**: Gib an, für wen das Deck geeignet ist -4. **Lizenz beachten**: Verwende nur Inhalte, die du verwenden darfst - -## Technische Details - -### Datenbankstruktur - -Decks werden in der `decks` Tabelle gespeichert mit folgenden Feldern: - -- `id`: Eindeutige ID -- `title`: Deck-Titel -- `description`: Beschreibung -- `is_public`: Sichtbarkeits-Flag -- `user_id`: Ersteller-ID -- `category`: Kategorie -- `created_at`: Erstellungsdatum -- `metadata`: Zusätzliche Informationen (JSON) - -### API-Endpunkte - -- `POST /api/decks`: Neues Deck erstellen -- `PUT /api/decks/:id`: Deck bearbeiten -- `DELETE /api/decks/:id`: Deck löschen -- `GET /api/decks/public`: Öffentliche Decks abrufen - -## Fehlerbehebung - -### Häufige Probleme - -1. **Deck wird nicht gespeichert** - - Überprüfe die Internetverbindung - - Stelle sicher, dass alle Pflichtfelder ausgefüllt sind - -2. **Karten werden nicht angezeigt** - - Lade die Seite neu - - Überprüfe, ob die Karten korrekt gespeichert wurden - -3. **Bilder werden nicht hochgeladen** - - Überprüfe die Dateigröße (max. 5MB) - - Unterstützte Formate: JPG, PNG, WebP - -## Support - -Bei Problemen oder Fragen: - -- Überprüfe diese Dokumentation -- Schaue in die FAQ-Sektion -- Kontaktiere den Support über die App - ---- - -_Letzte Aktualisierung: 2025-09-24_ diff --git a/apps/cards/apps/mobile/Docs/user-guides/public-deck-suggestions.md b/apps/cards/apps/mobile/Docs/user-guides/public-deck-suggestions.md deleted file mode 100644 index fb3f9ad18..000000000 --- a/apps/cards/apps/mobile/Docs/user-guides/public-deck-suggestions.md +++ /dev/null @@ -1,278 +0,0 @@ -# Vorschläge für öffentliche Decks - -## Übersicht - -Diese Liste enthält Vorschläge für hochwertige öffentliche Decks, die der Cards-Community zugute kommen würden. Diese Decks können von Admins oder erfahrenen Benutzern erstellt und als Startinhalt für die Plattform verwendet werden. - -## 🌍 Sprachen - -### Deutsch für Anfänger - -- **Zielgruppe**: Deutschlernende (A1-A2 Niveau) -- **Inhalt**: Grundwortschatz, häufige Phrasen, Zahlen, Farben -- **Kartenzahl**: ~100 Karten -- **Besonderheiten**: Audio-Karten für Aussprache - -### English Business Vocabulary - -- **Zielgruppe**: Berufstätige, Studenten -- **Inhalt**: Geschäftsvokabular, Meeting-Phrasen, E-Mail-Formulierungen -- **Kartenzahl**: ~75 Karten -- **Besonderheiten**: Kontextuelle Beispiele - -### Französische Verben (Présent) - -- **Zielgruppe**: Französischlernende (A2-B1) -- **Inhalt**: Konjugation häufiger Verben im Präsens -- **Kartenzahl**: ~80 Karten -- **Besonderheiten**: Irregular verbs highlighted - -### Spanisch: Reisevokabular - -- **Zielgruppe**: Reisende, Touristen -- **Inhalt**: Hotel, Restaurant, Transport, Notfälle -- **Kartenzahl**: ~60 Karten -- **Besonderheiten**: Situative Phrasen - -## 🧬 Wissenschaft - -### Grundlagen der Chemie - -- **Zielgruppe**: Schüler, Studienanfänger -- **Inhalt**: Periodensystem, chemische Formeln, Grundreaktionen -- **Kartenzahl**: ~90 Karten -- **Besonderheiten**: Strukturformeln als Bilder - -### Anatomie: Skelett-System - -- **Zielgruppe**: Medizinstudenten, Interessierte -- **Inhalt**: Knochen, Gelenke, anatomische Begriffe -- **Kartenzahl**: ~120 Karten -- **Besonderheiten**: Anatomische Diagramme - -### Physik: Mechanik Formeln - -- **Zielgruppe**: Schüler, Studenten -- **Inhalt**: Grundformeln der Mechanik, Einheiten, Konstanten -- **Kartenzahl**: ~50 Karten -- **Besonderheiten**: Formel-Karten mit Erklärungen - -### Biologie: Zellbiologie - -- **Zielgruppe**: Schüler, Biologiestudenten -- **Inhalt**: Zellorganellen, Funktionen, Prozesse -- **Kartenzahl**: ~70 Karten -- **Besonderheiten**: Mikroskopische Bilder - -## 🧮 Mathematik - -### Grundrechenarten für Kinder - -- **Zielgruppe**: Grundschüler (6-10 Jahre) -- **Inhalt**: Addition, Subtraktion, kleines Einmaleins -- **Kartenzahl**: ~100 Karten -- **Besonderheiten**: Bunte, kinderfreundliche Gestaltung - -### Algebra: Grundformeln - -- **Zielgruppe**: Schüler (7.-10. Klasse) -- **Inhalt**: Binomische Formeln, Gleichungen, Terme -- **Kartenzahl**: ~45 Karten -- **Besonderheiten**: Schritt-für-Schritt Lösungen - -### Geometrie: Flächenberechnung - -- **Zielgruppe**: Schüler, Handwerker -- **Inhalt**: Formeln für Kreis, Dreieck, Rechteck, etc. -- **Kartenzahl**: ~30 Karten -- **Besonderheiten**: Visualisierungen der Formeln - -### Statistik Grundlagen - -- **Zielgruppe**: Studenten, Berufstätige -- **Inhalt**: Mittelwert, Median, Standardabweichung -- **Kartenzahl**: ~40 Karten -- **Besonderheiten**: Praktische Beispiele - -## 🏛️ Geschichte - -### Deutsche Geschichte: 20. Jahrhundert - -- **Zielgruppe**: Schüler, Geschichtsinteressierte -- **Inhalt**: Wichtige Ereignisse, Personen, Daten -- **Kartenzahl**: ~80 Karten -- **Besonderheiten**: Historische Fotos - -### Antikes Rom - -- **Zielgruppe**: Geschichtsstudenten, Interessierte -- **Inhalt**: Kaiser, Schlachten, Kultur, Architektur -- **Kartenzahl**: ~100 Karten -- **Besonderheiten**: Karten und Abbildungen - -### Zweiter Weltkrieg: Schlüsselereignisse - -- **Zielgruppe**: Oberstufenschüler, Studenten -- **Inhalt**: Wichtige Schlachten, Wendepunkte, Personen -- **Kartenzahl**: ~60 Karten -- **Besonderheiten**: Chronologische Anordnung - -## 🎨 Kunst & Kultur - -### Berühmte Gemälde und ihre Maler - -- **Zielgruppe**: Kunstinteressierte, Studenten -- **Inhalt**: Meisterwerke, Künstler, Epochen -- **Kartenzahl**: ~75 Karten -- **Besonderheiten**: Hochauflösende Kunstwerke - -### Klassische Musik: Komponisten - -- **Zielgruppe**: Musikliebhaber, Studenten -- **Inhalt**: Biografien, wichtige Werke, Epochen -- **Kartenzahl**: ~50 Karten -- **Besonderheiten**: Audio-Snippets der Werke - -### Architektur-Stile - -- **Zielgruppe**: Architekturstudenten, Interessierte -- **Inhalt**: Gotik, Renaissance, Bauhaus, etc. -- **Kartenzahl**: ~40 Karten -- **Besonderheiten**: Beispielgebäude mit Fotos - -## 💻 Technologie - -### HTML & CSS Grundlagen - -- **Zielgruppe**: Webentwicklung-Anfänger -- **Inhalt**: Tags, Properties, Selektoren -- **Kartenzahl**: ~85 Karten -- **Besonderheiten**: Code-Beispiele - -### JavaScript: Array-Methoden - -- **Zielgruppe**: Programmier-Anfänger -- **Inhalt**: map, filter, reduce, forEach, etc. -- **Kartenzahl**: ~25 Karten -- **Besonderheiten**: Praktische Beispiele - -### Git-Befehle - -- **Zielgruppe**: Entwickler, Studenten -- **Inhalt**: Häufige Git-Commands und ihre Funktionen -- **Kartenzahl**: ~35 Karten -- **Besonderheiten**: Terminal-Syntax - -### Cybersecurity Basics - -- **Zielgruppe**: IT-Interessierte, Berufstätige -- **Inhalt**: Begriffe, Bedrohungen, Schutzmaßnahmen -- **Kartenzahl**: ~55 Karten -- **Besonderheiten**: Aktuelle Beispiele - -## 🏥 Medizin & Gesundheit - -### Erste Hilfe - -- **Zielgruppe**: Allgemeine Bevölkerung -- **Inhalt**: Notfallmaßnahmen, Telefonnummern, Handlungsschritte -- **Kartenzahl**: ~40 Karten -- **Besonderheiten**: Lebensrettende Informationen - -### Medikamente: Häufige Wirkstoffe - -- **Zielgruppe**: Medizinstudenten, Pflegekräfte -- **Inhalt**: Wirkstoffnamen, Anwendungsgebiete, Nebenwirkungen -- **Kartenzahl**: ~60 Karten -- **Besonderheiten**: Systematische Kategorisierung - -### Anatomie: Herz-Kreislauf-System - -- **Zielgruppe**: Medizinstudenten -- **Inhalt**: Herzfunktion, Blutkreislauf, Erkrankungen -- **Kartenzahl**: ~80 Karten -- **Besonderheiten**: Medizinische Diagramme - -## 🌱 Nachhaltigkeit & Umwelt - -### Klimawandel: Grundlagen - -- **Zielgruppe**: Schüler, umweltbewusste Menschen -- **Inhalt**: Ursachen, Folgen, Lösungsansätze -- **Kartenzahl**: ~50 Karten -- **Besonderheiten**: Aktuelle Daten und Grafiken - -### Recycling & Müllvermeidung - -- **Zielgruppe**: Haushalte, umweltbewusste Menschen -- **Inhalt**: Mülltrennung, Wiederverwertung, Tipps -- **Kartenzahl**: ~30 Karten -- **Besonderheiten**: Praktische Alltagstipps - -## 🍳 Alltag & Freizeit - -### Kochen: Grundtechniken - -- **Zielgruppe**: Kochanfänger -- **Inhalt**: Schneidetechniken, Garmethoden, Begriffe -- **Kartenzahl**: ~45 Karten -- **Besonderheiten**: Step-by-step Anleitungen - -### Gartenpflege: Saisonkalender - -- **Zielgruppe**: Hobbygärtner -- **Inhalt**: Pflanzzeiten, Pflegetipps, häufige Pflanzen -- **Kartenzahl**: ~65 Karten -- **Besonderheiten**: Monatsbasierte Organisation - -### Finanzbildung: Grundlagen - -- **Zielgruppe**: Junge Erwachsene, Finanzinteressierte -- **Inhalt**: Sparen, Investieren, Versicherungen -- **Kartenzahl**: ~50 Karten -- **Besonderheiten**: Praktische Tipps und Beispiele - -## Implementierungsrichtlinien - -### Qualitätsstandards - -1. **Faktische Richtigkeit**: Alle Informationen müssen korrekt und aktuell sein -2. **Quellenangaben**: Bei wissenschaftlichen/historischen Inhalten Quellen angeben -3. **Altersangemessenheit**: Inhalte an die Zielgruppe anpassen -4. **Rechtliche Aspekte**: Urheberrechte bei Bildern und Inhalten beachten - -### Technische Anforderungen - -1. **Einheitliche Formatierung**: Konsistente Kartenerstellung -2. **Multimedia**: Bilder in hoher Qualität, Audio in guter Qualität -3. **Kategorisierung**: Richtige Zuordnung zu Kategorien -4. **Tags**: Aussagekräftige Tags für bessere Auffindbarkeit - -### Priorisierung - -**Phase 1** (Sofort umsetzen): - -- Deutsch für Anfänger -- HTML & CSS Grundlagen -- Erste Hilfe -- Grundrechenarten für Kinder - -**Phase 2** (Nach Nutzerfeedback): - -- English Business Vocabulary -- Deutsche Geschichte: 20. Jahrhundert -- Grundlagen der Chemie - -**Phase 3** (Erweiterung): - -- Spezialisierte Decks basierend auf Nutzeranfragen - -## Wartung und Updates - -- **Regelmäßige Überprüfung**: Halbjährliche Kontrolle auf Aktualität -- **Community-Feedback**: Nutzervorschläge für Verbesserungen -- **Erweiterungen**: Neue Karten basierend auf Lernfortschritt-Daten - ---- - -_Letzte Aktualisierung: 2025-09-24_ diff --git a/apps/cards/apps/mobile/SPACING_MIGRATION.md b/apps/cards/apps/mobile/SPACING_MIGRATION.md deleted file mode 100644 index 4f61d96fb..000000000 --- a/apps/cards/apps/mobile/SPACING_MIGRATION.md +++ /dev/null @@ -1,126 +0,0 @@ -# Spacing System Migration - Completed ✅ - -## Zentrales Spacing-System - -Alle Abstände in der App werden jetzt zentral über `utils/spacing.ts` verwaltet. - -### Import - -```tsx -import { spacing } from '~/utils/spacing'; -``` - -### Verwendung - -#### Container/Screen Padding -```tsx - -``` - -#### Section Spacing (zwischen Cards) -```tsx - -``` - -#### Content Spacing -```tsx -// Titel Abstand -Titel - -// Item Abstand - - -// Kleine Abstände - -``` - -## Migration Status - Alle Screens ✅ - -### Tab Screens (Main Navigation) -✅ app/(tabs)/decks/index.tsx -✅ app/(tabs)/explore/index.tsx -✅ app/(tabs)/progress/index.tsx -✅ app/(tabs)/profile/index.tsx - -### Deck Screens -✅ app/deck/[id].tsx (Detail Screen) -✅ app/deck/create.tsx -✅ app/deck/[id]/edit.tsx - -### Card Screens -✅ app/card/create.tsx -✅ app/card/edit/[id].tsx - -### Study Screens -✅ app/study/session/[id].tsx -✅ app/study/summary/[id].tsx - -### Auth Screens -✅ app/(auth)/login.tsx -✅ app/(auth)/register.tsx -✅ app/(auth)/forgot-password.tsx - -## Spacing Reference - -```typescript -spacing = { - // Base Units (4px increments) - xs: 4, - sm: 8, - md: 12, - lg: 16, - xl: 24, - xxl: 32, - xxxl: 48, - - // Semantic Spacing - container: { - horizontal: 16, // Standard horizontal padding - vertical: 24, // Standard vertical padding - top: 24, // Top padding after PageHeader - bottom: 24, // Bottom padding before elements - }, - - section: 24, // Gap between major sections/cards - - card: { - gap: 24, // Gap between cards - padding: 16, // Internal card padding - }, - - content: { - title: 16, // Space after section titles - item: 16, // Space between list items - small: 12, // Small spacing between related elements - micro: 8, // Very small spacing - }, - - header: { - paddingBottom: 16, - }, - - tabBar: { - clearance: 100, // Bottom padding to clear tab bar - }, -} -``` - -## Benefits - -✅ **Zentrale Verwaltung** - Alle Abstände an einem Ort -✅ **Konsistenz** - Gleiche Werte über die ganze App -✅ **Wartbarkeit** - Einfach änderbar -✅ **Semantisch** - Klare Bedeutung statt magische Zahlen -✅ **TypeScript Support** - Vollständige Type-Safety -✅ **Skalierbar** - Kann pro Theme angepasst werden - -## Nächste Schritte - -Das Spacing-System ist vollständig implementiert. Zukünftige Screens sollten das System von Anfang an nutzen: - -```tsx -import { spacing } from '~/utils/spacing'; - -// In Komponenten - -``` diff --git a/apps/cards/apps/mobile/Setup_Docs/SupabaseMCPClaudeCodeSetup.md b/apps/cards/apps/mobile/Setup_Docs/SupabaseMCPClaudeCodeSetup.md deleted file mode 100644 index 2b340ba05..000000000 --- a/apps/cards/apps/mobile/Setup_Docs/SupabaseMCPClaudeCodeSetup.md +++ /dev/null @@ -1,88 +0,0 @@ -Was ist Supabase MCP in Claude Code? -Supabase MCP ist eine Schnittstelle, die es Claude Code ermöglicht, über das Model Context Protocol mit Supabase zu interagieren. Dadurch kannst du deine Supabase-Projekte direkt über Claude Code verwalten – also Tabellen erstellen, SQL-Abfragen ausführen, Funktionen schreiben und vieles mehr – alles per natürlicher Sprache ohne manuelle Bedienung des Dashboards. - -Schritt-für-Schritt Anleitung zur Einrichtung - -1. Supabase Personal Access Token (PAT) erstellen - Gehe im Supabase-Dashboard zu Account Settings (oben rechts auf dein Profilbild klicken). - -Navigiere zu Access Tokens. - -Klicke auf Generate New Token, gib ihm z.B. den Namen „ClaudeCodeMCP“ und speichere den Token sicher ab (du kannst ihn später nicht nochmal einsehen). - -2. Supabase MCP in Claude Code konfigurieren - -Variante A: Projektbezogen (über .mcp.json-Datei) -Erstelle im Root-Verzeichnis deines Projekts eine Datei namens .mcp.json (falls noch nicht vorhanden). - -Füge folgende Konfiguration hinzu, ersetze mit deinem Supabase-Projekt-Referenz und mit deinem PAT: - -json -{ -"mcpServers": { -"supabase": { -"command": "npx", -"args": [ -"-y", -"@supabase/mcp-server-supabase@latest", -"--read-only", -"--project-ref=" -], -"env": { -"SUPABASE_ACCESS_TOKEN": "" -} -} -} -} -Speichere die Datei und starte Claude Code neu, damit die Konfiguration wirksam wird. - -3. Nutzung in Claude Code - Nach erfolgreicher Einrichtung siehst du im Chat-Bereich von Claude Code das MCP-Symbol (Hammer). - -Du kannst Claude nun mithilfe natürlicher Sprache anweisen, Supabase-Aktionen auszuführen, z.B.: - -text -Create a new table called comments with columns id, text, user_id. -Fetch all rows from the comments table. -Add an RLS policy that allows only the owner to update their comment. -Claude übersetzt diese Befehle in API-Aufrufe und SQL-Statements und führt sie in Supabase aus. - -Zusammenfassung -Erstelle einen Supabase Personal Access Token. - -Konfiguriere Supabase MCP entweder durch .mcp.json oder CLI in Claude Code. - -Starte Claude Code neu und nutze die MCP-Schnittstelle, um Supabase per natürlicher Sprache zu steuern. - -So kannst du deine Supabase-Datenbanken, Funktionen und Policies bequem aus deinem Terminal über Claude Code verwalten, ohne Umwege über das Web-Dashboard. - -Wenn du möchtest, kann ich dir auch eine Beispiel-.mcp.json-Datei zum einfachen Kopieren erstellen. - -# Credetials - -Die Supabase-Credentials, die du für die Einrichtung von Supabase MCP in Claude Code brauchst, findest und erstellst du so: - -Personal Access Token (PAT) erstellen: - -Melde dich im Supabase-Dashboard an. - -Gehe oben rechts auf dein Profilbild und klicke auf Settings (Einstellungen). - -Wähle dort den Bereich Access Tokens aus. - -Klicke auf Generate New Token (Neues Token generieren). - -Gib dem Token einen Namen (z.B. „ClaudeCodeMCP“) und speichere es ab. Das Token wird nur einmal angezeigt, also sichere es gut. - -Projekt-URL bzw. Project Ref: -Du findest den Projekt-Referenzcode (project-ref) in deinem Projekt-Dashboard unter Settings > General > Project API keys oder meist in der URL deines Projekts als Kurzbezeichnung (z.B. abcdefg). - -Diese beiden Credentials brauchst du für die Supabase MCP-Konfiguration: - -Project Ref (dein Supabase Projekt-Identifikator) - -Personal Access Token (zum autorisierten Zugriff per MCP) - -Diese Daten gibst du dann z.B. in der .mcp.json oder im CLI-Befehl von Claude Code für Supabase MCP als Umgebungsvariable SUPABASE_ACCESS_TOKEN und als project-ref an. - -# Entferne das Read only flag um auch in die datenbank schreiben zu können diff --git a/apps/cards/apps/mobile/app-env.d.ts b/apps/cards/apps/mobile/app-env.d.ts deleted file mode 100644 index 88dc403ea..000000000 --- a/apps/cards/apps/mobile/app-env.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -// @ts-ignore -/// diff --git a/apps/cards/apps/mobile/app.config.ts b/apps/cards/apps/mobile/app.config.ts deleted file mode 100644 index 05e17f838..000000000 --- a/apps/cards/apps/mobile/app.config.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { ExpoConfig, ConfigContext } from 'expo/config'; - -const IS_DEV = process.env.EAS_BUILD_PROFILE === 'development'; - -export default ({ config }: ConfigContext): ExpoConfig => { - // Base plugins for all builds - const basePlugins = [ - 'expo-router', - 'expo-font', - 'expo-web-browser', - [ - 'expo-image-picker', - { - photosPermission: - 'Diese App benötigt Zugriff auf deine Fotos, um Bilder für Lernkarten auszuwählen.', - cameraPermission: - 'Diese App benötigt Zugriff auf die Kamera, um Fotos für Lernkarten aufzunehmen.', - }, - ], - [ - 'expo-build-properties', - { - ios: { - deploymentTarget: '16.0', - newArchEnabled: true, - }, - android: { - targetSdkVersion: 36, - compileSdkVersion: 36, - newArchEnabled: true, - }, - }, - ], - ]; - - // Only add dev-launcher in development builds - const plugins = IS_DEV - ? [ - ...basePlugins, - [ - 'expo-dev-launcher', - { - launchMode: 'most-recent', - }, - ], - ] - : basePlugins; - - return { - ...config, - plugins, - }; -}; diff --git a/apps/cards/apps/mobile/app.json b/apps/cards/apps/mobile/app.json deleted file mode 100644 index 0f340870c..000000000 --- a/apps/cards/apps/mobile/app.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "expo": { - "name": "cards", - "slug": "cards", - "version": "1.0.0", - "scheme": "cards", - "runtimeVersion": { - "policy": "appVersion" - }, - "web": { - "bundler": "metro", - "output": "static", - "favicon": "./assets/favicon.png" - }, - "experiments": { - "typedRoutes": true, - "tsconfigPaths": true - }, - "orientation": "portrait", - "icon": "./assets/icon.png", - "userInterfaceStyle": "light", - "splash": { - "image": "./assets/splash.png", - "resizeMode": "contain", - "backgroundColor": "#ffffff" - }, - "assetBundlePatterns": ["**/*"], - "ios": { - "supportsTablet": true, - "bundleIdentifier": "com.tilljs.cards", - "infoPlist": { - "ITSAppUsesNonExemptEncryption": false, - "NSMicrophoneUsageDescription": "Diese App benötigt Zugriff auf das Mikrofon, um Sprachaufnahmen für die Lernkarten-Erstellung zu ermöglichen.", - "NSCameraUsageDescription": "Diese App benötigt Zugriff auf die Kamera, um Fotos für die Lernkarten-Erstellung aufzunehmen.", - "NSPhotoLibraryUsageDescription": "Diese App benötigt Zugriff auf die Fotobibliothek, um Bilder für die Lernkarten-Erstellung auszuwählen.", - "NSSpeechRecognitionUsageDescription": "Diese App verwendet Spracherkennung, um Sprachaufnahmen in Text umzuwandeln.", - "NSDocumentsFolderUsageDescription": "Diese App benötigt Zugriff auf Dokumente, um Lernmaterialien zu importieren." - }, - "appleTeamId": "QP3GLU8PH3" - }, - "android": { - "adaptiveIcon": { - "foregroundImage": "./assets/adaptive-icon.png", - "backgroundColor": "#ffffff" - }, - "package": "com.tilljs.cards", - "permissions": [ - "android.permission.RECORD_AUDIO", - "android.permission.CAMERA", - "android.permission.READ_EXTERNAL_STORAGE", - "android.permission.WRITE_EXTERNAL_STORAGE" - ] - }, - "extra": { - "router": {}, - "eas": { - "projectId": "6cb9cf81-a4d5-4c72-b57d-1be3da8eba35" - } - }, - "plugins": ["expo-router"] - } -} diff --git a/apps/cards/apps/mobile/app/(auth)/_layout.tsx b/apps/cards/apps/mobile/app/(auth)/_layout.tsx deleted file mode 100644 index 8b45f9d59..000000000 --- a/apps/cards/apps/mobile/app/(auth)/_layout.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { Stack } from 'expo-router'; - -export default function AuthLayout() { - return ( - - - - - - ); -} diff --git a/apps/cards/apps/mobile/app/(auth)/forgot-password.tsx b/apps/cards/apps/mobile/app/(auth)/forgot-password.tsx deleted file mode 100644 index 9bd27dbae..000000000 --- a/apps/cards/apps/mobile/app/(auth)/forgot-password.tsx +++ /dev/null @@ -1,171 +0,0 @@ -import React, { useState } from 'react'; -import { View, ScrollView, KeyboardAvoidingView, Platform, Pressable, Alert } from 'react-native'; -import { Link, router } from 'expo-router'; -import { SafeAreaView } from 'react-native-safe-area-context'; -import { Text } from '~/components/ui/Text'; -import { Icon } from '~/components/ui/Icon'; -import { useAuthStore } from '../../store/authStore'; -import { Button } from '../../components/ui/Button'; -import { Input } from '../../components/ui/Input'; -import { Card } from '../../components/ui/Card'; -import { useThemeColors } from '~/utils/themeUtils'; -import { spacing } from '~/utils/spacing'; - -export default function ForgotPasswordScreen() { - const [email, setEmail] = useState(''); - const [errors, setErrors] = useState<{ email?: string }>({}); - const [isSubmitted, setIsSubmitted] = useState(false); - const colors = useThemeColors(); - - const { resetPassword, isLoading, clearError } = useAuthStore(); - - const validateForm = () => { - const newErrors: { email?: string } = {}; - - if (!email) { - newErrors.email = 'E-Mail ist erforderlich'; - } else if (!/\S+@\S+\.\S+/.test(email)) { - newErrors.email = 'Ungültige E-Mail-Adresse'; - } - - setErrors(newErrors); - return Object.keys(newErrors).length === 0; - }; - - const handleResetPassword = async () => { - if (!validateForm()) return; - - try { - clearError(); - await resetPassword(email); - setIsSubmitted(true); - } catch (err: any) { - Alert.alert('Zurücksetzen fehlgeschlagen', err.message || 'Ein Fehler ist aufgetreten'); - } - }; - - if (isSubmitted) { - return ( - - - - - - - - - E-Mail gesendet! - - - - Wir haben dir eine E-Mail mit Anweisungen zum Zurücksetzen deines Passworts an {email}{' '} - gesendet. - - - - - - - ); - } - - return ( - - - - - router.back()} - style={{ marginBottom: spacing.xl, flexDirection: 'row', alignItems: 'center' }} - > - - Zurück - - - - - - Passwort vergessen? - - - Kein Problem! Gib deine E-Mail-Adresse ein und wir senden dir Anweisungen zum - Zurücksetzen. - - - - - - - - - - Erinnerst du dich wieder? - - - Anmelden - - - - - - - - - - ); -} diff --git a/apps/cards/apps/mobile/app/(auth)/login.tsx b/apps/cards/apps/mobile/app/(auth)/login.tsx deleted file mode 100644 index 2e653337a..000000000 --- a/apps/cards/apps/mobile/app/(auth)/login.tsx +++ /dev/null @@ -1,139 +0,0 @@ -import React, { useState } from 'react'; -import { View, ScrollView, KeyboardAvoidingView, Platform, Pressable, Alert } from 'react-native'; -import { Link, router } from 'expo-router'; -import { SafeAreaView } from 'react-native-safe-area-context'; -import { Text } from '~/components/ui/Text'; -import { useAuthStore } from '../../store/authStore'; -import { Button } from '../../components/ui/Button'; -import { Input } from '../../components/ui/Input'; -import { Card } from '../../components/ui/Card'; -import { useThemeColors } from '~/utils/themeUtils'; -import { spacing } from '~/utils/spacing'; - -export default function LoginScreen() { - const [email, setEmail] = useState(''); - const [password, setPassword] = useState(''); - const [errors, setErrors] = useState<{ email?: string; password?: string }>({}); - const colors = useThemeColors(); - - const { signIn, isLoading, error, clearError } = useAuthStore(); - - const validateForm = () => { - const newErrors: { email?: string; password?: string } = {}; - - if (!email) { - newErrors.email = 'E-Mail ist erforderlich'; - } else if (!/\S+@\S+\.\S+/.test(email)) { - newErrors.email = 'Ungültige E-Mail-Adresse'; - } - - if (!password) { - newErrors.password = 'Passwort ist erforderlich'; - } else if (password.length < 6) { - newErrors.password = 'Passwort muss mindestens 6 Zeichen lang sein'; - } - - setErrors(newErrors); - return Object.keys(newErrors).length === 0; - }; - - const handleLogin = async () => { - if (!validateForm()) return; - - try { - clearError(); - await signIn(email, password); - router.replace('/(tabs)'); - } catch (err: any) { - Alert.alert('Login fehlgeschlagen', err.message || 'Ein Fehler ist aufgetreten'); - } - }; - - return ( - - - - - - - Willkommen zurück - - - Melde dich an, um fortzufahren - - - - - - - - - - - - Passwort vergessen? - - - - - - - - Noch kein Konto? - - - Registrieren - - - - - - - - - ); -} diff --git a/apps/cards/apps/mobile/app/(auth)/register.tsx b/apps/cards/apps/mobile/app/(auth)/register.tsx deleted file mode 100644 index 874671387..000000000 --- a/apps/cards/apps/mobile/app/(auth)/register.tsx +++ /dev/null @@ -1,174 +0,0 @@ -import React, { useState } from 'react'; -import { View, ScrollView, KeyboardAvoidingView, Platform, Pressable, Alert } from 'react-native'; -import { Link, router } from 'expo-router'; -import { SafeAreaView } from 'react-native-safe-area-context'; -import { Text } from '~/components/ui/Text'; -import { useAuthStore } from '../../store/authStore'; -import { Button } from '../../components/ui/Button'; -import { Input } from '../../components/ui/Input'; -import { Card } from '../../components/ui/Card'; -import { useThemeColors } from '~/utils/themeUtils'; -import { spacing } from '~/utils/spacing'; - -export default function RegisterScreen() { - const [username, setUsername] = useState(''); - const [email, setEmail] = useState(''); - const [password, setPassword] = useState(''); - const [confirmPassword, setConfirmPassword] = useState(''); - const [errors, setErrors] = useState<{ - username?: string; - email?: string; - password?: string; - confirmPassword?: string; - }>({}); - const colors = useThemeColors(); - - const { signUp, isLoading, clearError } = useAuthStore(); - - const validateForm = () => { - const newErrors: typeof errors = {}; - - if (!username) { - newErrors.username = 'Benutzername ist erforderlich'; - } else if (username.length < 3) { - newErrors.username = 'Benutzername muss mindestens 3 Zeichen lang sein'; - } - - if (!email) { - newErrors.email = 'E-Mail ist erforderlich'; - } else if (!/\S+@\S+\.\S+/.test(email)) { - newErrors.email = 'Ungültige E-Mail-Adresse'; - } - - if (!password) { - newErrors.password = 'Passwort ist erforderlich'; - } else if (password.length < 6) { - newErrors.password = 'Passwort muss mindestens 6 Zeichen lang sein'; - } - - if (!confirmPassword) { - newErrors.confirmPassword = 'Passwort-Bestätigung ist erforderlich'; - } else if (password !== confirmPassword) { - newErrors.confirmPassword = 'Passwörter stimmen nicht überein'; - } - - setErrors(newErrors); - return Object.keys(newErrors).length === 0; - }; - - const handleRegister = async () => { - if (!validateForm()) return; - - try { - clearError(); - await signUp(email, password, username); - Alert.alert( - 'Registrierung erfolgreich!', - 'Bitte überprüfe deine E-Mail, um dein Konto zu bestätigen.', - [{ text: 'OK', onPress: () => router.replace('/(auth)/login') }] - ); - } catch (err: any) { - Alert.alert('Registrierung fehlgeschlagen', err.message || 'Ein Fehler ist aufgetreten'); - } - }; - - return ( - - - - - - - Konto erstellen - - - Registriere dich, um loszulegen - - - - - - - - - - - - - - - - Bereits ein Konto? - - - Anmelden - - - - - - - - - ); -} diff --git a/apps/cards/apps/mobile/app/(tabs)/_layout.tsx b/apps/cards/apps/mobile/app/(tabs)/_layout.tsx deleted file mode 100644 index ecec1bf0f..000000000 --- a/apps/cards/apps/mobile/app/(tabs)/_layout.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { NativeTabs, Icon, Label } from 'expo-router/unstable-native-tabs'; -import { Platform } from 'react-native'; - -export default function TabLayout() { - return ( - - - - - - - - - - - - - - - - - - - - - - ); -} diff --git a/apps/cards/apps/mobile/app/(tabs)/decks/_layout.tsx b/apps/cards/apps/mobile/app/(tabs)/decks/_layout.tsx deleted file mode 100644 index 05c651a65..000000000 --- a/apps/cards/apps/mobile/app/(tabs)/decks/_layout.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { Stack } from 'expo-router'; - -export default function DecksLayout() { - return ( - - - - ); -} diff --git a/apps/cards/apps/mobile/app/(tabs)/decks/index.tsx b/apps/cards/apps/mobile/app/(tabs)/decks/index.tsx deleted file mode 100644 index ed46529b0..000000000 --- a/apps/cards/apps/mobile/app/(tabs)/decks/index.tsx +++ /dev/null @@ -1,359 +0,0 @@ -import React, { useState, useEffect } from 'react'; -import { View, ScrollView, RefreshControl, FlatList, Platform, Pressable } from 'react-native'; -import { Text } from '~/components/ui/Text'; -import { Icon } from '~/components/ui/Icon'; -import { Button } from '~/components/ui/Button'; -import { Card } from '~/components/ui/Card'; -import { FilterBar, FilterOption } from '~/components/ui/FilterBar'; -import { FloatingActionButton } from '~/components/ui/FloatingActionButton'; -import { router } from 'expo-router'; -import { useDeckStore } from '~/store/deckStore'; -import { DeckCard } from '~/components/deck/DeckCard'; -import { useThemeColors } from '~/utils/themeUtils'; -import { PageHeader } from '~/components/ui/PageHeader'; -import { spacing } from '~/utils/spacing'; - -// Conditional imports for Expo UI -let Host: any = null, - Picker: any = null; -if (Platform.OS === 'ios') { - try { - const SwiftUI = require('@expo/ui/swift-ui'); - Host = SwiftUI?.Host; - Picker = SwiftUI?.Picker; - // Verify the components are actually available and have the expected shape - if (!Host || !Picker || !Picker.Item) { - Host = null; - Picker = null; - } - } catch (e) { - // Fallback if @expo/ui is not available - } -} else if (Platform.OS === 'android') { - try { - const JetpackCompose = require('@expo/ui/jetpack-compose'); - Host = JetpackCompose?.Host; - Picker = JetpackCompose?.Picker; - // Verify the components are actually available and have the expected shape - if (!Host || !Picker || !Picker.Item) { - Host = null; - Picker = null; - } - } catch (e) { - // Fallback if @expo/ui is not available - } -} - -export default function DecksScreen() { - const [refreshing, setRefreshing] = useState(false); - const [filter, setFilter] = useState('all'); - const colors = useThemeColors(); - - const { decks, fetchDecks, isLoading } = useDeckStore(); - - useEffect(() => { - fetchDecks(); - }, []); - - const onRefresh = React.useCallback(async () => { - setRefreshing(true); - await fetchDecks(); - setRefreshing(false); - }, [fetchDecks]); - - const filteredDecks = React.useMemo(() => { - if (filter === 'favorites') { - return decks.filter((deck) => deck.metadata?.is_favorite); - } - return decks; - }, [decks, filter]); - - const favoritesCount = React.useMemo( - () => decks.filter((deck) => deck.metadata?.is_favorite).length, - [decks] - ); - - const filterOptions: FilterOption[] = [ - { id: 'all', label: 'Alle', count: decks.length }, - { id: 'favorites', label: 'Favoriten', icon: 'heart', count: favoritesCount }, - ]; - - // Native iOS SwiftUI Picker component - const NativeIOSPicker = () => { - if (Host && Picker && Picker.Item) { - try { - return ( - - - setFilter(value)} - > - {`Alle (${decks.length})`} - {`Favoriten (${favoritesCount})`} - - - - ); - } catch (error) { - return ; - } - } - // Fallback to custom component if Expo UI is not available - return ; - }; - - // Native Android Jetpack Compose component - const NativeAndroidPicker = () => { - if (Host && Picker && Picker.Item) { - try { - return ( - - - setFilter(value)} - multiple={false} - > - {`Alle (${decks.length})`} - {`Favoriten (${favoritesCount})`} - - - - ); - } catch (error) { - return ( - - ); - } - } - // Fallback to FilterBar for Android if Expo UI is not available - return ; - }; - - // Custom iOS-style segmented control as fallback - const IOSSegmentedControl = () => ( - - - setFilter('all')} - style={{ - flex: 1, - backgroundColor: filter === 'all' ? colors.background : 'transparent', - borderRadius: 7, - alignItems: 'center', - justifyContent: 'center', - shadowColor: filter === 'all' ? '#000' : 'transparent', - shadowOffset: { width: 0, height: 1 }, - shadowOpacity: filter === 'all' ? 0.15 : 0, - shadowRadius: 2, - elevation: filter === 'all' ? 2 : 0, - }} - > - - Alle {decks.length > 0 ? `(${decks.length})` : ''} - - - setFilter('favorites')} - style={{ - flex: 1, - backgroundColor: filter === 'favorites' ? colors.background : 'transparent', - borderRadius: 7, - alignItems: 'center', - justifyContent: 'center', - shadowColor: filter === 'favorites' ? '#000' : 'transparent', - shadowOffset: { width: 0, height: 1 }, - shadowOpacity: filter === 'favorites' ? 0.15 : 0, - shadowRadius: 2, - elevation: filter === 'favorites' ? 2 : 0, - }} - > - - Favoriten {favoritesCount > 0 ? `(${favoritesCount})` : ''} - - - - - ); - - return ( - - {filteredDecks.length === 0 ? ( - - } - > - - - - - - - - - {filter === 'favorites' ? 'Keine Favoriten' : 'Keine Decks vorhanden'} - - - {filter === 'favorites' - ? 'Markiere Decks als Favoriten, um sie hier zu sehen' - : 'Erstelle dein erstes Deck oder entdecke öffentliche Decks von anderen Nutzern'} - - {filter === 'all' && ( - - - - - )} - - - - - ) : ( - - - - - } - data={filteredDecks} - keyExtractor={(item) => item.id} - renderItem={({ item }) => ( - router.push(`/deck/${item.id}`)} - showProgress={true} - /> - )} - contentContainerStyle={{ - paddingHorizontal: spacing.container.horizontal, - paddingBottom: spacing.lg, - }} - refreshControl={ - - } - ItemSeparatorComponent={() => } - /> - )} - - {/* Floating Action Button */} - - setFilter(filter === 'all' ? 'favorites' : 'all')} - /> - - - ); -} diff --git a/apps/cards/apps/mobile/app/(tabs)/explore/_layout.tsx b/apps/cards/apps/mobile/app/(tabs)/explore/_layout.tsx deleted file mode 100644 index c780a1c51..000000000 --- a/apps/cards/apps/mobile/app/(tabs)/explore/_layout.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { Stack } from 'expo-router'; - -export default function ExploreLayout() { - return ( - - - - ); -} diff --git a/apps/cards/apps/mobile/app/(tabs)/explore/index.tsx b/apps/cards/apps/mobile/app/(tabs)/explore/index.tsx deleted file mode 100644 index f30f27bad..000000000 --- a/apps/cards/apps/mobile/app/(tabs)/explore/index.tsx +++ /dev/null @@ -1,142 +0,0 @@ -import React, { useState } from 'react'; -import { View, ScrollView, RefreshControl } from 'react-native'; -import { Text } from '~/components/ui/Text'; -import { Card } from '~/components/ui/Card'; -import { Icon } from '~/components/ui/Icon'; -import { useThemeColors } from '~/utils/themeUtils'; -import { PageHeader } from '~/components/ui/PageHeader'; -import { spacing } from '~/utils/spacing'; - -export default function ExploreScreen() { - const [refreshing, setRefreshing] = useState(false); - const colors = useThemeColors(); // This triggers theme reactivity - - const onRefresh = React.useCallback(() => { - setRefreshing(true); - setTimeout(() => { - setRefreshing(false); - }, 2000); - }, []); - - const categories = [ - { name: 'Sprachen', icon: 'language-outline', color: colors.primary }, - { name: 'Wissenschaft', icon: 'flask-outline', color: colors.secondary }, - { name: 'Mathematik', icon: 'calculator-outline', color: colors.accent }, - { name: 'Geschichte', icon: 'time-outline', color: colors.primary }, - { name: 'Kunst', icon: 'color-palette-outline', color: colors.secondary }, - { name: 'Technologie', icon: 'hardware-chip-outline', color: colors.accent }, - ]; - - return ( - - } - > - - - {/* Content Wrapper */} - - {/* Kategorien Card */} - - - Kategorien - - - {categories.map((category, index) => ( - - {}} - style={{ - aspectRatio: 1, - padding: 12, - }} - > - - - - - - {category.name} - - - - - ))} - - - - {/* Beliebte Decks Card */} - - - Beliebte Decks - - - - - Noch keine öffentlichen Decks - - - Sei der Erste, der ein Deck teilt! - - - - - - - ); -} diff --git a/apps/cards/apps/mobile/app/(tabs)/index.tsx b/apps/cards/apps/mobile/app/(tabs)/index.tsx deleted file mode 100644 index 23afea9c5..000000000 --- a/apps/cards/apps/mobile/app/(tabs)/index.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { Redirect } from 'expo-router'; - -export default function TabsIndex() { - return ; -} diff --git a/apps/cards/apps/mobile/app/(tabs)/profile/_layout.tsx b/apps/cards/apps/mobile/app/(tabs)/profile/_layout.tsx deleted file mode 100644 index affdce478..000000000 --- a/apps/cards/apps/mobile/app/(tabs)/profile/_layout.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { Stack } from 'expo-router'; - -export default function ProfileLayout() { - return ( - - - - ); -} diff --git a/apps/cards/apps/mobile/app/(tabs)/profile/index.tsx b/apps/cards/apps/mobile/app/(tabs)/profile/index.tsx deleted file mode 100644 index 8eea93117..000000000 --- a/apps/cards/apps/mobile/app/(tabs)/profile/index.tsx +++ /dev/null @@ -1,358 +0,0 @@ -import React, { useEffect, useState } from 'react'; -import { View, ScrollView, Pressable, Alert, Platform, ActivityIndicator } from 'react-native'; -import { Text } from '~/components/ui/Text'; -import { useAuthStore } from '~/store/authStore'; -import { useDeckStore } from '~/store/deckStore'; -import { Card } from '~/components/ui/Card'; -import { Button } from '~/components/ui/Button'; -import { Switch } from '~/components/ui/Switch'; -import { ThemeSwitcher } from '~/components/ui/ThemeSwitcher'; -import { Icon } from '~/components/ui/Icon'; -import { SettingsSection } from '~/components/ui/SettingsSection'; -import { SettingsItem } from '~/components/ui/SettingsItem'; -import { router } from 'expo-router'; -import { useThemeColors } from '~/utils/themeUtils'; -import { useCredits } from '~/hooks/useCredits'; -import { PageHeader } from '~/components/ui/PageHeader'; -import { spacing } from '~/utils/spacing'; - -export default function ProfileScreen() { - const { user, signOut } = useAuthStore(); - const { decks, fetchDecks } = useDeckStore(); - const { credits, loading: creditsLoading, error: creditsError, refetch } = useCredits(); - const colors = useThemeColors(); // This triggers theme reactivity - - // Settings state - const [notifications, setNotifications] = useState({ - pushNotifications: true, - emailNotifications: false, - studyReminders: true, - weeklyProgress: true, - }); - - const [privacy, setPrivacy] = useState({ - profilePublic: false, - shareProgress: true, - allowAnalytics: true, - }); - - const [study, setStudy] = useState({ - autoPlay: false, - soundEffects: true, - vibration: true, - darkModeForStudy: false, - }); - - useEffect(() => { - fetchDecks(); - }, []); - - const handleSignOut = async () => { - // Use native confirm for web compatibility - if (Platform.OS === 'web') { - if (window.confirm('Möchtest du dich wirklich abmelden?')) { - try { - await signOut(); - router.replace('/(auth)/login'); - } catch (error) { - console.error('Sign out error:', error); - window.alert('Abmeldung fehlgeschlagen'); - } - } - } else { - Alert.alert('Abmelden', 'Möchtest du dich wirklich abmelden?', [ - { text: 'Abbrechen', style: 'cancel' }, - { - text: 'Abmelden', - style: 'destructive', - onPress: async () => { - try { - await signOut(); - router.replace('/(auth)/login'); - } catch (error) { - console.error('Sign out error:', error); - Alert.alert('Fehler', 'Abmeldung fehlgeschlagen'); - } - }, - }, - ]); - } - }; - - return ( - - - - - {/* User Profile Section */} - - - - - {user?.email?.[0].toUpperCase() || 'U'} - - - - {user?.email?.split('@')[0] || 'Benutzer'} - - - {user?.email} - - - - - {/* Mana Balance Section */} - - - - - - Mana Balance - - - - {creditsLoading ? ( - - ) : creditsError ? ( - - - Fehler beim Laden - - - - Erneut versuchen - - - - ) : ( - <> - - {credits ?? 0} - - - Credits verfügbar - - - )} - - - - {/* Benachrichtigungen */} - - - setNotifications((prev) => ({ ...prev, pushNotifications: value })) - } - /> - } - /> - - setNotifications((prev) => ({ ...prev, emailNotifications: value })) - } - /> - } - /> - - setNotifications((prev) => ({ ...prev, studyReminders: value })) - } - /> - } - /> - - setNotifications((prev) => ({ ...prev, weeklyProgress: value })) - } - /> - } - isLast - /> - - - {/* Lern-Einstellungen */} - - setStudy((prev) => ({ ...prev, autoPlay: value }))} - /> - } - /> - setStudy((prev) => ({ ...prev, soundEffects: value }))} - /> - } - /> - setStudy((prev) => ({ ...prev, vibration: value }))} - /> - } - isLast - /> - - - {/* Design & Darstellung */} - - - - - {/* Datenschutz */} - - - setPrivacy((prev) => ({ ...prev, profilePublic: value })) - } - /> - } - /> - - setPrivacy((prev) => ({ ...prev, shareProgress: value })) - } - /> - } - /> - - setPrivacy((prev) => ({ ...prev, allowAnalytics: value })) - } - /> - } - isLast - /> - - - {/* Weitere Optionen */} - - {}} /> - {}} - /> - {}} /> - {}} isLast /> - - - {/* Abmelden */} - - } - > - Abmelden - - - - - - ); -} diff --git a/apps/cards/apps/mobile/app/(tabs)/progress/_layout.tsx b/apps/cards/apps/mobile/app/(tabs)/progress/_layout.tsx deleted file mode 100644 index 7ea876df1..000000000 --- a/apps/cards/apps/mobile/app/(tabs)/progress/_layout.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { Stack } from 'expo-router'; - -export default function ProgressLayout() { - return ( - - - - ); -} diff --git a/apps/cards/apps/mobile/app/(tabs)/progress/index.tsx b/apps/cards/apps/mobile/app/(tabs)/progress/index.tsx deleted file mode 100644 index 44946a96a..000000000 --- a/apps/cards/apps/mobile/app/(tabs)/progress/index.tsx +++ /dev/null @@ -1,401 +0,0 @@ -import React, { useEffect, useState } from 'react'; -import { View, ScrollView, Pressable, ActivityIndicator } from 'react-native'; -import { Text } from '~/components/ui/Text'; -import { Icon } from '~/components/ui/Icon'; -import { useProgressStore } from '~/store/progressStore'; -import { useAuthStore } from '~/store/authStore'; -import { Card } from '~/components/ui/Card'; -import { HeatmapCalendar } from '~/components/progress/HeatmapCalendar'; -import { ProgressChart } from '~/components/progress/ProgressChart'; -import { StreakCard } from '~/components/progress/StreakCard'; -import { DeckProgressCard } from '~/components/progress/DeckProgressCard'; -import { useThemeColors } from '~/utils/themeUtils'; -import { PageHeader } from '~/components/ui/PageHeader'; -import { spacing } from '~/utils/spacing'; - -export default function ProgressScreen() { - const { user } = useAuthStore(); - const colors = useThemeColors(); // This triggers theme reactivity - const { - dailyProgress, - streakInfo, - deckProgress, - statistics, - selectedPeriod, - isLoading, - fetchDailyProgress, - fetchStreakInfo, - fetchDeckProgress, - fetchStatistics, - setSelectedPeriod, - } = useProgressStore(); - - const [activeChart, setActiveChart] = useState<'accuracy' | 'cards' | 'time'>('cards'); - - useEffect(() => { - if (user) { - loadProgressData(); - } - }, [user, selectedPeriod]); - - const loadProgressData = async () => { - if (!user) return; - - const endDate = new Date(); - const startDate = new Date(); - - // Get data for selected period + extra for heatmap - switch (selectedPeriod) { - case 'week': - startDate.setDate(endDate.getDate() - 90); // 3 months for heatmap - break; - case 'month': - startDate.setDate(endDate.getDate() - 90); - break; - case 'year': - startDate.setFullYear(endDate.getFullYear() - 1); - break; - } - - await Promise.all([ - fetchDailyProgress(user.id, startDate, endDate), - fetchStreakInfo(user.id), - fetchDeckProgress(user.id), - fetchStatistics(user.id), - ]); - }; - - if (isLoading && dailyProgress.size === 0) { - return ( - - - - Lade Fortschritt... - - - ); - } - - return ( - - - - - {/* Content Wrapper */} - - {/* Streak Section */} - - - - - {/* Heatmap Calendar */} - - - Aktivitätskalender - - - - - - - Keine - - - - - - Wenig - - - - - - Mittel - - - - - - Viel - - - - - - {/* Charts Section */} - - {/* Period Selector */} - - - Statistiken - - - {(['week', 'month', 'year'] as const).map((period) => ( - setSelectedPeriod(period)} - style={({ pressed }) => ({ - borderRadius: 6, - paddingHorizontal: 12, - paddingVertical: 4, - backgroundColor: selectedPeriod === period ? colors.surface : 'transparent', - opacity: pressed ? 0.7 : 1, - ...(selectedPeriod === period && { - shadowColor: '#000', - shadowOffset: { width: 0, height: 1 }, - shadowOpacity: 0.1, - shadowRadius: 2, - elevation: 2, - }), - })} - > - - {period === 'week' ? 'Woche' : period === 'month' ? 'Monat' : 'Jahr'} - - - ))} - - - - {/* Chart Type Selector */} - - {[ - { key: 'cards', label: 'Karten', icon: 'card-outline' }, - { key: 'accuracy', label: 'Genauigkeit', icon: 'checkmark-circle-outline' }, - { key: 'time', label: 'Zeit', icon: 'time-outline' }, - ].map((type) => ( - setActiveChart(type.key as any)} - style={({ pressed }) => ({ - flex: 1, - flexDirection: 'row', - alignItems: 'center', - justifyContent: 'center', - borderRadius: 8, - borderWidth: 1, - padding: 8, - borderColor: activeChart === type.key ? colors.primary : colors.border, - backgroundColor: - activeChart === type.key ? `${colors.primary}15` : colors.surface, - opacity: pressed ? 0.7 : 1, - })} - > - - - {type.label} - - - ))} - - - {/* Chart */} - - - - {/* Statistics Overview */} - {statistics && ( - - - Gesamt-Statistiken - - - - - - - - Karten gelernt - - - - {statistics.total_cards_studied} - - - - - - - Lernzeit - - - {Math.floor(statistics.total_study_time_minutes / 60)}h{' '} - {statistics.total_study_time_minutes % 60}min - - - - - - - - Durchschnittliche Genauigkeit - - - - {statistics.average_accuracy}% - - - - - - - - Lieblings-Lernzeit - - - - {statistics.favorite_time_of_day} - - - - - )} - - {/* Deck Progress */} - - - Deck-Fortschritt - - {deckProgress.length > 0 ? ( - - {deckProgress.map((deck) => ( - - ))} - - ) : ( - - - Noch keine Decks vorhanden - - - )} - - - - - ); -} diff --git a/apps/cards/apps/mobile/app/+html.tsx b/apps/cards/apps/mobile/app/+html.tsx deleted file mode 100644 index 447d6a0a5..000000000 --- a/apps/cards/apps/mobile/app/+html.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import { ScrollViewStyleReset } from 'expo-router/html'; - -// This file is web-only and used to configure the root HTML for every -// web page during static rendering. -// The contents of this function only run in Node.js environments and -// do not have access to the DOM or browser APIs. -export default function Root({ children }: { children: React.ReactNode }) { - return ( - -
- - - - {/* - This viewport disables scaling which makes the mobile website act more like a native app. - However this does reduce built-in accessibility. If you want to enable scaling, use this instead: - - */} - - {/* - Disable body scrolling on web. This makes ScrollView components work closer to how they do on native. - However, body scrolling is often nice to have for mobile web. If you want to enable it, remove this line. - */} - - - {/* Using raw CSS styles as an escape-hatch to ensure the background color never flickers in dark-mode. */} -