Brak opisu

Axel Nordh 2e2da4c58e Week planner 9 miesięcy temu
.github 2e2da4c58e Week planner 9 miesięcy temu
.vscode 2d79cc33e4 inital commit 10 miesięcy temu
Controllers 2e2da4c58e Week planner 9 miesięcy temu
Data 2e2da4c58e Week planner 9 miesięcy temu
Models 2e2da4c58e Week planner 9 miesięcy temu
Properties 2d79cc33e4 inital commit 10 miesięcy temu
ViewModels 2e2da4c58e Week planner 9 miesięcy temu
Views 2e2da4c58e Week planner 9 miesięcy temu
bin 2e2da4c58e Week planner 9 miesięcy temu
obj 2e2da4c58e Week planner 9 miesięcy temu
publish 64e0d20f68 one build 9 miesięcy temu
wwwroot 2d79cc33e4 inital commit 10 miesięcy temu
Program.cs 2d79cc33e4 inital commit 10 miesięcy temu
README.md 2d79cc33e4 inital commit 10 miesięcy temu
Recepie.csproj 2d79cc33e4 inital commit 10 miesięcy temu
Recepie.sln 2d79cc33e4 inital commit 10 miesięcy temu
appsettings.Development.json 2d79cc33e4 inital commit 10 miesięcy temu
appsettings.json 2d79cc33e4 inital commit 10 miesięcy temu
week_planner_migration.sql 2e2da4c58e Week planner 9 miesięcy temu

README.md

Recipe Manager

A C# ASP.NET Core MVC web application for managing your personal recipe collection with advanced search and filtering capabilities.

Features

  • Recipe Management: Add, edit, view, and delete recipes
  • Advanced Search: Search recipes by title, description, and ingredients
  • Smart Filtering:
    • Filter by category
    • Include specific ingredients (must-have)
    • Exclude unwanted ingredients (allergens, dietary restrictions)
  • Responsive Design: Works on desktop, tablet, and mobile devices
  • Interactive UI:
    • Ingredient checklist in recipe details
    • Real-time search and filtering
    • Recipe cards with hover effects

Database Configuration

The application connects to a MySQL database with the following configuration:

  • Server: nordh.xyz:3306
  • Database: recept
  • Username: recepieUser
  • Password: v.FV-ssZPzVyev28

Getting Started

Prerequisites

  • .NET 8.0 SDK
  • Access to the MySQL database (credentials provided above)

Running the Application

  1. Clone or download this project
  2. Open the project in Visual Studio Code
  3. Open a terminal and navigate to the project directory
  4. Run the application:

    dotnet run
    
  5. Open your web browser and navigate to http://localhost:5104

Building the Application

dotnet build Recepie.sln

Project Structure

Recepie/
├── Controllers/
│   └── RecipeController.cs      # Main controller with search/filter logic
├── Data/
│   └── RecipeContext.cs         # Entity Framework DbContext
├── Models/
│   └── Recipe.cs                # Recipe entity model
├── ViewModels/
│   └── RecipeIndexViewModel.cs  # ViewModel for index page
├── Views/
│   ├── Recipe/
│   │   ├── Index.cshtml         # Main recipe listing with search/filter
│   │   ├── Details.cshtml       # Recipe details view
│   │   ├── Create.cshtml        # Add new recipe form
│   │   ├── Edit.cshtml          # Edit recipe form
│   │   └── Delete.cshtml        # Delete confirmation
│   └── Shared/
│       └── _Layout.cshtml       # Main layout template
└── wwwroot/
    └── css/
        └── site.css             # Custom styling

Usage

Adding Recipes

  1. Click "Add New Recipe" button
  2. Fill in the recipe details:
    • Title and description
    • Category and difficulty level
    • Preparation and cooking times
    • Number of servings
    • Ingredients (comma-separated)
    • Step-by-step instructions
  3. Click "Save Recipe"

Searching and Filtering

Use the left sidebar to:

  • Search: Enter keywords to search in titles, descriptions, and ingredients
  • Category Filter: Select a specific recipe category
  • Include Ingredients: Enter ingredients that must be present (comma-separated)
  • Exclude Ingredients: Enter ingredients to avoid (comma-separated)

Example Searches

  • Find all recipes with "chicken": Enter "chicken" in the search box
  • Find recipes you can make with eggs and flour: Enter "eggs, flour" in "Must Have Ingredients"
  • Find recipes without nuts: Enter "nuts" in "Must NOT Have Ingredients"
  • Combine filters: Search for "pasta" with "tomato" included and "meat" excluded

Technology Stack

  • Backend: ASP.NET Core 8.0 MVC
  • Database: MySQL with Entity Framework Core
  • Frontend: Bootstrap 5, Font Awesome icons, jQuery
  • Styling: Custom CSS with responsive design

Database Schema

The Recipe entity includes:

  • Id: Primary key
  • Title: Recipe name (required)
  • Description: Brief description
  • Ingredients: Comma-separated list (required)
  • Instructions: Step-by-step cooking instructions
  • Category: Recipe category (e.g., "Main Course", "Dessert")
  • Difficulty: Easy, Medium, or Hard
  • PreparationTimeMinutes: Prep time
  • CookingTimeMinutes: Cooking time
  • Servings: Number of servings
  • CreatedAt/UpdatedAt: Timestamps

Contributing

This is a personal recipe management application. Feel free to customize it for your needs!

License

This project is for personal use.