This is the backend server for the PlateFul Recipe App. Built with Node.js, Express, and MongoDB, it provides RESTful APIs for managing recipes, including creating, updating, deleting, filtering, and liking recipes.
👉 https://plateful-21a3d.web.app/
- 📝 Add Recipes – Users can submit detailed recipes with title, cuisine, prep time, ingredients, and images.
- 🔍 Filter Recipes – Filter recipes by cuisine using query parameters.
- ❤️ Like Recipes – Users can increment the likes count for a recipe.
- 🔝 Top Recipes – Returns the top 6 most-liked recipes.
- 📧 User-Specific Recipes – Fetch recipes based on the owner's email.
- 🛠️ Update & Delete Recipes – Edit and remove existing recipes by ID.
- 🌍 MongoDB Atlas – Cloud-based database integration with collections for scalable recipe data.
-
Clone the repository:
git clone https://github.com/asapial/PlateFul-Server-Side.git cd PlateFul-Server-Side -
Install dependencies:
npm install
-
Create a
.envfile in the root directory with the following variables:DATABASE_URL=yourMongoDBUsername SECRET_KEY=yourMongoDBPassword port=3000 -
Start the server:
npm start
The server will run on http://localhost:3000.
- POST
/addRecipe - Body:
{ "title": "Recipe Title", "ingredients": ["item1", "item2"], "instructions": "Steps...", "cuisine": "Cuisine Name", "prepTime": 30, "categories": ["Category1"], "image": "image-url", "recipeOwnerEmail": "user@example.com" }
- GET
/allRecipe - Query:
?cuisine=Italian(optional)
- GET
/topRecipe - Description: Returns top 6 recipes sorted by likes.
- GET
/recipeDetails/:id
- GET
/myRecipes?email=user@example.com
- PATCH
/likedRecipe/:id
- PUT
/recipes/:id - Body:
{ "title": "Updated Title", "ingredients": ["item1", "item2"], "instructions": "Updated steps...", "cuisine": "Cuisine Name", "prepTime": 25, "categories": ["Category1"], "image": "image-url" }
- DELETE
/recipes/:id
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
All content, including recipes, images, and branding, is the intellectual property of PlateFul unless otherwise stated. Unauthorized use or duplication without explicit permission is strictly prohibited.