Add Flask backend for Weather Mood Journal with CRUD, mood suggestion… #221
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a Flask backend for the Weather Mood Journal, allowing users to log moods along with weather context and manage their entries.
Features Implemented:
Log Mood (POST /log)
Create a new mood entry with date and weather.
Optional mood; if not provided, a random mood is suggested based on the weather.
Retrieve Entries (GET /entries)
Returns all logged entries in JSON format.
Get Suggested Moods (GET /moods?weather=)
Returns a list of suggested moods corresponding to a specific weather type.
Update Entry (PUT /update/)
Update an existing entry’s date, weather, or mood using its timestamp.
Delete Entry (DELETE /delete/)
Delete an entry by timestamp.
CSV Storage & Privacy
Entries are stored in mood_journal.csv.
CSV is not committed to the repo to protect user data.
.gitignore added to prevent committing sensitive logs.
CSV is initialized with headers if it doesn’t exist.
CSV Storage
Entries are stored in mood_journal.csv.
CSV is initialized with headers if it doesn’t exist.
Mood Map Dictionary (mood_map.py)
Stores moods associated with each weather type for automatic suggestions.