Meal planning and recipe management app.
Live on heroku as myfoodplanner
- Ruby
- Rails
- Postgres
- Standard (Ruby), which supports the VSCode extension
- RSpec
- Bootstrap 5.3.3
- Material Icons
- Plain CSS (no SASS/SCSS)
- Turbo frames and streams for JS behavior
- Stimulus controllers for custom DOM JavaScript
- ERD https://dbdiagram.io/d/5d6ea192ced98361d6de29cd
- Dependabot dependency manager
- Flexible Recipe Creation
- Recipe Organization
- Recipe Suggestions Based on Ingredient Inventory
- Enter an inventory of ingredients and get a list of recipe suggestions (PR #237)
- Meal Planning
- Display ingredient breakdown for meal prep
- Display page of all meal plan recipes for prep day. Check off ingredients and steps for each recipe. Toggle off a recipe when it is complete.
- Upcoming meal plan displayed in nav bar (if present)
- Copy a whole meal plan to reuse it easily. (PR #150)
- Grocery Lists
- Favorite a shopping list to have it appear at the top of the lists page and sets it as the list in the navbar (PR #1251)
- Mark items as arriving with upcoming delivery order
- Toggle items on/off the shopping list
- Add recurring items to your shopping list with a cadence of weekly, biweekly, or monthly
- Toggle recipe list from upcoming meal plan (PR #1193)
- Notes
- Separate notes section to keep your favorite conversions or other things you may need to jot down that aren't related to one specific recipe. (PR #1155)
- Mark a note as "favorite" for it to appear in the Notes dropdown.
- Tags
- Fork & Clone
bundle- Set up DB:
rake db:setup(Runsdb:create,db:schema:loadanddb:seed) - User: In development, see the seeds file for the user credentials so you can log in
- Run
rails sto start the server
Standard RB is used for enforcing Ruby style guide:
standardrb
standardrb --fix
# or
rake standard:fix- Tests:
bundle exec rspec
This project uses these tools in CI:
Run them locally:
bundle exec reekHeroku runs a cron job to add the weekly shopping_list items to the grocery list. This is accomplished with a rake task plus the cron job. The job is set to run daily because heroku doesn't offer a weekly interval. The rake task has a condition to only allow it to run on a specific day of the week. Configure the cron job.
This feature is dependent on my account having both a list named "grocery" and another list named "weekly items." Without either of those specifically-named lists, this job will error.
The Solid Trio (solid_cache, solid_cable, solid_queue) are implemented as tables in the main database instead of separate tables. https://guides.rubyonrails.org/8_0_release_notes.html
- Bootstrap JS is pinned in the importmap
- Bootstrap CSS is a CDN link in the HTML
Never open the master.key or credentials.yml.enc in atom. This will add newline characters that you can't remove and it will not be able to be unencrypted.
To edit this file, run:
EDITOR="code --wait" bin/rails credentials:edit
If this file gets borked, this post and this post will help.
- log into Heroku CLI with
heroku login - assuming your local copy of the
mainbranch is up to date, rungit push heroku main
- API docs: https://ndb.nal.usda.gov/ndb/doc/index
- Ex Food show page: https://ndb.nal.usda.gov/ndb/foods/show/01009?fgcd=&manu=&format=&count=&max=25&offset=&sort=default&order=asc&qlookup=01009&ds=&qt=&qp=&qa=&qn=&q=&ing=
- Ex Nutrient show page: https://ndb.nal.usda.gov/ndb/nutrients/report/nutrientsfrm?max=25&offset=0&totCount=0&nutrient1=324&nutrient2=&subset=0&sort=c&measureby=g