NutriNest is a Recipe and Nutrition Management System built in Python.
This program allows for users to manage recipes and nutritional data through CSV files, with features for adding, editing, deleting, searching, and organizing recipes. This system automatically calculates nutritional values (calories, carbs, protein, fat) based on a separate nutrition database. It includesa menu-driven console interface with plans for a future GUI using Tkinter.
Recipe Management:
Add, Edit, Delete, and View recipes.
Store recipe name, category, ingredients, servigns, and favorite status.
Automatic nutrition calculation when adding/editing recipes.
Nutrition Database:
Separate Management for ingredients with their nutritional facts.
Add, Edit, Delete, and Search Nutrition Data.
Search and Sort Capabilities:
Search recipes by name (supports partial or muliti-word matching)
Search recipes by ingredient
View recipes alphabetically
Filter recipes by category
Favorites System:
Mark recipes as favorites and view them separately.
File Handling:
Load and Save data using CSV files (recipe and nutrition csv files).
Option to use custom files or use defaults.
Automatic file creation with proper headers.
Modular Architecture
Modular Programming:
Multiple Python files with specific responsibilities.
File Input/Output and CSV Handling:
Reading and writing structured data with csv.DictReader/Writer.
Data Structures:
Lists of dictionaries to represent recipes and nutrition data.
String Processing:
Parsing ingredients, searching with case-insensitve matching.
Search Algorithms:
Multi-word partial matching for recipes and ingredients.
Function Organization:
Clear separation between UI, logic, and data handling.
Error Handling:
Input validation and graceful fallbacks.
Code Reuseability:
Shared helper functions across modules.
Startup:
User choose whether to use default CSV files or provide their own.
Main Menu:
User navigates between:
Recipe Management
Nutrition Management
Search and Sort
Meal Planing Tools
Favorites
Save and Exit
Adding a Recipe:
Users enter details and the program automatically looks up each ingredient in the nutrition database and calculates totals.
Searching:
Supports flexible searching and finds relevate recipes.
Data Persistence
All changes are saved to the CSV files.
The program is designed with scalability in mind to easily add additional features.
The project enhanced my skills in building a complete, multi-module Python application.
By structuring the program into separate handlers (fileHandler, recipeHandler, nutritionHandler, inputHandler), I learned the importance of modular design and separation of concerns, making the code much more maintainable and easier to debug.
I gained significant experience working with CSV files for data persistence, including proper header management and using dictionaries for structured data. The automatic nutrition calculation feature taught me how to parse ingredient strings and match them against a database.
Additioanlly, implementing flexible search functionality (by name and ingredient) helped me udnerstand search algorithms and user-friendly matching techniques. I also improved my ability to manage complex user input flows and menu systems.