Preci is a relationship-memory assistant that remembers the little things people mention and turns them into thoughtful gifts at the right time.
The first interactive build contains the core product loop:
- See upcoming people and occasions.
- Open a recipient profile and review accumulated memories.
- Capture a signal as something they mentioned, liked, needed, or wanted to avoid.
- Review explainable gift recommendations.
- Choose a gift and track its preparation.
The app uses typed local fixtures for recommendations as a fallback. The people layer can import one selected contact at a time, or scan birthdays from contacts, calendars, and Google Calendar during onboarding.
npm install
npm startThen scan the QR code with a compatible development build or run an iOS/Android simulator.
Copy .env.local.example to .env.local and add an OpenRouter API key to enable live gift search (via Perplexity Sonar):
cp .env.local.example .env.localWithout a key, the app falls back to the fixture gift ideas for the demo profile. The key is bundled into the client at build time (EXPO_PUBLIC_...), so treat it as visible to anyone who inspects the shipped app — set a spend limit on it, and move gift search behind a backend before a public release.
On first launch (and any time from People → Find birthdays) Preci offers three sources. Each is optional, all reading happens on the device, and nothing is added until the user reviews the list and confirms:
- Contacts —
Contact.getAllDetailsfor name + birthday only. - Calendars — the iOS Birthdays calendar (and any calendar whose title contains "birthday"), read with
expo-calendar. - Google Calendar — Google sign-in with the read-only
calendar.events.readonlyscope, thenevents.list?eventTypes=birthdayon the primary and contacts calendars. Preci signs out right after the import and stores no token.
These need a development or production build; Expo Go and the web preview can't run them. In dev builds, "Load sample birthdays" on the sources screen exercises the review flow without any permissions.
- In Google Cloud Console, create a project and enable the Google Calendar API.
- Configure the OAuth consent screen (External) and add the
calendar.events.readonlyscope. Until Google verifies the app, only listed test users can sign in and they see an "unverified app" warning. - Create an iOS OAuth client with bundle ID
com.vivienkong.preci, and (for Android) a Web OAuth client. - Put the client IDs in
.env.localasEXPO_PUBLIC_GOOGLE_IOS_CLIENT_ID/EXPO_PUBLIC_GOOGLE_WEB_CLIENT_ID, and add the same variables as EAS environment variables so production builds get them.app.config.jsderives the iOS URL scheme from the iOS client ID and only adds the Google Sign-In plugin when it is set, so builds without it still succeed.
Sign-in is optional and lives behind Supabase. If EXPO_PUBLIC_SUPABASE_URL / EXPO_PUBLIC_SUPABASE_ANON_KEY aren't set, the app hides every account screen and works exactly as before. Apple requires the login to be optional (guideline 5.1.1(v)).
v1 ships email + Apple only, so this exists mainly to tie an Occasion Pass purchase to an account and let it follow the user to a new phone. Google and Facebook sign-in are built in src/services/auth.ts (signInWithProvider) but not surfaced in the UI — AuthPanel in App.tsx only renders email and Apple. Re-enabling either provider in the UI means offering Sign in with Apple too (guideline 4.8), which is already the case here.
| Method | How it works |
|---|---|
| Email + password | supabase.auth.signUp / signInWithPassword. Email confirmation and password reset use a one-time code typed into the app, so no deep links are needed. |
| Apple | Native expo-apple-authentication, then signInWithIdToken. iOS only. |
| Google, Facebook (built, not enabled in v1) | System-browser OAuth through Supabase (signInWithOAuth + PKCE), redirecting to preci://auth-callback. No native Google/Facebook SDK is involved. |
Signed-in users get their purchases tied to their account (Purchases.logIn), and Account → Delete account removes the sign-in record.
- Create a Supabase project. Note that free projects pause after 7 days without activity, which makes every login fail until you resume it.
- Project settings → API: copy the URL and anon/publishable key into
.env.local(and into EAS environment variables for builds). - SQL editor: run
supabase/delete_user.sql. Without it, account deletion fails. - Authentication → URL Configuration → add
preci://auth-callbackto Redirect URLs. - Authentication → Providers:
- Email: enable. If "Confirm email" is on, edit the Confirm signup and Reset password email templates so they include
{{ .Token }}(the 6-digit code the app asks for). Supabase's built-in email sender is heavily rate-limited, so set up custom SMTP before launch. - Apple: enable it and set Client IDs to
com.vivienkong.preci. A native-only app needs no secret or Services ID. Theexpo-apple-authenticationplugin adds the entitlement at build time. - Google, Facebook: not needed for v1 (not shown in the UI). If re-enabled later: Google needs a Web OAuth client in Google Cloud (separate from the iOS client used for the Calendar import) with its ID/secret pasted into Supabase; Facebook needs a Meta app with Facebook Login, Live status, and a public privacy policy URL before non-developers can sign in. Both need the Supabase callback URL (
https://<project-ref>.supabase.co/auth/v1/callback) added as an authorized redirect URI.
- Email: enable. If "Confirm email" is on, edit the Confirm signup and Reset password email templates so they include
- Apple asks apps with Sign in with Apple to revoke Apple's tokens when an account is deleted. That needs a server function and an Apple signing key, and isn't built.
- Nothing here has run against a live Supabase project or on a device. Only the UI states, validation, and error handling were exercised (with a deliberately unreachable backend).
- Contacts and calendars are read on the device only after the user grants permission and chooses a source. Only names and birthdays are read, and only the people the user confirms are saved.
- Recipient memories and gifting outcomes become Preci's first-party relationship graph.
- Personally identifying contact fields should not be passed to the recommendation model.
- Product prices and availability must come from merchant services, never from model generation.
- Manual person and occasion entry as a fallback to selected-contact import
- Local persistence, then authenticated cloud sync
- Structured memory extraction and recommendation service
- Live product catalog, pricing, and availability
- RevenueCat subscriptions and one-time Occasion Pass
- Notifications for preparation milestones and outcome review