CommentPulse is an AI-powered web application that analyzes the tone and toxicity of user comments and rewrites them in a more constructive, respectful way. The project leverages Google Gemini for natural language understanding and MongoDB for storing analysis history.
Built as a hackathon project, CommentPulse demonstrates how Generative AI can be applied to real-world communication and moderation challenges.
- AI-powered comment tone & toxicity analysis
- AI-generated rewritten comments to reduce negativity
- Google Gemini API integration for NLP tasks
- MongoDB storage for comment history
- Interactive and simple web interface
- Frontend: HTML, CSS, JavaScript
- Backend: Node.js, Express
- AI / NLP: Google Gemini API
- Database: MongoDB
- APIs: RESTful API architecture
- User submits a comment through the web interface
- The backend server receives the input
- The server calls the Google Gemini API to:
- Analyze tone and toxicity
- Generate a more constructive rewritten version
- Results are stored in MongoDB
- The analyzed output is returned and displayed to the user
- Node.js (v18 or higher recommended)
- MongoDB (local or MongoDB Atlas)
- Google Gemini API key
git clone https://github.com/yabodetchou/CommentPulse.git cd CommentPulse
npm install
—--
- Create a .env file in the root directory and add:
GEMINI_API_KEY=your_gemini_api_key_here MONGODB_URI=your_mongodb_connection_string
—--
node server.js
- Once the server starts, open your browser and navigate to: http://localhost:3000
—--
Screenshots and a demo video are included in the repository to demonstrate the application workflow and user experience.
—--
- Integrating Generative AI APIs into production-style applications
- Designing end-to-end AI pipelines (input → model → output → persistence)
- Managing API keys and environment variables securely
- Building a full-stack web application using Node.js and MongoDB
—--
This project was built as part of the Hack for Hackers (MLH) Hackathon, focused on improving online communication through AI-powered moderation.
—--
- Sentiment and toxicity score visualization
- More granular toxicity categories
- User authentication and saved analysis history
- Public deployment (Vercel / Render)
—--
Yabo Detchou GitHub: https://github.com/yabodetchou