A program (and Rust library) that recommends you a meal plan based on your needs
View Demo
·
Report Bug
·
Request Feature
This project is my first one done in Rust, so please excuse any code that could be improved. However, I am working hard to make sure this program is fast, safe, and correct, in the spirit of the Rust language.
A changelog can be found in [CHANGELOG.md]
Check out some benchmarks in the performance section!
If you would just like to download and run the program, executables for Windows, MacOS and Linux can be found in the releases page. If you would like to compile the program locally on your machine:
- cargo & rustc OR
- nix
First, clone the repo:
git clone https://github.com/notusknot/food
cd food
nix build .
The binary and library will be in result/
To build the cli:
cargo build --release
To build just the library:
cargo build --lib --release
The binary and library will be in target/release/
Generate a three meals for one day, between 2100 and 2200 calories:
food 2100 2200 3 1
Generate a whole week of meals between 2500 and 2600 calories per day, with 4 meals per day:
food 2500 2600 4 7
Generate a year's worth of meals between 3600 and 3700 calories per day, with 8 meals per day:
food 3600 3700 8 365
As of the current version, food is very fast. Generating an average meal plan takes about 5 ms:
$ hyperfine "target/release/food 1800 2200 3 7" --warmup 30
Benchmark 1: target/release/food 1800 2200 3 7
Time (mean ± σ): 5.3 ms ± 0.4 ms [User: 2.2 ms, System: 2.1 ms]
Range (min … max): 3.8 ms … 7.2 ms 283 runs
The program can also handle generating large amounts of complex plans quickly:
$ hyperfine "target/release/food 3500 3600 8 365" --warmup 30
Benchmark 1: target/release/food 3500 3600 8 365
Time (mean ± σ): 135.6 ms ± 2.6 ms [User: 20.1 ms, System: 113.1 ms]
Range (min … max): 130.0 ms … 141.5 ms 20 runs
- Custom recipes to database
- Family planning: find meal plans that work for a group of people
- Community-submitted recipes to database
- Pricing per meal, day, week, nutrient, etc
- Automatic grocery list
- Pantry matching (only use ingredients user already has)
- Sharing/exporting plans
- Filter based on more than one nutrient (should be pretty easy)
- Implement breakfast/lunch/dinner/snack sorting (will take brute force work on database)
- Build web interface and compile Rust to WASM + integrate
- More micronutrient filtering options
- Filtering options based on health focus, condition, or diet (i.e. optimize for muscle gain, to help with diabetes, vegetarian, etc)
- Content-based recommendation engine (requires database extension)
This project is still in a very rough phase, so contributions are greatly apreciated. Thank you!
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the GPL License. See LICENSE
for more information.
My website, containing all my up-to-date contact info - notusknot.com
If my website ever goes down, it is archived on the Wayback Machine
- The Rust Discord server and everyone on it for helping me learn Rust
- The Rust Book for helping me learn Rust
- Choose an Open Source License for helping me choose GPL
- Best README template for the base of this very README