Full-stack AI semantic search platform with admin dashboard, JWT authentication, and MongoDB integration.
AI-powered semantic FAQ system built with FastAPI, React, MongoDB, and SentenceTransformers. Instead of keyword matching, Smart-FAQ understands the meaning of a question using embeddings and returns the most relevant answer with a confidence score.
Smart-FAQ is a modern full-stack AI application that enables users to ask natural-language questions and receive intelligent responses from a semantic FAQ database.
The system includes:
- β‘ FastAPI backend
- π¨ React frontend (Vite)
- π JWT-based admin authentication
- π§ Semantic search using embeddings
- π MongoDB database
Admins manage FAQs through a protected dashboard, while users interact with a clean AI-powered interface.
- Semantic question matching (embedding-based)
- Confidence score with each response
- Low-confidence fallback handling
- Secure admin dashboard (Add/Delete FAQs)
- JWT-protected API routes
- MongoDB-powered storage
- Responsive glass-style UI
React Frontend
β
FastAPI Backend
β
Embedding Model (SentenceTransformers)
β
MongoDB Database
Flow
- User sends question from React UI
- FastAPI generates embeddings
- MongoDB FAQs are compared semantically
- Best match + confidence score returned
Embedding Model:
all-MiniLM-L6-v2
- React (Vite)
- Fetch API
- Modern CSS (Glass-style UI)
- FastAPI
- Uvicorn
- SentenceTransformers
- PyTorch
- JWT Authentication
- MongoDB
cd backend
pip install -r requirements.txtStart MongoDB locally.
Seed demo data:
python seed_db.pyRun backend:
uvicorn app:app --reloadAPI Docs:
http://127.0.0.1:8000/docs
cd frontend/smartfaq-frontend
npm install
npm run devFrontend runs at:
http://localhost:5173
GET /β Health checkPOST /askβ Semantic question endpoint
POST /admin/loginGET /admin/faqsPOST /admin/faqsDELETE /admin/faqs/{faq_id}
Admin authentication uses JWT tokens.
Login via Admin Mode UI or:
POST /admin/login
Token is required for protected routes.
Populate MongoDB with demo FAQs:
python seed_db.pyLoads data from:
backend/data/seed_faqs.json
- Vector database integration
- Role-based admin permissions
- FAQ categories & filtering
- Docker deployment
MIT License
Hariharan Narlakanti


