by Junqi Zhang
Description:
A digital journal designed to help users document their moods and correlate them with various events. The app utilizes data visualization to assist in identifying patterns in mood fluctuations. It also provides users with the opportunity to reflect on past events. Through pattern recognition and reflection, this app aims to help users better manage their moods.
Tools Involved:
#Local API #D3.js #P5.js #context free grammar
API Usage:
The web app is connected to LM Studio running locally on your computer at http://localhost:1234.
The app makes three types of API calls to LM Studio:
All these calls use LM Studio's OpenAI-compatible API format (/v1/chat/completions)
Data Analysis:
The entries are stored in JSON files for analysis and visualizations.
Among them, the sentiment score and emotional category are auto-suggested by AI, but users can edit the emotional category if they want to.
The source event is fully recorded by users themselves.
The user's custom design will get an auto suggestion from AI according to the entry, but then users have the full freedom to change it to whatever they want.
{
"id": "1764874800000",
"timestamp": "2025-12-04T09:00:00.000Z",
"inputTime": "12/4/2025, 4:00:00 AM",
"userInput": "Woke up from a nightmare. Still feeling uneasy and can't shake this weird feeling.",
"sentimentAnalysis": {
"sentimentScore": 30,
"emotionalCategory": "unsettled"
},
"sourceEvent": {
"category": "health",
"description": "bad dream",
"eventTime": "12/4/2025, 7:30:00 AM"
},
"userCustomDesign": {
"userEmoji": "😰",
"userColor": "#4B0082"
},
"createdAt": 1764874800000
},
Data Visualization:
Monthly mood chart is drawn with p5.js