Recipe Management System is a personalized recipe platform that allows users to store recipes, define dietary preferences, track interactions, and get personalized recommendations based on health goals.
Fetch all recipes, optionally filtered by tag.
Endpoint:
GET http://localhost:5000/api/Recipe?tag={tag}
Response (JSON):
[
{
"id": "recipe-guid",
"title": "Grilled Chicken Salad",
"calories": 350,
"protein": 30,
"fat": 15,
"carbs": 20,
"tags": "healthy,low-carb"
}
]Core tables:
- Users – store user information, dietary preferences, and health goals.
- Recipes – store recipe details and essential nutritional information.
- UserRecipeInteractions – track actions such as Liked, Disliked, or Saved recipes.
Relationships:
- A User can interact with multiple Recipes.
- A Recipe can have interactions from multiple Users.
UserRecipeInteractionsacts as a many-to-many link table betweenUsersandRecipes.
- ASP.NET Core Web API - v8
- Entity Framework Core - v8 (Code-First)
- CQRS pattern with MediatR
- Repository Pattern
- FluentValidation for request validation
- SQL Server
- Mapster for entity mapping
- Swagger for API documentation
- Dependency Injection for services and repositories
- Clone the repository:
git clone https://github.com/yourusername/recipe-management.git- Configure SQL Server in
appsettings.json:
"ConnectionStrings": {
"DefaultConnectionString": "Server=localhost;Database=RecipeDb;Trusted_Connection=True;"
}- Run the application:
dotnet run- Access Swagger UI:
http://localhost:5000/swagger/index.html