A journaling app that uses AI to analyze your entries. It detects sentiment, emotions, and topics to help you understand your mental health patterns.
- Journal Entries: Write and save your thoughts privately
- Sentiment Analysis: Tells you if your entry is positive or negative, with confidence scores
- Emotion Detection: Picks out emotions from your writing (28 different emotions)
- Topic Identification: Automatically tags what your entry is about
- Clean UI: Simple, calming design that's easy on the eyes
- Local Storage: Everything stays in your browser - nothing goes to external servers
- Interactive Mascot: Cute animated dog that gives you motivational quotes
The main page with the mascot on the left and the journal form on the right. You can see the "AI Analysis Ready" status at the top when everything's connected.
After you submit an entry, you get three cards showing the results: sentiment (positive/negative), emotions detected, and topics identified. All three appear side-by-side.
All your past entries are saved here. Each one shows the text, when you wrote it, and the sentiment/emotions/topics that were detected. They're organized in a grid so you can scroll through them easily.
- Node.js (v16+) and npm
- Python (v3.8+) and pip
- The trained models should already be in the
models/folder or you can train them yourself using the notebooks in thenotebooks/folder.
-
Get the code
git clone <repository-url> cd Group4COMP377GroupProject
-
Set up the frontend
cd frontend npm install -
Set up the backend
cd ../backend pip install -r requirements.txt
-
Start the backend
cd backend python main.pyYou should see it running on
http://127.0.0.1:8000orlocalhost:8000 -
Start the frontend
cd frontend npm run devIt'll open at
http://localhost:3000 -
Open it up
- Go to
http://localhost:3000in your browser - Make sure the backend is running (you'll see "AI Analysis Ready" at the top)
- Go to
- React (react.dev) - For building the UI
- Tailwind CSS (tailwindcss.com) - For styling
- Vite (vitejs.dev) - Build tool and dev server
- Axios (axios-http.com) - For API calls
- @lottiefiles/dotlottie-react - Handles the animated mascot
- FastAPI (fastapi.tiangolo.com) - API framework
- PyTorch (pytorch.org) - For running the deep learning models
- Transformers (huggingface.co/docs/transformers) - Hugging Face library for DistilBERT
- scikit-learn (scikit-learn.org) - For the sentiment analysis model
- Uvicorn - Server that runs FastAPI
- DistilBERT - Handles topic and emotion classification
- TF-IDF + Linear SVM - Does the sentiment analysis
- MultiLabelBinarizer - Encodes the multi-label outputs
Here's what the backend can do:
GET /health- Check if everything's workingPOST /api/topics/predict- Get topics from your entryGET /api/topics/list- See all available topicsPOST /api/emotions/predict- Get emotions from your entryGET /api/emotions/list- See all available emotionsPOST /api/sentiment/predict- Get sentiment (positive/negative)
When the backend is running, check out:
- Swagger UI:
http://localhost:8000/docs- Interactive API docs - ReDoc:
http://localhost:8000/redoc- Alternative docs view
Uses TF-IDF + Linear SVM trained on Sentiment140 data. It figures out if your entry is positive or negative and gives you a confidence score.
Runs a DistilBERT model we fine-tuned on GoEmotions data. It can pick out up to 28 different emotions from what you write.
Another DistilBERT model that tags your entries with relevant topics. Helps you spot patterns over time. The datass was created with LLM models creating a synthetic dataset.
cd frontend
npm run dev # Start dev server
npm run build # Build for productioncd backend
python main.py # Start development server



