- Backend: FastAPI (Python), Postgres + pgvector for vector search
- Embeddings: OpenAI
text-embedding-3-small(swappable later) - Infra: Docker Compose (Postgres + pgvector)
- Mobile: React Native (Expo) under
apps/mobile
apps/api: FastAPI service and recommendation logicapps/mobile: React Native app (Expo)infra: Docker compose and ops.env.example: environment template
-
Copy envs
- Create
.envfrom.env.exampleand fill values (OpenAI key, DB URL).
- Create
-
Start database (Postgres + pgvector)
docker compose -f infra/docker-compose.yml up -d
-
Backend (FastAPI)
cd apps/apipython3 -m venv .venv && source .venv/bin/activatepip install -r requirements.txtuvicorn app.main:app --reload
-
Mobile (React Native, Expo)
- Bootstrap later:
npx create-expo-app apps/mobile - Then run:
cd apps/mobile && npm start(ornpx expo start) - Recommended libs:
react-native-gesture-handler,react-native-reanimated,expo-location
- Bootstrap later:
- Compute embeddings with OpenAI
text-embedding-3-small(1536 dims) for users and items. - Store vectors in Postgres using
pgvector(vector(1536)column). - Retrieve candidates with ANN index (
ivfflatorhnsw) and re-rank in Python by:- cosine similarity × distance_decay × time_decay (for events) × community_boost × popularity_prior.
- Log swipes (
save/passfor events,connect/passfor people) to improve weights.
- UCLA-first: seed event ingestion with campus calendars + 1–2 city sources.
- Keep embeddings behind a thin interface to swap to local models later.