A full-stack application that intakes clinician research problems and matches them with relevant faculty using hybrid keyword + semantic (pgvector) similarity.
See SETUP.md for installation and local development instructions.
src/
├── app/ # Next.js App Router pages and API routes
│ ├── api/ # REST endpoints (auth, submissions, faculty, matching, embeddings)
│ ├── auth/ # Sign-in, account creation, invite redemption
│ ├── dashboard/ # Admin dashboard
│ ├── faculty/ # Faculty directory and profile pages
│ ├── forum/ # Grant/collaboration forum
│ ├── submissions/ # Submission intake and management
│ └── (marketing)/ # Landing page
├── components/ # React components
│ ├── ui/ # Base UI primitives (Card, Input, Modal, etc.)
│ ├── faculty/ # Faculty profile form
│ ├── dashboard/ # Dashboard widgets
│ ├── forum/ # Forum components
│ └── actions/ # Action buttons and selects
├── lib/ # Shared utilities (Prisma client, matching logic, helpers)
├── types/ # TypeScript types and NextAuth config
└── styles/ # Global CSS
prisma/
├── schema.prisma # Database schema (13 models)
├── migrations/ # SQL migration files
└── seed.ts # Seed script with example data
scripts/
└── run.sh # One-command setup and run script
| Model | Purpose |
|---|---|
| User | Accounts with roles: CLINICIAN, FACULTY, ADMIN, REVIEWER |
| FacultyProfile | Faculty details — keywords, methods, domains, equipment, embedding |
| Publication | Faculty publications with vector embeddings |
| Grant | Faculty grants with vector embeddings |
| Submission | Clinician research problems with vector embeddings |
| Match | Links a submission to a faculty member with a similarity score |
| Interaction | Event log for contacts, meetings, notes, status changes |
| Taxonomy | Hierarchical terms (MeSH, internal) |
| EmbeddingMetadata | Tracks embedding provider, model, and dimensions |
Embeddings are stored as vector(1536) columns with IVFFLAT indexes for fast cosine similarity search.
Auth is passwordless and dev-friendly:
/auth/signin and enter any emailCLINICIANpnpm prisma:studio)Seeded accounts (after pnpm prisma:seed):
admin@example.edu — ADMINclinician@example.edu — CLINICIANpnpm dev # Next.js dev server
pnpm build # Production build
pnpm start # Start production server
pnpm lint # ESLint
pnpm test # Vitest
pnpm prisma:generate # Generate Prisma client
pnpm prisma:migrate # Run migrations (dev)
pnpm prisma:studio # Prisma Studio GUI
pnpm prisma:seed # Seed database