@mr.dj2u/library-registry 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/assets/mds/env/convex.env.example +1 -0
- package/assets/mds/env/firebase.env.example +6 -0
- package/assets/mds/env/supabase.env.example +3 -0
- package/assets/mds/project/auth-base.md +17 -0
- package/assets/mds/project/auth-convex.md +33 -0
- package/assets/mds/project/auth-firebase.md +22 -0
- package/assets/mds/project/auth-supabase.md +46 -0
- package/assets/mds/src/app/(auth)/reset-password.tsx +5 -0
- package/assets/mds/src/app/(auth)/sign-in.tsx +5 -0
- package/assets/mds/src/app/(auth)/sign-up.tsx +5 -0
- package/assets/mds/src/app/legal/updates.tsx +1 -0
- package/assets/mds/src/app/onboarding/complete.tsx +2 -0
- package/assets/mds/src/app/onboarding/features.tsx +1 -0
- package/assets/mds/src/app/onboarding/legal.tsx +2 -0
- package/assets/mds/src/app/onboarding.tsx +1 -1
- package/assets/mds/src/app/settings.tsx +10 -1
- package/assets/mds/src/db/adapter.ts +195 -0
- package/assets/mds/src/db/firebase.ts +77 -0
- package/assets/mds/src/db/index.firebase.ts +19 -0
- package/assets/mds/src/db/index.supabase.ts +22 -0
- package/assets/mds/src/db/supabase.ts +337 -0
- package/assets/mds/src/features/auth/adapters/base-auth-adapter.tsx +82 -0
- package/assets/mds/src/features/auth/adapters/convex-auth-adapter.tsx +156 -0
- package/assets/mds/src/features/auth/adapters/firebase-auth-adapter.tsx +147 -0
- package/assets/mds/src/features/auth/adapters/supabase-auth-adapter.tsx +166 -0
- package/assets/mds/src/features/auth/auth-guard-logic.ts +19 -0
- package/assets/mds/src/features/auth/auth-guard.tsx +77 -0
- package/assets/mds/src/features/auth/auth-provider.tsx +60 -0
- package/assets/mds/src/features/auth/auth-screen.tsx +265 -0
- package/assets/mds/src/features/auth/auth-types.ts +45 -0
- package/assets/mds/src/features/exposition/data-screen.tsx +4 -2
- package/assets/mds/src/features/exposition/expo-sdk-56-screen.tsx +119 -76
- package/assets/mds/src/features/exposition/exposition-screen.tsx +10 -11
- package/assets/mds/src/features/exposition/stylist-screen.tsx +62 -11
- package/assets/mds/src/features/legal/legal-acceptance-adapter.ts +190 -0
- package/assets/mds/src/features/legal/legal-acceptance-config.ts +79 -0
- package/assets/mds/src/features/legal/legal-agreement-screen.tsx +9 -4
- package/assets/mds/src/features/legal/legal-document-modal.tsx +7 -3
- package/assets/mds/src/features/legal/legal-document-view.tsx +1 -0
- package/assets/mds/src/features/legal/legal-documents.ts +17 -3
- package/assets/mds/src/features/legal/legal-update-screen.tsx +297 -0
- package/assets/mds/src/features/legal/use-legal-acceptance.ts +1 -38
- package/assets/mds/src/features/onboarding/complete-screen.tsx +138 -0
- package/assets/mds/src/features/onboarding/features-screen.tsx +129 -0
- package/assets/mds/src/features/onboarding/legal-review-screen.tsx +242 -0
- package/assets/mds/src/features/onboarding/onboarding-config-with-legal.ts +104 -0
- package/assets/mds/src/features/onboarding/onboarding-config.ts +104 -0
- package/assets/mds/src/features/onboarding/onboarding-persistence-sync.tsx +1 -0
- package/assets/mds/src/features/onboarding/welcome-screen.tsx +130 -0
- package/assets/mds/src/features/onboarding-state/adapters/memory-onboarding-state-adapter.ts +15 -0
- package/assets/mds/src/features/onboarding-state/adapters/supabase-onboarding-state-adapter.ts +45 -0
- package/assets/mds/src/features/onboarding-state/adapters/zustand-onboarding-state-adapter.ts +16 -0
- package/assets/mds/src/features/onboarding-state/adapters/zustand-supabase-onboarding-state-adapter.ts +53 -0
- package/assets/mds/src/features/onboarding-state/onboarding-state-core.ts +108 -0
- package/assets/mds/src/features/onboarding-state/onboarding-state-memory.ts +106 -0
- package/assets/mds/src/features/onboarding-state/onboarding-state-supabase.ts +246 -0
- package/assets/mds/src/features/onboarding-state/onboarding-state-types.ts +64 -0
- package/assets/mds/src/features/onboarding-state/onboarding-state-zustand-supabase.ts +120 -0
- package/assets/mds/src/features/onboarding-state/onboarding-state-zustand.ts +71 -0
- package/assets/mds/src/features/onboarding-state/onboarding-state.ts +22 -0
- package/assets/mds/src/features/onboarding-state/onboarding-store.ts +39 -0
- package/assets/mds/src/features/settings/settings-screen-logic.ts +122 -0
- package/assets/mds/src/features/settings/settings-screen.tsx +274 -28
- package/assets/mds/src/services/convex.ts +40 -0
- package/assets/mds/src/services/firebase.ts +70 -0
- package/assets/mds/src/services/supabase.ts +50 -0
- package/assets/mds/src/theme/color-utils.ts +42 -0
- package/assets/mds/src/theme/provider.tsx +15 -5
- package/assets/mds/src/types/database.ts +13 -0
- package/assets/mds/supabase/migrations/0001_mds_auth_onboarding.sql +107 -0
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +444 -29
- package/dist/catalog.js.map +1 -1
- package/dist/types.d.ts +5 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/assets/mds/src/app/onboarding/account-setup.tsx +0 -1
- package/assets/mds/src/app/onboarding/agreement.tsx +0 -1
- package/assets/mds/src/app/onboarding/terms.tsx +0 -1
- package/assets/mds/src/features/onboarding/account-setup-screen.tsx +0 -54
- package/assets/mds/src/features/onboarding/agreement-screen.tsx +0 -6
- package/assets/mds/src/features/onboarding/components/legal-document-view.tsx +0 -103
- package/assets/mds/src/features/onboarding/legal-documents.ts +0 -80
- package/assets/mds/src/features/onboarding/onboarding-screen.tsx +0 -167
- package/assets/mds/src/features/onboarding/terms-screen.tsx +0 -6
package/dist/catalog.js
CHANGED
|
@@ -165,6 +165,7 @@ const mdsItems = [
|
|
|
165
165
|
assets: [
|
|
166
166
|
mdsAsset("src/theme/tokens.ts", "src/theme/tokens.ts", "support"),
|
|
167
167
|
mdsAsset("src/theme/provider.tsx", "src/theme/provider.tsx", "support"),
|
|
168
|
+
mdsAsset("src/theme/color-utils.ts", "src/theme/color-utils.ts", "support"),
|
|
168
169
|
mdsAsset("src/theme/font-assets.ts", "src/theme/font-assets.ts", "support"),
|
|
169
170
|
],
|
|
170
171
|
integration: {
|
|
@@ -293,7 +294,7 @@ const mdsItems = [
|
|
|
293
294
|
defineItem({
|
|
294
295
|
id: "mds/legal-documents",
|
|
295
296
|
name: "Legal documents",
|
|
296
|
-
description: "Reusable terms and privacy content with public routes, modal review, settings links,
|
|
297
|
+
description: "Reusable terms and privacy content with public routes, modal review, settings links, onboarding agreement, and material update gate surfaces.",
|
|
297
298
|
kind: "flow",
|
|
298
299
|
tags: [
|
|
299
300
|
"legal",
|
|
@@ -302,11 +303,16 @@ const mdsItems = [
|
|
|
302
303
|
"agreements",
|
|
303
304
|
"content-pages",
|
|
304
305
|
"onboarding",
|
|
306
|
+
"legal-update-gate",
|
|
307
|
+
"protected-routes",
|
|
305
308
|
],
|
|
306
309
|
categories: ["legal", "content", "onboarding"],
|
|
307
310
|
compatibility: { ...SDK_56, platforms: ALL_PLATFORMS },
|
|
311
|
+
dependencies: [
|
|
312
|
+
runtime("react-native-safe-area-context", "~5.7.0", "expo"),
|
|
313
|
+
],
|
|
308
314
|
composedItems: ["mds/theme-support"],
|
|
309
|
-
relatedItems: ["mds/onboarding-
|
|
315
|
+
relatedItems: ["mds/onboarding", "mds/onboarding-state", "mds/settings"],
|
|
310
316
|
variants: [
|
|
311
317
|
{
|
|
312
318
|
id: "public-routes",
|
|
@@ -360,24 +366,52 @@ const mdsItems = [
|
|
|
360
366
|
"Ask where the app should expose legal links, then render LegalDocumentLinks from the copied feature file in that settings or app-info surface.",
|
|
361
367
|
],
|
|
362
368
|
},
|
|
369
|
+
{
|
|
370
|
+
id: "legal-update-gate",
|
|
371
|
+
name: "Material update gate",
|
|
372
|
+
description: "Adds /legal/updates for required legal re-acceptance before protected app content opens.",
|
|
373
|
+
compatibility: { navigation: ["expo-router"], aliases: ["@"] },
|
|
374
|
+
dependencies: [runtime("expo-router", "~56.2.6", "expo")],
|
|
375
|
+
assets: [
|
|
376
|
+
mdsAsset("src/app/terms.tsx", "{{appDir}}/terms.tsx", "route"),
|
|
377
|
+
mdsAsset("src/app/privacy.tsx", "{{appDir}}/privacy.tsx", "route"),
|
|
378
|
+
mdsAsset("src/app/legal/updates.tsx", "{{appDir}}/legal/updates.tsx", "route"),
|
|
379
|
+
mdsAsset("src/features/legal/legal-update-screen.tsx", "{{featuresDir}}/legal/legal-update-screen.tsx"),
|
|
380
|
+
],
|
|
381
|
+
integration: [
|
|
382
|
+
"Keep /terms, /privacy, and /legal/updates public, then wrap app routes in Stack.Protected or Tabs.Protected with a guard that includes legalGateStatus === \"complete\".",
|
|
383
|
+
"Replace the default memory legal adapter with mds/onboarding-state before hosted production use. Supabase user acceptance rows are the production path.",
|
|
384
|
+
"Mark only material legal updates with requiresReacceptance: true; minor copy edits can update public documents without blocking app entry.",
|
|
385
|
+
],
|
|
386
|
+
},
|
|
363
387
|
],
|
|
364
388
|
assets: [
|
|
365
|
-
mdsAsset("src/features/legal/legal-documents.ts", "{{featuresDir}}/legal/legal-documents.ts", "support", [
|
|
389
|
+
mdsAsset("src/features/legal/legal-documents.ts", "{{featuresDir}}/legal/legal-documents.ts", "support", [
|
|
390
|
+
"__MDS_APP_NAME__",
|
|
391
|
+
"__MDS_LEGAL_BUSINESS_NAME__",
|
|
392
|
+
"__MDS_LEGAL_CONTACT_EMAIL__",
|
|
393
|
+
"__MDS_LEGAL_ADDRESS_OR_REGION_NOTE__",
|
|
394
|
+
]),
|
|
366
395
|
mdsAsset("src/features/legal/legal-document-view.tsx", "{{featuresDir}}/legal/legal-document-view.tsx"),
|
|
367
396
|
mdsAsset("src/features/legal/legal-page-route.tsx", "{{featuresDir}}/legal/legal-page-route.tsx"),
|
|
368
397
|
mdsAsset("src/features/legal/legal-document-modal.tsx", "{{featuresDir}}/legal/legal-document-modal.tsx"),
|
|
369
398
|
mdsAsset("src/features/legal/use-legal-acceptance.ts", "{{featuresDir}}/legal/use-legal-acceptance.ts", "support"),
|
|
399
|
+
mdsAsset("src/features/legal/legal-acceptance-config.ts", "{{featuresDir}}/legal/legal-acceptance-config.ts", "support"),
|
|
400
|
+
mdsAsset("src/features/legal/legal-acceptance-adapter.ts", "{{featuresDir}}/legal/legal-acceptance-adapter.ts", "support"),
|
|
370
401
|
],
|
|
371
402
|
integration: {
|
|
372
403
|
summary: "Copy the shared legal content source and render it through routes, modal review, settings links, or onboarding agreement surfaces.",
|
|
373
404
|
instructions: [
|
|
374
405
|
"Replace every placeholder legal section with documents reviewed for the app, jurisdiction, data practices, and business model.",
|
|
375
406
|
"Keep the terms and privacy content in the shared legal-documents source so public routes, modals, settings links, and onboarding review show the same copy.",
|
|
407
|
+
"Use the legal-update-gate variant when an authenticated app must block protected routes until current material document versions are accepted.",
|
|
376
408
|
"If the app already has brand or theme colors, map the copied src/theme/tokens.ts palette to the app's existing light and dark colors, or pass color overrides into AppThemeProvider.",
|
|
377
409
|
],
|
|
378
410
|
notes: [
|
|
379
411
|
"The bundled placeholder copy is not legal advice and must be reviewed before production.",
|
|
380
|
-
"The
|
|
412
|
+
"The default legal adapter is memory-only and is not a hosted audit record.",
|
|
413
|
+
"Use mds/onboarding-state or mds/onboarding-auth-supabase to persist completion and versioned legal acceptance.",
|
|
414
|
+
"Hosted apps should configure user-scoped Supabase persistence and write legal acceptance after sign-in.",
|
|
381
415
|
"AppThemeProvider follows the system color scheme by default; pass scheme=\"light\", scheme=\"dark\", or scheme=\"preview\" when a screen needs a fixed theme.",
|
|
382
416
|
],
|
|
383
417
|
},
|
|
@@ -386,45 +420,399 @@ const mdsItems = [
|
|
|
386
420
|
},
|
|
387
421
|
}),
|
|
388
422
|
defineItem({
|
|
389
|
-
id: "mds/
|
|
390
|
-
name: "
|
|
391
|
-
description: "
|
|
423
|
+
id: "mds/auth",
|
|
424
|
+
name: "Auth flow",
|
|
425
|
+
description: "Provider-neutral authentication routes, refreshable session adapters, a reusable guard, and backend-specific variants.",
|
|
392
426
|
kind: "flow",
|
|
393
|
-
tags: [
|
|
394
|
-
|
|
427
|
+
tags: [
|
|
428
|
+
"auth",
|
|
429
|
+
"session",
|
|
430
|
+
"sign-in",
|
|
431
|
+
"sign-up",
|
|
432
|
+
"protected-routes",
|
|
433
|
+
"eject:auth",
|
|
434
|
+
],
|
|
435
|
+
categories: ["auth", "flows", "onboarding"],
|
|
395
436
|
compatibility: SDK_56_ROUTER,
|
|
396
437
|
dependencies: [runtime("expo-router", "~56.2.6", "expo")],
|
|
397
|
-
|
|
438
|
+
composedItems: ["mds/theme-support"],
|
|
439
|
+
relatedItems: ["mds/onboarding", "mds/onboarding-state", "mds/legal-documents", "mds/settings"],
|
|
440
|
+
variants: [
|
|
441
|
+
{
|
|
442
|
+
id: "base",
|
|
443
|
+
name: "Base auth adapter",
|
|
444
|
+
description: "Adds a provider-neutral auth shell with an in-memory adapter for custom provider work.",
|
|
445
|
+
compatibility: { navigation: ["expo-router"], aliases: ["@"] },
|
|
446
|
+
assets: [
|
|
447
|
+
mdsAsset("src/features/auth/adapters/base-auth-adapter.tsx", "{{featuresDir}}/auth/auth-adapter.tsx", "support"),
|
|
448
|
+
mdsAsset("project/auth-base.md", "project/auth.md", "support"),
|
|
449
|
+
],
|
|
450
|
+
integration: [
|
|
451
|
+
"Replace the base auth adapter with a real provider before production.",
|
|
452
|
+
"Wrap the app's root route layout in AuthProvider before using useAuth or protected auth screens.",
|
|
453
|
+
],
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
id: "with-supabase",
|
|
457
|
+
name: "With Supabase",
|
|
458
|
+
description: "Wires the auth shell to Supabase Auth and emits onboarding/legal persistence SQL.",
|
|
459
|
+
compatibility: { navigation: ["expo-router"], aliases: ["@"] },
|
|
460
|
+
dependencies: [
|
|
461
|
+
runtime("@supabase/supabase-js", "^2.112.3"),
|
|
462
|
+
runtime("@react-native-async-storage/async-storage", "2.2.0", "expo"),
|
|
463
|
+
],
|
|
464
|
+
assets: [
|
|
465
|
+
mdsAsset("src/features/auth/adapters/supabase-auth-adapter.tsx", "{{featuresDir}}/auth/auth-adapter.tsx", "support"),
|
|
466
|
+
mdsAsset("src/services/supabase.ts", "src/services/supabase.ts", "support"),
|
|
467
|
+
mdsAsset("supabase/migrations/0001_mds_auth_onboarding.sql", "supabase/migrations/0001_mds_auth_onboarding.sql", "support"),
|
|
468
|
+
mdsAsset("env/supabase.env.example", ".env.example", "support"),
|
|
469
|
+
mdsAsset("project/auth-supabase.md", "project/auth.md", "support"),
|
|
470
|
+
],
|
|
471
|
+
integration: [
|
|
472
|
+
"Generated apps ship a blank .env.example template and a local .env.local with Supabase publishable credentials.",
|
|
473
|
+
"Apply the generated Supabase migration before relying on onboarding or legal acceptance persistence.",
|
|
474
|
+
"Keep Supabase service-role and secret keys out of Expo client code; use RLS policies for client-visible data.",
|
|
475
|
+
],
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
id: "with-firebase",
|
|
479
|
+
name: "With Firebase",
|
|
480
|
+
description: "Wires the auth shell to Firebase Authentication through the Expo-compatible Firebase JS SDK.",
|
|
481
|
+
compatibility: { navigation: ["expo-router"], aliases: ["@"] },
|
|
482
|
+
dependencies: [
|
|
483
|
+
runtime("firebase", "^12.17.1", "expo"),
|
|
484
|
+
runtime("@react-native-async-storage/async-storage", "2.2.0", "expo"),
|
|
485
|
+
],
|
|
486
|
+
assets: [
|
|
487
|
+
mdsAsset("src/features/auth/adapters/firebase-auth-adapter.tsx", "{{featuresDir}}/auth/auth-adapter.tsx", "support"),
|
|
488
|
+
mdsAsset("src/services/firebase.ts", "src/services/firebase.ts", "support"),
|
|
489
|
+
mdsAsset("env/firebase.env.example", ".env.example", "support"),
|
|
490
|
+
mdsAsset("project/auth-firebase.md", "project/auth.md", "support"),
|
|
491
|
+
],
|
|
492
|
+
integration: [
|
|
493
|
+
"Register a Firebase web app, enable Email/Password auth, and set the EXPO_PUBLIC_FIREBASE_* variables.",
|
|
494
|
+
"Use Firebase JS SDK for this source-copy variant; React Native Firebase requires a development build and native config plugins.",
|
|
495
|
+
"Add Firestore or another backend-backed audit path before treating legal acceptance as production-persistent.",
|
|
496
|
+
],
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
id: "with-convex",
|
|
500
|
+
name: "With Convex",
|
|
501
|
+
description: "Wires the auth shell to Convex React Native and Convex Auth. Experimental.",
|
|
502
|
+
compatibility: { navigation: ["expo-router"], aliases: ["@"] },
|
|
503
|
+
dependencies: [
|
|
504
|
+
runtime("convex", "^1.43.0"),
|
|
505
|
+
runtime("@convex-dev/auth", "^0.0.95"),
|
|
506
|
+
runtime("@auth/core", "0.41.1"),
|
|
507
|
+
runtime("expo-secure-store", "~56.0.4", "expo"),
|
|
508
|
+
],
|
|
509
|
+
assets: [
|
|
510
|
+
mdsAsset("src/features/auth/adapters/convex-auth-adapter.tsx", "{{featuresDir}}/auth/auth-adapter.tsx", "support"),
|
|
511
|
+
mdsAsset("src/services/convex.ts", "src/services/convex.ts", "support"),
|
|
512
|
+
mdsAsset("env/convex.env.example", ".env.example", "support"),
|
|
513
|
+
mdsAsset("project/auth-convex.md", "project/auth.md", "support"),
|
|
514
|
+
],
|
|
515
|
+
integration: [
|
|
516
|
+
"Run npx convex dev and npx @convex-dev/auth before using the generated Convex auth adapter.",
|
|
517
|
+
"Set EXPO_PUBLIC_CONVEX_URL for the Expo app.",
|
|
518
|
+
"Treat this variant as experimental until the generated app is dogfooded with current Convex Auth APIs.",
|
|
519
|
+
],
|
|
520
|
+
},
|
|
521
|
+
],
|
|
398
522
|
assets: [
|
|
399
|
-
mdsAsset("src/features/
|
|
400
|
-
mdsAsset("src/features/
|
|
401
|
-
mdsAsset("src/features/
|
|
402
|
-
mdsAsset("src/features/
|
|
403
|
-
mdsAsset("src/features/
|
|
404
|
-
mdsAsset("src/
|
|
405
|
-
mdsAsset("src/app/
|
|
406
|
-
mdsAsset("src/app/
|
|
407
|
-
mdsAsset("src/app/onboarding/terms.tsx", "{{appDir}}/onboarding/terms.tsx", "route"),
|
|
408
|
-
mdsAsset("src/app/onboarding/account-setup.tsx", "{{appDir}}/onboarding/account-setup.tsx", "route"),
|
|
523
|
+
mdsAsset("src/features/auth/auth-types.ts", "{{featuresDir}}/auth/auth-types.ts", "support"),
|
|
524
|
+
mdsAsset("src/features/auth/auth-provider.tsx", "{{featuresDir}}/auth/auth-provider.tsx", "support"),
|
|
525
|
+
mdsAsset("src/features/auth/auth-guard.tsx", "{{featuresDir}}/auth/auth-guard.tsx", "support"),
|
|
526
|
+
mdsAsset("src/features/auth/auth-guard-logic.ts", "{{featuresDir}}/auth/auth-guard-logic.ts", "support"),
|
|
527
|
+
mdsAsset("src/features/auth/auth-screen.tsx", "{{featuresDir}}/auth/auth-screen.tsx"),
|
|
528
|
+
mdsAsset("src/app/(auth)/sign-in.tsx", "{{appDir}}/(auth)/sign-in.tsx", "route"),
|
|
529
|
+
mdsAsset("src/app/(auth)/sign-up.tsx", "{{appDir}}/(auth)/sign-up.tsx", "route"),
|
|
530
|
+
mdsAsset("src/app/(auth)/reset-password.tsx", "{{appDir}}/(auth)/reset-password.tsx", "route"),
|
|
409
531
|
],
|
|
410
532
|
integration: {
|
|
411
|
-
summary: "Add
|
|
533
|
+
summary: "Add editable auth routes and a provider-backed AuthProvider to an Expo Router app.",
|
|
412
534
|
instructions: [
|
|
413
|
-
"
|
|
414
|
-
"
|
|
535
|
+
"Keep /sign-in, /sign-up, and /reset-password public, then protect app routes from the root Expo Router layout.",
|
|
536
|
+
"Choose exactly one auth provider variant so auth-adapter.tsx has a single implementation.",
|
|
537
|
+
"Compose with mds/onboarding by setting onboarding completion to /sign-in when users should authenticate after onboarding.",
|
|
538
|
+
"Use AuthGuard for screen-level protection when a copied screen should refresh auth on focus or redirect independently from the root Stack.Protected shell.",
|
|
415
539
|
],
|
|
416
540
|
notes: [
|
|
417
|
-
"
|
|
541
|
+
"Protected routes are a client-side navigation guard; provider backends and database policies still enforce data access.",
|
|
542
|
+
"The Firebase variant intentionally uses Firebase JS SDK, not React Native Firebase, so it stays Expo-compatible.",
|
|
543
|
+
"The Convex variant is experimental because Convex Auth is beta and requires a Convex initialization step.",
|
|
418
544
|
],
|
|
419
545
|
},
|
|
420
546
|
preview: {
|
|
421
|
-
description: "
|
|
547
|
+
description: "Sign-in, sign-up, password reset, auth provider, and provider-specific adapters.",
|
|
548
|
+
},
|
|
549
|
+
}),
|
|
550
|
+
defineItem({
|
|
551
|
+
id: "mds/onboarding",
|
|
552
|
+
name: "Onboarding flow",
|
|
553
|
+
description: "A reusable multi-screen onboarding flow with editable completion behavior and optional legal-document review.",
|
|
554
|
+
kind: "flow",
|
|
555
|
+
tags: ["onboarding", "multi-screen", "without-auth", "eject:onboarding"],
|
|
556
|
+
categories: ["onboarding", "flows"],
|
|
557
|
+
compatibility: SDK_56_ROUTER,
|
|
558
|
+
composedItems: ["mds/theme-support", "mds/onboarding-state"],
|
|
559
|
+
relatedItems: ["mds/legal-documents", "mds/onboarding-state", "mds/settings"],
|
|
560
|
+
variants: [
|
|
561
|
+
{
|
|
562
|
+
id: "multi-screen",
|
|
563
|
+
name: "Multi-screen onboarding",
|
|
564
|
+
description: "Adds welcome, feature highlights, and completion screens as Expo Router routes.",
|
|
565
|
+
compatibility: { navigation: ["expo-router"], aliases: ["@"] },
|
|
566
|
+
dependencies: [runtime("expo-router", "~56.2.6", "expo")],
|
|
567
|
+
assets: [
|
|
568
|
+
mdsAsset("src/features/onboarding/onboarding-config.ts", "{{featuresDir}}/onboarding/onboarding-config.ts", "support", ["__MDS_APP_NAME__"]),
|
|
569
|
+
mdsAsset("src/features/onboarding/complete-screen.tsx", "{{featuresDir}}/onboarding/complete-screen.tsx"),
|
|
570
|
+
mdsAsset("src/app/onboarding.tsx", "{{appDir}}/onboarding.tsx", "route"),
|
|
571
|
+
mdsAsset("src/app/onboarding/features.tsx", "{{appDir}}/onboarding/features.tsx", "route"),
|
|
572
|
+
mdsAsset("src/app/onboarding/complete.tsx", "{{appDir}}/onboarding/complete.tsx", "route"),
|
|
573
|
+
],
|
|
574
|
+
integration: [
|
|
575
|
+
"Edit onboarding-config.ts to change copy, feature highlights, completion label, completion mode, and final route.",
|
|
576
|
+
"Completion calls the copied onboarding-state adapter. Replace the memory adapter before hosted production use.",
|
|
577
|
+
],
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
id: "multi-screen-with-legal",
|
|
581
|
+
name: "Multi-screen onboarding with legal review",
|
|
582
|
+
description: "Adds welcome, feature highlights, and a final legal review step powered by mds/legal-documents.",
|
|
583
|
+
compatibility: { navigation: ["expo-router"], aliases: ["@"] },
|
|
584
|
+
dependencies: [runtime("expo-router", "~56.2.6", "expo")],
|
|
585
|
+
composedItems: ["mds/legal-documents", "mds/onboarding-state"],
|
|
586
|
+
assets: [
|
|
587
|
+
mdsAsset("src/features/onboarding/onboarding-config-with-legal.ts", "{{featuresDir}}/onboarding/onboarding-config.ts", "support", ["__MDS_APP_NAME__"]),
|
|
588
|
+
mdsAsset("src/features/onboarding/legal-review-screen.tsx", "{{featuresDir}}/onboarding/legal-review-screen.tsx"),
|
|
589
|
+
mdsAsset("src/app/onboarding.tsx", "{{appDir}}/onboarding.tsx", "route"),
|
|
590
|
+
mdsAsset("src/app/onboarding/features.tsx", "{{appDir}}/onboarding/features.tsx", "route"),
|
|
591
|
+
mdsAsset("src/app/onboarding/legal.tsx", "{{appDir}}/onboarding/legal.tsx", "route"),
|
|
592
|
+
],
|
|
593
|
+
integration: [
|
|
594
|
+
"Replace the placeholder legal content in mds/legal-documents before production release.",
|
|
595
|
+
"The onboarding legal screen imports the shared legal document modal and acceptance hook instead of duplicating legal copy.",
|
|
596
|
+
"Edit onboarding-config.ts to change the feature highlights, legal step copy, completion label, completion mode, and final route.",
|
|
597
|
+
],
|
|
598
|
+
},
|
|
599
|
+
],
|
|
600
|
+
assets: [
|
|
601
|
+
mdsAsset("src/features/onboarding/welcome-screen.tsx", "{{featuresDir}}/onboarding/welcome-screen.tsx"),
|
|
602
|
+
mdsAsset("src/features/onboarding/features-screen.tsx", "{{featuresDir}}/onboarding/features-screen.tsx"),
|
|
603
|
+
],
|
|
604
|
+
integration: {
|
|
605
|
+
summary: "Add production onboarding routes to an Expo Router stack.",
|
|
606
|
+
instructions: [
|
|
607
|
+
"Start users at /onboarding, then replace or extend the copied screens as the product flow matures.",
|
|
608
|
+
"Use mds/onboarding-state to choose memory, Zustand-local, or Supabase persistence without changing the screens.",
|
|
609
|
+
],
|
|
610
|
+
notes: [
|
|
611
|
+
"Onboarding UI does not import Zustand or Supabase directly.",
|
|
612
|
+
"The default composed persistence adapter is memory-only and is not a hosted legal audit record.",
|
|
613
|
+
"Preference/profile intake is intentionally omitted until the app can store the responses or change behavior from them.",
|
|
614
|
+
"Use a with-legal variant when onboarding needs legal review from mds/legal-documents.",
|
|
615
|
+
],
|
|
616
|
+
},
|
|
617
|
+
preview: {
|
|
618
|
+
description: "Welcome, feature highlights, optional legal review, and editable completion handoff.",
|
|
619
|
+
},
|
|
620
|
+
}),
|
|
621
|
+
defineItem({
|
|
622
|
+
id: "mds/onboarding-state",
|
|
623
|
+
name: "Onboarding persistence adapters",
|
|
624
|
+
description: "Completion and legal-acceptance adapters for memory, Zustand-local, Supabase, or Zustand cache plus Supabase sync.",
|
|
625
|
+
kind: "integration",
|
|
626
|
+
tags: ["onboarding", "persistence", "adapter", "legal"],
|
|
627
|
+
categories: ["onboarding", "support"],
|
|
628
|
+
compatibility: SDK_56_ALIAS,
|
|
629
|
+
relatedItems: ["mds/onboarding", "mds/legal-documents", "mds/auth"],
|
|
630
|
+
variants: [
|
|
631
|
+
{
|
|
632
|
+
id: "memory",
|
|
633
|
+
name: "Memory adapter",
|
|
634
|
+
description: "In-process completion and legal acceptance. Useful for clean apps and demos, not hosted legal records.",
|
|
635
|
+
compatibility: { navigation: ["expo-router"], aliases: ["@"] },
|
|
636
|
+
assets: [
|
|
637
|
+
mdsAsset("src/features/onboarding-state/adapters/memory-onboarding-state-adapter.ts", "{{featuresDir}}/onboarding-state/onboarding-state-adapter.ts", "support"),
|
|
638
|
+
],
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
id: "zustand-local",
|
|
642
|
+
name: "Zustand local adapter",
|
|
643
|
+
description: "Persists onboarding completion and legal acceptance on-device with Zustand. Not a hosted audit trail.",
|
|
644
|
+
compatibility: { navigation: ["expo-router"], aliases: ["@"] },
|
|
645
|
+
dependencies: [
|
|
646
|
+
runtime("zustand", "^5.0.8"),
|
|
647
|
+
runtime("@react-native-async-storage/async-storage", "2.2.0", "expo"),
|
|
648
|
+
],
|
|
649
|
+
assets: [
|
|
650
|
+
mdsAsset("src/features/onboarding-state/onboarding-store.ts", "{{featuresDir}}/onboarding-state/onboarding-store.ts", "support"),
|
|
651
|
+
mdsAsset("src/features/onboarding-state/onboarding-state-zustand.ts", "{{featuresDir}}/onboarding-state/onboarding-state-zustand.ts", "support"),
|
|
652
|
+
mdsAsset("src/features/onboarding-state/adapters/zustand-onboarding-state-adapter.ts", "{{featuresDir}}/onboarding-state/onboarding-state-adapter.ts", "support"),
|
|
653
|
+
],
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
id: "supabase",
|
|
657
|
+
name: "Supabase adapter",
|
|
658
|
+
description: "Uses user_onboarding_state and user_legal_acceptances as the source of truth after sign-in.",
|
|
659
|
+
compatibility: { navigation: ["expo-router"], aliases: ["@"] },
|
|
660
|
+
dependencies: [runtime("@supabase/supabase-js", "^2.112.3")],
|
|
661
|
+
assets: [
|
|
662
|
+
mdsAsset("src/features/onboarding-state/onboarding-state-supabase.ts", "{{featuresDir}}/onboarding-state/onboarding-state-supabase.ts", "support"),
|
|
663
|
+
mdsAsset("src/features/onboarding-state/adapters/supabase-onboarding-state-adapter.ts", "{{featuresDir}}/onboarding-state/onboarding-state-adapter.ts", "support"),
|
|
664
|
+
],
|
|
665
|
+
integration: [
|
|
666
|
+
"Apply supabase/migrations/0001_mds_auth_onboarding.sql before relying on remote persistence.",
|
|
667
|
+
"Legal writes require a signed-in user id. Pre-auth local acceptance is not a hosted record.",
|
|
668
|
+
],
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
id: "zustand-supabase",
|
|
672
|
+
name: "Zustand cache plus Supabase",
|
|
673
|
+
description: "Zustand is the local cache and pending queue. Supabase remains the canonical store.",
|
|
674
|
+
compatibility: { navigation: ["expo-router"], aliases: ["@"] },
|
|
675
|
+
dependencies: [
|
|
676
|
+
runtime("zustand", "^5.0.8"),
|
|
677
|
+
runtime("@react-native-async-storage/async-storage", "2.2.0", "expo"),
|
|
678
|
+
runtime("@supabase/supabase-js", "^2.112.3"),
|
|
679
|
+
],
|
|
680
|
+
assets: [
|
|
681
|
+
mdsAsset("src/features/onboarding-state/onboarding-store.ts", "{{featuresDir}}/onboarding-state/onboarding-store.ts", "support"),
|
|
682
|
+
mdsAsset("src/features/onboarding-state/onboarding-state-supabase.ts", "{{featuresDir}}/onboarding-state/onboarding-state-supabase.ts", "support"),
|
|
683
|
+
mdsAsset("src/features/onboarding-state/onboarding-state-zustand-supabase.ts", "{{featuresDir}}/onboarding-state/onboarding-state-zustand-supabase.ts", "support"),
|
|
684
|
+
mdsAsset("src/features/onboarding-state/adapters/zustand-supabase-onboarding-state-adapter.ts", "{{featuresDir}}/onboarding-state/onboarding-state-adapter.ts", "support"),
|
|
685
|
+
],
|
|
686
|
+
integration: [
|
|
687
|
+
"Apply supabase/migrations/0001_mds_auth_onboarding.sql before relying on remote persistence.",
|
|
688
|
+
"Zustand must not be treated as the legal source of truth when this variant is selected.",
|
|
689
|
+
],
|
|
690
|
+
},
|
|
691
|
+
],
|
|
692
|
+
assets: [
|
|
693
|
+
mdsAsset("src/features/onboarding-state/onboarding-state-types.ts", "{{featuresDir}}/onboarding-state/onboarding-state-types.ts", "support"),
|
|
694
|
+
mdsAsset("src/features/onboarding-state/onboarding-state-core.ts", "{{featuresDir}}/onboarding-state/onboarding-state-core.ts", "support"),
|
|
695
|
+
mdsAsset("src/features/onboarding-state/onboarding-state-memory.ts", "{{featuresDir}}/onboarding-state/onboarding-state-memory.ts", "support"),
|
|
696
|
+
mdsAsset("src/features/onboarding-state/onboarding-state.ts", "{{featuresDir}}/onboarding-state/onboarding-state.ts", "support"),
|
|
697
|
+
mdsAsset("src/features/legal/legal-acceptance-config.ts", "{{featuresDir}}/legal/legal-acceptance-config.ts", "support"),
|
|
698
|
+
],
|
|
699
|
+
integration: {
|
|
700
|
+
summary: "Copy adapter contracts and one persistence implementation for onboarding completion and legal acceptance.",
|
|
701
|
+
instructions: [
|
|
702
|
+
"Choose exactly one variant so onboarding-state-adapter.ts has a single implementation.",
|
|
703
|
+
"Import the copied onboarding-state module from screens and legal hooks instead of Zustand or Supabase.",
|
|
704
|
+
"Memory and Zustand-local are not hosted legal audit records.",
|
|
705
|
+
],
|
|
706
|
+
notes: [
|
|
707
|
+
"Supabase variants write user-scoped, version-aware legal rows and do not update or delete those rows from the client.",
|
|
708
|
+
"Zustand is canonical only for the zustand-local variant. With Supabase it is cache-only.",
|
|
709
|
+
],
|
|
710
|
+
},
|
|
711
|
+
}),
|
|
712
|
+
defineItem({
|
|
713
|
+
id: "mds/onboarding-auth-supabase",
|
|
714
|
+
name: "Onboarding plus Supabase auth composition",
|
|
715
|
+
description: "Wires onboarding, Supabase auth, and user-scoped onboarding persistence.",
|
|
716
|
+
kind: "integration",
|
|
717
|
+
tags: ["onboarding", "auth", "supabase", "persistence", "with-auth"],
|
|
718
|
+
categories: ["onboarding", "auth", "flows"],
|
|
719
|
+
compatibility: SDK_56_ROUTER,
|
|
720
|
+
composedItems: [
|
|
721
|
+
"mds/onboarding",
|
|
722
|
+
"mds/auth",
|
|
723
|
+
"mds/onboarding-state",
|
|
724
|
+
],
|
|
725
|
+
relatedItems: ["mds/settings"],
|
|
726
|
+
assets: [
|
|
727
|
+
mdsAsset("src/features/onboarding/onboarding-persistence-sync.tsx", "{{featuresDir}}/onboarding/onboarding-persistence-sync.tsx", "support"),
|
|
728
|
+
],
|
|
729
|
+
integration: {
|
|
730
|
+
summary: "Compose onboarding and Supabase auth, then replace the default memory persistence adapter with a Supabase-backed adapter.",
|
|
731
|
+
instructions: [
|
|
732
|
+
"Install mds/onboarding-state --variant supabase or zustand-supabase so hosted legal acceptance is user-scoped.",
|
|
733
|
+
"Keep /sign-in and /sign-up public; include legal routes only when mds/legal-documents is selected separately or through legal onboarding.",
|
|
734
|
+
"If legal onboarding is selected, prefer intro, features, auth, then legal so legal rows are written with a known user id.",
|
|
735
|
+
"Apply supabase/migrations/0001_mds_auth_onboarding.sql; generated apps include .env.local with Supabase publishable credentials plus a blank tracked .env.example template.",
|
|
736
|
+
],
|
|
737
|
+
notes: [
|
|
738
|
+
"This composition does not add mds/db and does not install Firebase or Convex persistence.",
|
|
739
|
+
"Zustand remains a cache when both Zustand and Supabase are selected.",
|
|
740
|
+
],
|
|
741
|
+
},
|
|
742
|
+
}),
|
|
743
|
+
defineItem({
|
|
744
|
+
id: "mds/db",
|
|
745
|
+
name: "Database adapter contract",
|
|
746
|
+
description: "Provider-neutral database adapter contract with Supabase implementation and Firebase skeleton.",
|
|
747
|
+
kind: "integration",
|
|
748
|
+
tags: ["database", "data", "adapter", "supabase", "firebase", "eject:data"],
|
|
749
|
+
categories: ["data", "support"],
|
|
750
|
+
compatibility: SDK_56_ALIAS,
|
|
751
|
+
relatedItems: ["mds/auth", "mds/data-local", "mds/onboarding-state"],
|
|
752
|
+
variants: [
|
|
753
|
+
{
|
|
754
|
+
id: "supabase",
|
|
755
|
+
name: "Supabase adapter",
|
|
756
|
+
description: "Copies the provider-neutral contract, typed app schema, Supabase adapter, and Supabase-only factory.",
|
|
757
|
+
dependencies: [
|
|
758
|
+
runtime("@supabase/supabase-js", "^2.112.3"),
|
|
759
|
+
runtime("@react-native-async-storage/async-storage", "2.2.0", "expo"),
|
|
760
|
+
],
|
|
761
|
+
assets: [
|
|
762
|
+
mdsAsset("src/db/supabase.ts", "src/db/supabase.ts", "support"),
|
|
763
|
+
mdsAsset("src/db/index.supabase.ts", "src/db/index.ts", "support"),
|
|
764
|
+
mdsAsset("src/services/supabase.ts", "src/services/supabase.ts", "support"),
|
|
765
|
+
mdsAsset("env/supabase.env.example", ".env.example", "support"),
|
|
766
|
+
],
|
|
767
|
+
integration: [
|
|
768
|
+
"Use getAdapter() from src/db/index.ts instead of importing Supabase directly from screens or feature logic.",
|
|
769
|
+
"Keep Supabase service-role and secret keys out of Expo client code.",
|
|
770
|
+
"Use Postgres functions or server routes for atomic multi-step writes; the generated client transaction method is a callback boundary only.",
|
|
771
|
+
],
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
id: "firebase",
|
|
775
|
+
name: "Firebase skeleton",
|
|
776
|
+
description: "Copies the provider-neutral contract, typed app schema, Firebase skeleton adapter, and Firebase-only factory.",
|
|
777
|
+
dependencies: [
|
|
778
|
+
runtime("firebase", "^12.17.1"),
|
|
779
|
+
runtime("@react-native-async-storage/async-storage", "2.2.0", "expo"),
|
|
780
|
+
],
|
|
781
|
+
assets: [
|
|
782
|
+
mdsAsset("src/db/firebase.ts", "src/db/firebase.ts", "support"),
|
|
783
|
+
mdsAsset("src/db/index.firebase.ts", "src/db/index.ts", "support"),
|
|
784
|
+
mdsAsset("src/services/firebase.ts", "src/services/firebase.ts", "support"),
|
|
785
|
+
mdsAsset("env/firebase.env.example", ".env.example", "support"),
|
|
786
|
+
],
|
|
787
|
+
integration: [
|
|
788
|
+
"Treat the Firebase adapter as a skeleton until Firestore collection paths, auth rules, and query mapping are defined.",
|
|
789
|
+
"Wire Firestore onSnapshot for subscriptions after the app schema is finalized.",
|
|
790
|
+
"Use Firebase JS SDK for this source-copy variant; React Native Firebase requires a development build and native config plugins.",
|
|
791
|
+
],
|
|
792
|
+
},
|
|
793
|
+
],
|
|
794
|
+
assets: [
|
|
795
|
+
mdsAsset("src/db/adapter.ts", "src/db/adapter.ts", "support"),
|
|
796
|
+
mdsAsset("src/types/database.ts", "src/types/database.ts", "support"),
|
|
797
|
+
],
|
|
798
|
+
integration: {
|
|
799
|
+
summary: "Copy the stable database adapter contract and one provider implementation into generated apps.",
|
|
800
|
+
instructions: [
|
|
801
|
+
"Keep product code typed against DatabaseAdapter and the app-specific AppDatabase schema.",
|
|
802
|
+
"Choose exactly one provider variant so src/db/index.ts imports only the selected backend.",
|
|
803
|
+
"Extend src/types/database.ts with the app's real table or collection rows before building product data flows.",
|
|
804
|
+
],
|
|
805
|
+
notes: [
|
|
806
|
+
"This is a narrow data boundary, not an ORM, migration system, or query builder.",
|
|
807
|
+
"The Supabase adapter supports reads, writes, realtime subscriptions, and contract-level error mapping.",
|
|
808
|
+
"The Firebase variant is intentionally a skeleton because Firestore document paths are app-specific.",
|
|
809
|
+
],
|
|
422
810
|
},
|
|
423
811
|
}),
|
|
424
812
|
defineItem({
|
|
425
813
|
id: "mds/settings",
|
|
426
814
|
name: "Settings screen",
|
|
427
|
-
description: "
|
|
815
|
+
description: "A reusable settings surface with account summary, sign-out, legal links, and app version details.",
|
|
428
816
|
kind: "screen",
|
|
429
817
|
tags: ["settings", "form", "eject:settings"],
|
|
430
818
|
categories: ["settings", "screens"],
|
|
@@ -448,15 +836,19 @@ const mdsItems = [
|
|
|
448
836
|
],
|
|
449
837
|
},
|
|
450
838
|
],
|
|
451
|
-
composedItems: ["
|
|
452
|
-
relatedItems: ["mds/onboarding-
|
|
839
|
+
composedItems: ["mds/theme-support"],
|
|
840
|
+
relatedItems: ["mds/onboarding", "mds/legal-documents", "mds/auth"],
|
|
453
841
|
assets: [
|
|
842
|
+
mdsAsset("src/features/auth/auth-types.ts", "{{featuresDir}}/auth/auth-types.ts", "support"),
|
|
454
843
|
mdsAsset("src/features/settings/settings-screen.tsx", "{{featuresDir}}/settings/settings-screen.tsx"),
|
|
844
|
+
mdsAsset("src/features/settings/settings-screen-logic.ts", "{{featuresDir}}/settings/settings-screen-logic.ts", "support"),
|
|
455
845
|
],
|
|
456
846
|
integration: {
|
|
457
|
-
summary: "Register the settings route as a modal in the root Expo Router stack.",
|
|
847
|
+
summary: "Register the settings route as a modal in the root Expo Router stack and pass a real auth adapter when the app has authentication.",
|
|
458
848
|
instructions: [
|
|
459
849
|
"Add a settings route link from an application-owned screen or menu.",
|
|
850
|
+
"Pass local /terms and /privacy routes when legal documents are installed, and optionally pass an external GDPR URL when compliance copy lives off-app.",
|
|
851
|
+
"Use the placeholder route wrapper only as a starter; generated apps with auth should wire SettingsScreen to the active adapter.",
|
|
460
852
|
],
|
|
461
853
|
},
|
|
462
854
|
}),
|
|
@@ -848,6 +1240,29 @@ const nativeWindUiItems = [
|
|
|
848
1240
|
}),
|
|
849
1241
|
];
|
|
850
1242
|
const ceaItems = [
|
|
1243
|
+
defineItem({
|
|
1244
|
+
id: "expo/splash-screen",
|
|
1245
|
+
name: "Expo SDK 56 splash screen",
|
|
1246
|
+
description: "Light and dark splash icons and expo-splash-screen plugin config matching create-expo-app on SDK 56.",
|
|
1247
|
+
kind: "integration",
|
|
1248
|
+
source: CEA_SOURCE,
|
|
1249
|
+
tags: ["expo", "splash", "appearance"],
|
|
1250
|
+
categories: ["theming", "support"],
|
|
1251
|
+
compatibility: SDK_56_CEA_ASSETS,
|
|
1252
|
+
dependencies: [runtime("expo-splash-screen", "~56.0.14", "expo")],
|
|
1253
|
+
assets: [
|
|
1254
|
+
ceaAsset("assets/images/expo-logo.png", "assets/images/splash-icon.png", "static", "binary"),
|
|
1255
|
+
ceaAsset("assets/images/expo-badge-white.png", "assets/images/splash-icon-dark.png", "static", "binary"),
|
|
1256
|
+
],
|
|
1257
|
+
integration: {
|
|
1258
|
+
summary: "Install the SDK 56 splash icons and configure expo-splash-screen for system light and dark appearance.",
|
|
1259
|
+
instructions: [
|
|
1260
|
+
"Set expo.userInterfaceStyle to automatic.",
|
|
1261
|
+
"Add the expo-splash-screen config plugin with light and dark image and backgroundColor values.",
|
|
1262
|
+
"Keep the splash assets under assets/images, matching create-expo-app.",
|
|
1263
|
+
],
|
|
1264
|
+
},
|
|
1265
|
+
}),
|
|
851
1266
|
defineItem({
|
|
852
1267
|
id: "expo/theme-support",
|
|
853
1268
|
name: "Expo starter theme support",
|