Skip to content

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.

Notifications You must be signed in to change notification settings

imsanthosh7/Feedback-Analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🧠 AI Feedback Analyzer (MERN + Hugging Face)

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.


🚀 Live Preview

Submit Feedback: https://feedback-analyzer-client.onrender.com/

Admin Dashboard: https://feedback-analyzer-admin.onrender.com/


✨ Features

  • 🔐 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

🧑‍💻 Tech Stack

Frontend:

  • React (Vite)
  • TailwindCSS
  • ShadCN UI
  • Axios

Backend:

  • Node.js + Express.js
  • MongoDB + Mongoose
  • Hugging Face Inference API

🧠 AI Integration

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`
    }
  }
);

Response

  [
    {
      "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

1. Clone the repo

git clone https://github.com/imsanthosh7/Feedback-Analyzer.git

2. Backend Setup

cd server
npm install

# Create .env file
touch .env

.env example:

PORT=5000
MONGO_URI=your_mongodb_connection
HUGGINGFACE_API_KEY=your_huggingface_api_key

3. Frontend Setup

cd ../client
npm install
npm run dev

📸 Screenshots

User Page App Screenshot

Adimn Dashboard App Screenshot

SignIn Page App Screenshot

SignUp Page App Screenshot

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published