A secure career guidance platform that connects students with mentors. Students create profiles and get matched with professionals; they can chat (ephemeral, not stored) and use voice/video calls within a session.
- Student registration: Sign up with name, age, field of study, interests, and goals. AI-driven follow-up questions for better matching.
- Professional registration: Sign up with bio, expertise, and experience.
- Matching: Rule-based matching by field of study and expertise; students can request a session with a mentor.
- Sessions: Request -> Accept -> Active -> End. Only session metadata is stored; chat is ephemeral and cleared when the session ends.
- Chat: Polling-based chat per session (no WebSocket required). Messages are kept in memory only and deleted when the session ends. Works with just
npm run dev. - Voice/Video: Optional WebRTC (peer-to-peer) with signaling over the WebSocket server when running
npm run ws. - Reporting: Students can report professionals; professionals can report students (reason + description).
- Frontend: Next.js 16 (App Router), React, Tailwind CSS
- Backend: Next.js API routes, WebSocket server (Node,
ws) - Database: PostgreSQL with Prisma
- Auth: NextAuth.js (credentials, JWT)
- AI: OpenAI API for personalized student questions (optional; falls back to static questions if no key)
-
Clone and install
cd PathPilot npm install -
Environment
- Copy
.env.exampleto.env. - Set
DATABASE_URLto your PostgreSQL connection string. - Set
NEXTAUTH_SECRETto a long random secret, for example withopenssl rand -base64 32. - Optional: set
OPENAI_API_KEYfor AI-generated onboarding questions. - Optional: set
WS_PORT(default3001) andNEXT_PUBLIC_WS_URL(for examplews://localhost:3001) for the WebSocket server. - Do not commit your real
.env. The repository keeps only.env.example.
- Copy
-
Database
npx prisma db push npx prisma generate
-
Run
- Chat only (no voice/video):
npm run dev
- Chat + voice/video:
npm run dev:all
- Chat only (no voice/video):
-
Open http://localhost:3000. Sign up as a student or mentor, complete onboarding, click Chat to see your sessions, then Open chat to message. Use End session to close the session and clear chat history.
npm run dev- Next.js dev server (chat works via polling)npm run dev:all- Next.js + WebSocket server (adds voice/video calls)npm run build- Production buildnpm run start- Production servernpm run ws- WebSocket server (chat + WebRTC signaling)npm run db:push- Push Prisma schema to the databasenpm run db:studio- Open Prisma Studio
app/- Next.js App Router (auth, dashboard, chat, API routes)app/api/- REST APIs: auth, students, professionals, sessions, reports,ws-tokenserver/ws/- Optional WebSocket server for WebRTC signalinglib/- Shared utilities: db, auth, ai, matching, chat-messages, ws-authprisma/- Prisma schema
- Auth uses JWT sessions with role-based access for students and professionals.
- Chat is not persisted; it stays in memory only and is cleared when a session ends.
- Protected APIs perform session and role checks.
- Reports are stored for moderation; permanent chat logs are not stored. "# PathPilot-app"
