SentiLog AI is an open-source platform that combines news sentiment analysis and personal mood journaling. It features a modern React frontend, a robust Node.js/Express backend, and a Python/Flask microservice for ML-powered sentiment/emotion analysis.
SentiLog AI provides a unique fusion of sentiment-aware news analysis and personal mental wellness tracking through the following key features:
- Automatically analyzes current news articles and classifies them based on political bias: Left, Right, or Neutral.
- Helps users recognize media bias and form balanced opinions.
- Uses Natural Language Processing (NLP) models to assess sentiment and ideological leaning in real-time.
- Users can write daily journal entries about their thoughts or experiences.
- The system performs sentiment and emotion analysis (e.g., happy, sad, anxious).
- Helps users track their mental state over time, identifying patterns or triggers.
- Journal data can be cross-referenced with consumed news to understand the impact of external events on personal emotions.
project-root/
β
βββ client/
| βββ index.html/
| βββ public/
β βββ src/ # React frontend (Vite + Tailwind)
β βββ pages/ # JournalPage, NewsPage, Dashboard
β βββ components/ # Navbar, SentimentCard, ChartPanel
β βββ App.jsx
β βββ main.jsx
β
βββ server/ # Node.js + Express backend
β βββ routes/ # journal.js, news.js
β βββ controllers/
| βββ middlewares/ # Express entry
| βββ uploads/
| βββ utils/
β βββ models/ # Mongo schemas
β βββ index.js
β
βββ ml-api/ # Flask-based ML service
β βββ app.py
β βββ model/
| βββ vader_service.py/
β βββ requirements.txt
|
βββ notebook/
| βββ varder_sentiment_demo.ipynb
β
βββ .gitignore
βββ README.md
βββ package.json / envs
git clone https://github.com/your-org/SentiLog-AI.git
cd SentiLog-AI
cd client
npm install
npm run dev
- Built with Vite + React + Tailwind CSS
- Main routes:
/journal
,/news
,/dashboard
- Placeholder components:
Navbar
,TextInput
,SentimentCard
,LineChart
cd ../server
npm install
npm run dev
- Express.js API server
- Connects to MongoDB (see
.env.example
) - Routes:
POST /api/journal/analyze
β calls ML APIPOST /api/news/analyze
β calls ML API
- Uses Mongoose for MongoDB schemas
Once your backend server is running, you can explore all API endpoints using Swagger UI:
https://sentilog-ai.onrender.com/api-docs
This interactive documentation provides:
- Available endpoints and HTTP methods
- Required parameters and request formats
- Sample requests and responses
- Error status codes
Note: If your server runs on a different port, update the URL accordingly (e.g.,
http://localhost:3000/api-docs
).
cd ../ml-api
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python app.py
- Flask microservice
/predict
POST endpoint: accepts{"text": "..."}
and returns mock sentiment/emotion
- Copy
.env.example
inserver/
to.env
and fill in your MongoDB URI and other secrets.
- Comment on the issue you want to work on (frontend, ml-api, express route, schema)
- Fork the repo & clone locally
- Work in the corresponding subfolder
- Open a PR with the title:
[Feature]: <Your Component or Route>
- Frontend: React, Vite, Tailwind CSS
- Backend: Node.js, Express, MongoDB, Mongoose
- ML API: Python, Flask, transformers, vaderSentiment
This project is licensed under the MIT License β see the LICENSE file for details.
The MIT License is a permissive license that allows you to:
- Freely use, copy, modify, and distribute the code.
- Use the project in commercial and non-commercial applications.
- Attribute the original creator(s) in any reused version.
By contributing to this repository, you agree that your contributions will be licensed under the MIT License as well.
_Letβs build the future of mood and news analysis together β one contribution at a time! _