Inspiration

Finding a serious study partner is mostly luck and spam. We wanted a tiny, calm tool that proposes peers by shared topics and compatible levels, with an explainable score instead of black-box “magic.”

What it does

Sign in with Google, pick subjects, get ranked partner suggestions.

See confirmed matches and suggestions separately; one-click confirm.

Auto-syncs a public subjects catalog with each user’s personal list.

How we built it

Stack: Next.js 15 (App Router), TypeScript, Tailwind, shadcn/ui; NextAuth (Google); Prisma (SQLite dev, Postgres prod); Vercel.

Data model: User, UserSubject (stores label_norm, optional level), Match (unique pair).

Matching: Score = 0.7 ⋅ Jaccard overlap + 0.3 ⋅ level affinity 0.7⋅Jaccard overlap+0.3⋅level affinity; threshold ≈ 0.5; top-k.

Perf: Server Components do all fetching; batched queries; strict selects; indices on userId, label_norm; optional tag-cached suggestions.

Challenges we ran into

Google OAuth redirect_uri_mismatch on preview domains.

Type drift between Prisma models and UI DTOs; mismatched store method signatures.

Early N+1 queries and extra getServerSession calls; missing DB indices; sparse data making matches disappear.

Accomplishments that we're proud of

Shipped an interpretable matcher that works with thin data and reads like a formula.

Clean RSC data flow with zero client-side fetching for core pages.

Solid baseline: normalized labels, indices, seeds, and deterministic behavior.

What we learned

Normalization and indexing beat clever models at the start.

Server-side assembly simplifies performance and correctness.

Operational details (OAuth, env separation, migrations on deploy) are day-one tasks, not “later.”

What's next for Peer Learning Matchmaker

Availability and time-zone weighting; study-goal metadata per subject.

Feedback loops (confirm/skip) to tune thresholds and weights.

Safety/UX: report/block, rate limits; multi-language; PWA; light A/B tests on ranking tweaks.

Built With

  • docker-compose-for-local-postgres-caching-&-perf:-next-15-unstable-cache
  • eslint/prettier
  • languages:-typescript
  • react
  • scripts
  • seed/migration
  • selective-queries-and-db-indexes-utilities:-pnpm
  • server-components)
  • shadcn/ui-auth:-nextauth-v4-with-google-oauth-2.0-(google-apis)-data-&-orm:-prisma-databases:-postgresql-(prod)
  • sql-frontend:-next.js-15-(app-router
  • sqlite-(dev)-infra-&-deployment:-vercel-(cd)
  • tailwind-css
  • with
Share this project:

Updates