In this assessment, you will build a recipe-sharing platform using the MERN stack (MongoDB, Express, React, Node.js). The platform will allow users to share recipes, search for recipes by ingredients, and rate and comment on other users' recipes.
Requirements
Recipe Management:
- Create Recipe: Users should be able to create recipes with a title, ingredients, steps, and an image.
- View Recipes: Display a list of all available recipes.
- Recipe Details: Users should be able to view detailed information about a recipe, including ingredients, preparation steps, and an image.
Search & Filter:
- Search by Ingredients: Users should be able to search for recipes based on available ingredients.
- Filter by Rating or Time: Allow users to filter recipes by rating or preparation time.
Ratings & Comments:
- Rate Recipes: Users should be able to rate a recipe out of 5 stars.
- Comment on Recipes: Allow users to leave comments and feedback on other users’ recipes.
User Authentication:
- Implement user authentication to allow users to sign up, log in, and log out.
- Users should only be able to rate or comment if they are logged in.
Error Handling:
- Handle errors related to recipe creation, rating, and commenting, providing feedback to users in case of issues.
Backend Requirements:
- Create a RESTful API using Express and Node.js to manage recipes, ratings, comments, and user data.
- Use MongoDB to store recipes, ratings, comments, and user information.