Vicharanashala Summership . CrowdSourced FAQ Platform
| Role | Name | GitHub |
|---|---|---|
| Team Lead | Amirth Sadhakshi M | sadhami0519 |
| Member | Abhijith B | Abhijith2005binu |
| Member | Aditya Raghuvanshi | aditya12-here |
| Member | Chirag Saxena | Laplaciann |
| Member | Draksharam Rushali | Rushali0312 |
| Member | Khushi Dosi | Khushidosi13 |
| Member | Kiran Belsare | KiranBelsare |
| Member | Lakshmi Sahasra M | sahasraa09 |
| Member | Sukrish | sukrish3637d |
| Member | Vetcha Venkata Sai Pavan | SaiPavanVetcha |
Team No. 11 · Team Count 10
CrowdFAQ is a community-driven FAQ platform for student communities. Students ask questions, the community answers and votes, AI matches incoming questions to existing FAQs, and admins step in last.
Two repositories in one monorepo:
frontend/-- React 18 + Vite SPAbackend/-- NestJS + MongoDB API
faq-query-resolution-system/
|-- frontend/ # React SPA
|-- backend/ # NestJS API
|-- memory/ # Session memory and audit logs
|-- seed-document-status.js
- React 18 + Vite 6 (dev:
npm run dev-> port 5173) - TanStack Router v1 (code-based type-safe routing)
- TanStack Query v5 (server state, infinite pagination, optimistic updates)
- Tailwind CSS v3
- Axios (HTTP client)
Env: Copy .env.example to .env and set VITE_API_URL (default: http://localhost:3000/api).
- NestJS + Mongoose 8 + MongoDB Atlas
- Ollama vector search (MERN-native, replaces Python FAISS)
- HuggingFace Inference API -- free tier ~1,000 req/day;
EMBEDDING_PROVIDER=huggingface; setHUGGINGFACE_API_KEYin backend.env EMBEDDING_PROVIDER=huggingface(cloud, default) |ollama(local) |mock(dev/test)HUGGINGFACE_EMBEDDING_MODEL(default:sentence-transformers/all-MiniLM-L6-v2)OLLAMA_URL,OLLAMA_EMBEDDING_MODELenv vars (only whenEMBEDDING_PROVIDER=ollama)AI_CONFIDENCE_THRESHOLD=0.75-- minimum cosine similarity for a valid AI match
JWT-based authentication with client-side decode, server validation, and auto-redirect on expiry.
- Login + Signup with full form validation
- Role-based access:
intern/admin/superadmin AuthContextpersists session vialocalStorage; Axios interceptor attaches JWT to every request- Exposes both
_idandid(alias) on the user object -- both are the MongoDB ObjectId string - First-time intern WelcomeBanner (fires a one-time PATCH on first login)
The core knowledge base -- browsable, searchable, and community-powered.
- Browse FAQs with debounced search, category filter pills, and infinite scroll
- FAQ detail page with upvote/downvote, feedback, and lightweight markdown rendering
- Admins can create, edit, archive FAQs and trigger AI index rebuild
Semantic search that routes questions to existing FAQs before they hit the queue -- powered by Ollama locally or HuggingFace in the cloud.
HuggingFaceProvider(cloud, default) -- nativefetch, 30s timeout, 384-dim shape validation,wait_for_model: true; fail-fast ifHUGGINGFACE_API_KEYmissingOllamaProvider(local) -- for teams running Ollama on-premisesMockProvider(dev/test) -- deterministic pseudo-embeddings, no external deps- 384-dim float vectors stored in
faq_embeddingscollection - Brute-force cosine similarity with configurable confidence threshold (
AI_CONFIDENCE_THRESHOLD=0.75) - Graceful degradation: if the embedding provider fails,
findBestMatch()returnsnull-- questions save without AI match, no user is ever blocked AiSuggestionBannersurfaces the match with a confidence badge on the Ask page
Instant answers for common document-status queries -- no queue, no wait.
- Keyword match on question title+body detects
document_status_checkintent - Returns live status for NOC, offer letter download, offer letter acceptance, internship beginning
DocumentStatusCardshows green/amber/red status, progress bar, and rejection reason -- without saving a question or calling AI
Community-driven resolution with voting, acceptance, and admin escalation.
- Students submit questions; community posts answers
- Upvote/downvote on answers; colour-coded score (green / grey / red)
- Answer acceptance flow; official admin answer flag
- Admin resolution queue with 30-second auto-refresh; all 4 statuses colour-coded (open=blue, in_progress=yellow, resolved=green, closed=gray)
Keep the platform clean -- users flag, admins review.
FlagButtonon FAQ detail and answer cardsFlagModalwith reason dropdown + optional comment/admin/flagsreview page with tabs: pending / reviewed / dismissed / resolved
Full visibility into platform health and community contribution.
- Resolution queue, FAQ manager, analytics dashboard
- Query Insights tab -- per-category coverage gap + one-click "Create FAQ" shortcut
ContributorRow,MetricWidget,StatusBaranalytics components
E2E tests live in backend/test/ -- run via npm run test:e2e from backend/.
To test intent detection flow:
- Set
STUDENT_EMAILat top ofseed-document-status.js - Run
node seed-document-status.jsfrom project root - Log in as that student and submit a question matching NOC/offer letter keywords
- Auth: JWT in
localStorage;AuthContextdecodes client-side and re-validates withGET /auth/me. 401s auto-redirect to/login. Exposes both_idandid(alias) on the user object -- both are the MongoDB ObjectId string, set from either JWT claim or/auth/meresponse. - No Zustand/Redux: Server state managed entirely via TanStack Query.
- Styling: Pure Tailwind -- no CSS modules, no component library. Indigo primary color.
- AI graceful degradation: If the embedding provider is unavailable,
findBestMatch()returnsnull-- user is never blocked. - Global exception filter: Formats all errors as
{ statusCode, message, timestamp, path }; maps unknown exceptions to 500 without leaking internals.