Live Link: Moodia
Moodia is a personal well-being application designed to help individuals track their daily mental health. The site allows users to track their moods, habits, and goals, as well as create picture diaries.
Check out the wiki for more information!
- React
- Redux
- TailwindCSS
- Python
- PostgreSQL
- Flask
- SQLAlchemy
- Create a new account and log in
- Track your mood from 5 different options by date
- Create goals and see the progress towards your completion of the goal
- Upload images and create diary entries on those images
To run this application:
-
Clone this repository (only this branch)
git clone https://github.com/hye-kim/moodia.git
-
Install dependencies
pipenv install --dev -r dev-requirements.txt && pipenv install -r requirements.txt
-
Create a .env file based on the .env.example file
-
Setup a PostgreSQL user, password and database that matches the .env file
-
Enter the python virtual environment, migrate the database, seed the database, and run the flask app
pipenv shell
flask db upgrade
flask seed all
flask run
-
Install front end dependencies from the
react-app
directory and then run the front end servernpm install && npm run
Users can add moods to a specific calendar date. Creating the calendar component utilized finding the start and end days of the selected month and creating the array of day components populated with data from the mood entry.
const startMonth = new Date(date.getFullYear(), date.getMonth(), 1);
const calendarItems = [];
for (
let i = 0;
i <= daysPerMonth[startMonth.getMonth()] + startMonth.getDay() - 1;
i++
) {
if (i < startMonth.getDay()) {
calendarItems.push(<div key={i}></div>);
} else {
const calendarPos = i - startMonth.getDay() + 1;
const c = !moodData[calendarPos]
? "white"
: emoteColors[moodData[calendarPos]?.rating + 2];
calendarItems.push(
<CalendarDay
key={i}
color={c}
day={calendarPos}
date={date}
setDate={setDate}
/>
);
}
}
Daily Mood Tracker with Python by NHI VU COMING SOON!
git add . git commit -m "Initial commit: Added Daily Mood Tracker application"
git add <dailymoodtracker.py> git commit -m "Description of the update"
git add <dailymoodtracker.py> git commit -m "Made changes to add mood logging functionality"
The Daily Mood Tracker is a simple Python-based application that helps users log their moods, habits, and goals, and write daily diary entries. It also provides basic trend analysis of logged moods to help users better understand their mental health over time.
-
Log Daily Mood:
- Users can record their mood (e.g., Happy, Sad, Neutral), habits, goals, and a diary entry for the day.
-
View Logs:
- Displays all past entries in a formatted text output.
-
Analyze Mood Trends:
- Provides an analysis of mood trends by counting the occurrences of each mood.
-
Persistent Data:
- All data is saved in an SQLite database (
mood_tracker.db
), so it is retained between sessions.
- All data is saved in an SQLite database (
- Python 3.x installed on your machine.
- No additional libraries are required (SQLite is included with Python).
- Clone or Download the repository:
git clone <dailymoodtracker.py> cd mood-tracker