Meal'in is a recipe and mealplan app. User can select from 200+ recipes on the app. The mealplan tool allow user to customize weekly mealplan with automated nutrition dahsboard. It also auto-generates a grocery shopping list once the mealplan is finalzied.
- Heroku
- AWS
- MongoDB
- Express.js
- Node.js
- React
- Redux
- Chart.js
- User authentication, sign in and sign up
- User profile CRUD
- User can see posts from all of their connections
- User can comment on the posts
- User can like a post or a comment
- User can search recipes by one or a combination of the following filters
- Meal category (breakfast, lunch or dinner)
- Budget
- Dish name
- User can also sort the search result by most recent or most popular
- User can user a 7-day mealplan tool to by populating the mealplan with the recipes that they've liked
- The mealplan tool offers live and real-time nutrition dashboard, so user can be mindful when populating the mealplan with the recipe choices
- Once the mealplan is finalized, user can see a auto-generated grocery shopping list that compiles all the ingredients required to cook all the recipes on the
- User can search recipes by one or a combination of the following filters
- Meal category (breakfast, lunch or dinner)
- Budget
- Dish name
mealin_search_small.mov
//search.js
router.get("/", (req, res) => {
let filter = {};
let sortFilter = '';
let title = req.query.title;
let budget = parseInt(req.query.budget);
let category = req.query.category;
let sortme = req.query.sortme;
if (title)
filter.title = { $regex: title, $options: "i" };
if (budget)
filter.budget = budget;
if (category)
filter.category = category;
if (sortme) {
if (sortme === 'popularity') {
sortFilter = '-num_likes';
}
else if (sortme === 'recent') {
sortFilter = '-createdAt'
}
}
Recipe.find(filter).sort(sortFilter).limit(20).exec().then((result) => {
return res.json(result);
});
})
module.exports = router;
- User can user a 7-day mealplan tool to by populating the mealplan with the recipes that they've liked
mealin_mealplan.mov
//mealplan.js
const DaysOfWeek = {
Monday: 'mon',
Tuesday: 'tue',
Wednesday: 'wed',
Thursday: 'thu',
Friday: 'fri',
Saturday: 'sat',
Sunday: 'sun',
}
const MealType = {
Breakfast: 'breakfast',
Lunch: 'lunch',
Dinner: 'dinner'
}
const MealDay = new Schema({
day: {
type: String,
required: true,
enum: Object.values(DaysOfWeek)
},
meal_type: {
type: String,
required: true,
enum: Object.values(MealType)
},
recipe_id: {
type: ObjectId,
ref: "Recipe"
},
recipe_title: {
type: String,
required: true,
}
})
function validateMealDayArray(arr) {
return arr.length <= 7 * 3 && arr.length >= 1
}
const MealPlanSchema = new Schema({
name: {
type: String,
required: true
},
owner_id: {
type: ObjectId,
ref: "User",
required: true
},
meals: {
type: [MealDay],
required: true,
validate: [validateMealDayArray, '{PATH} exceeds max size of 21']
},
})