A full-stack MERN application that allows users to submit feedback and receive real-time sentiment analysis (Positive or Negative) using Hugging Face's transformer model. Built with a clean and modern UI using ShadCN UI and TailwindCSS.
Submit Feedback: https://feedback-analyzer-client.onrender.com/
Admin Dashboard: https://feedback-analyzer-admin.onrender.com/
- 🔐 User authentication (Sign In / Sign Up with JWT + Cookies)
- 🤖 AI-powered sentiment analysis (after feedback submission)
- 📝 Submit and store feedback
- 📋 Display all feedback per user
- ✨ Responsive UI with ShadCN UI components
- React (Vite)
- TailwindCSS
- ShadCN UI
- Axios
- Node.js + Express.js
- MongoDB + Mongoose
- Hugging Face Inference API
Using Hugging Face’s distilbert-base-uncased-finetuned-sst-2-english to analyze feedback.
// Hugging Face API Example
const response = await axios.post(
'https://api-inference.huggingface.co/models/distilbert-base-uncased-finetuned-sst-2-english',
{ inputs: "The product is amazing!" },
{
headers: {
Authorization: `Bearer YOUR_HUGGINGFACE_API_TOKEN`
}
}
); [
{
"label": "POSITIVE",
"score": 0.9998
},
{
"label": "NEGATIVE",
"score": 0.0001
}
]
]
📦 Project Structure
/client → React frontend (Vite + ShadCN UI)
/admin → React frontend (Vite + ShadCN UI)
/server → Node.js backend (Express + MongoDB)
├─ controllers → Logic for handling feedback
├─ models → Mongoose schemas
├─ middleware → authMiddleware.js (JWT verification)
├─ routes → API endpoints
├─ .env → Environment variables
🧑💻 Local Setup
git clone https://github.com/imsanthosh7/Feedback-Analyzer.git
cd server
npm install
# Create .env file
touch .env
PORT=5000
MONGO_URI=your_mongodb_connection
HUGGINGFACE_API_KEY=your_huggingface_api_key
cd ../client
npm install
npm run dev



