Feature : Custom Meals are now supported#507
Merged
CodeWithCJ merged 11 commits intoCodeWithCJ:mainfrom Jan 11, 2026
Merged
Conversation
reverting to SPARKY_FITNESS_APP_DB_USER. The reason is RLS needs regular user and DB upgrade/system activities needs super user. So DB_USER (superuser) and APP_DB_USER (regular user) are not duplicates.
reverting back original DB credentials.
reverting super user vs regular user confusion
CodeWithCJ
approved these changes
Jan 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
BREAKING CHANGES
it is preferred that the user take a backup of the data before updating.
Don't updated the app using watchtower as there are some .env changes that should be noted before making the update.
Major Changes
Previously, the app supported only hard-coded meals such as Breakfast, Lunch, Snacks, and Dinner. These meal types were fixed and could not be customized.
Now, the app supports custom meal types, allowing users to create meals like Pre-Workout, Post-Workout, Evening Snacks, etc.
Earlier,
meal_typewas a column used across the following tables:food_entriesmeal_plansmeal_plan_template_assignmentsfood_entry_mealsThese tables relied on hard-coded meal values.
This has now been refactored so that all meal types are managed through a new
meal_typestable, which has the value for the meals.When a user uses the app for the first time, four default meals: Breakfast, Lunch, Snacks, Dinner are automatically created.
These default meals cannot be changed, as they are shared across all users. Modifying them could break the app.
Apart from these defaults, users can create any number of additional meals.
Meal Sort Order
The default meal has a predefined sort order:
10203040These values must not be changed, as they are used globally by all users.
If a user wants a custom ordering, they can create their own meal, for example:
1The sort order is used by the frontend to display meals in the selected order.
Backend Changes
meal_type_idinstead ofmeal_type.snack1), which could otherwise lead to query conflicts or invalid user data.meal_typevalues to reference the newmeal_typestable.Frontend Changes
meal_typestable instead of hard-coded values.Minor Fixes
Missing Dependency Fix
The package
@dnd-kit/utilitieswas used in:However, it was not installed and was missing from:
The package has now been installed to fix this issue.
Environment Variable Cleanup
The app was previously using two different environment variables with different names but the same purpose:
SPARKY_FITNESS_APP_DB_USERSPARKY_FITNESS_APP_DB_PASSWORDThese were duplicates of:
SPARKY_FITNESS_DB_USERSPARKY_FITNESS_DB_PASSWORDThe code has been updated to only use:
SPARKY_FITNESS_DB_USERSPARKY_FITNESS_DB_PASSWORDThis update was applied in the following files:
SparkyFitnessServer/utils/preflightChecks.jsSparkyFitnessServer/utils/dbMigrations.jsdocker/docker-compose.dev.ymldocker/docker-compose.prod.ymlNot Updated
No changes were made to:
This file was not updated because it was unclear what data should or should not be passed.