Skip to content

Houzcetin/APIProject6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

43 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🍽️ Yummy Restaurant β€” API & Admin Dashboard

A fully-featured, modern restaurant management platform built with ASP.NET Core 6. It seamlessly integrates a RESTful Web API, an elegant MVC front-end with a Premium Glassmorphism Admin Panel, and cutting-edge AI capabilities (OpenAI & Hugging Face) for automated content generation and message moderation.

.NET 6 ASP.NET Core Web API EF Core SQL Server OpenAI Hugging Face


πŸ“‘ Table of Contents


🧭 Overview

APIProject6 is a comprehensive restaurant management web application composed of two independent projects working in harmony:

Project Role
APIProject6.WebAPI RESTful Web API β€” data access, business rules, and persistence via Entity Framework Core + SQL Server.
APIProject6.WebUI ASP.NET Core MVC front-end β€” Features a public restaurant website and a beautifully crafted, modern Admin Dashboard utilizing premium CSS design concepts (Glassmorphism, CSS Grid).

Beyond standard CRUD operations, the platform acts as an intelligent assistant by introducing AI-powered features: Recipe generation, AI-assisted customer support, and automatic translation + toxicity moderation for inbox messages.


✨ Key Features

Web API

  • πŸ—οΈ RESTful Architecture with clean, resource-oriented endpoints.
  • πŸ”„ Full CRUD operations across all domain modules (Categories, Products, Chefs, Messages, etc.).
  • πŸ—„οΈ Entity Framework Core (Code-First) with SQL Server backend.
  • πŸ“¦ DTO-based data transfer configured seamlessly with AutoMapper.
  • βœ… FluentValidation for robust incoming request validation.
  • πŸ“– Swagger / OpenAPI integration for interactive documentation and testing.

Premium Web UI & Admin Panel

  • 🎨 Modern Design System: The Admin Dashboard features a highly polished UI with Glassmorphism effects, responsive CSS Grids, smooth hover micro-animations, and gradient buttons.
  • πŸ–ΌοΈ Native Image Lightbox: A beautifully integrated gallery page for administrators with a native, dependency-free CSS/JS lightbox.
  • πŸ“ Interactive Contact Map: Embedded Google Maps UI directly into the admin contact panel for real-time location previewing.
  • 🌐 Public Website: A complete front-end for customers featuring hero banners, dynamic menus, chefs, testimonials, and contact forms.
  • πŸš€ ViewComponents: Reusable, modular UI components to keep Razor views clean.

AI-Powered Integrations

  • πŸ€– AI Recipe Generator (OpenAI): Input ingredients and receive a beautifully formatted recipe instantly.
  • πŸ’¬ Smart Support Replies (OpenAI): The system reads customer feedback and drafts polite, on-brand responses (handling complaints, questions, or praise automatically).
  • 🌐 Auto-Translation (Hugging Face): Translates incoming Turkish messages to English seamlessly in the background (Helsinki-NLP/opus-mt-tr-en).
  • πŸ›‘οΈ Toxicity Moderation (Hugging Face): Scans incoming messages using a classifier (unitary/toxic-bert), flagging them as safe or toxic.
  • ⚑ Retroactive Moderation: A dedicated one-click "Analyze Toxicity" feature for messages manually inserted into the database.

🧠 AI & Integrations

Capability Provider Model / Endpoint Where
Recipe Generation OpenAI Chat Completions API AIController.CreateRecipeWithOpenAI
Support-reply Drafting OpenAI Chat Completions API MessageController.AnswerMessageWithOpenAI
Message Translation Hugging Face Helsinki-NLP/opus-mt-tr-en MessageController.SendMessage
Toxicity Classification Hugging Face unitary/toxic-bert MessageController.SendMessage & AnalyzeExistingMessage

Security Note: All AI keys are supplied through configuration (dotnet user-secrets) and are never committed to source control.


πŸ—οΈ Architecture

APIProject6/
β”œβ”€β”€ APIProject6.WebAPI/          # RESTful Web API Layer
β”‚   β”œβ”€β”€ Controllers/             # API Endpoints
β”‚   β”œβ”€β”€ Context/                 # EF Core DbContext
β”‚   β”œβ”€β”€ Dtos/                    # Data Transfer Objects
β”‚   β”œβ”€β”€ Entities/                # Domain models
β”‚   β”œβ”€β”€ Mapping/                 # AutoMapper profiles
β”‚   β”œβ”€β”€ Migrations/              # EF Core Code-First migrations
β”‚   └── ValidationRules/         # FluentValidation rules
β”‚
β”œβ”€β”€ APIProject6.WebUI/           # ASP.NET Core MVC Layer
β”‚   β”œβ”€β”€ Controllers/             # MVC Controllers (Website, Admin, AI)
β”‚   β”œβ”€β”€ Views/                   # Razor views with premium styling
β”‚   β”œβ”€β”€ ViewComponents/          # UI components
β”‚   β”œβ”€β”€ Dtos/                    # Client-side DTOs
β”‚   └── wwwroot/                 # Static assets (CSS, JS, images)
β”‚
└── APIProject6.sln

🧰 Tech Stack

  • Backend: ASP.NET Core 6 (Web API & MVC)
  • Database: Entity Framework Core, Microsoft SQL Server
  • Libraries: AutoMapper, FluentValidation, Newtonsoft.Json, Swashbuckle
  • AI Services: OpenAI API, Hugging Face Inference API
  • Frontend: HTML5, Vanilla CSS3 (Glassmorphism, CSS Grid), JavaScript (ES6), Bootstrap

πŸš€ Getting Started

Prerequisites

  • .NET 6 SDK
  • Visual Studio 2022 / JetBrains Rider / VS Code
  • SQL Server (LocalDB or Express)
  • EF Core CLI (dotnet tool install --global dotnet-ef)

1. Clone & Restore

git clone https://github.com/Houzcetin/APIProject6.git
cd APIProject6
dotnet restore

2. Configure the Database

Update the connection string in APIProject6.WebAPI/Context/APIContext.cs to point to your local SQL Server instance.

3. Apply Migrations

dotnet ef database update --project APIProject6.WebAPI

πŸ” Configuration (API Keys & Secrets)

To enable the AI features (OpenAI and Hugging Face), you must configure your API keys securely using .NET User Secrets:

cd APIProject6.WebUI

dotnet user-secrets init
dotnet user-secrets set "OpenAI:ApiKey" "sk-your-openai-key"
dotnet user-secrets set "HuggingFace:ApiKey" "hf_your-huggingface-token"

▢️ Running the Applications

Both projects must be running simultaneously. The Web UI expects the Web API to be hosted at https://localhost:7277.

  1. Start the Web API:

    dotnet run --project APIProject6.WebAPI

    Swagger documentation will be available at https://localhost:7277/swagger.

  2. Start the Web UI:

    dotnet run --project APIProject6.WebUI

    The main application will be available at https://localhost:7208.


πŸ“‘ API Reference

The API follows strict RESTful conventions. Here is an example of the /api/Products endpoint:

Method Endpoint Description
GET /api/Products List all products
POST /api/Products Create a new product
GET /api/Products/GetProduct?id={id} Get a product by ID
PUT /api/Products Update an existing product
DELETE /api/Products?id={id} Delete a product

πŸ“Έ Screenshots

1. Modern Admin Dashboard (Glassmorphism & Grid UI)

Admin Dashboard & Contact UI

2. Premium Image Gallery & Native Lightbox

Glassmorphism Gallery & Lightbox

3. AI Message Moderation (Toxic-Bert) & Auto-Reply

AI Toxicity Analyzer & Message List

4. Public Restaurant Website

Public Restaurant Website


Developed by Oğuz Γ‡etin
GitHub Profile

Built with passion, ASP.NET Core 6, and modern AI.

About

Full-stack restaurant management app built with ASP.NET Core 6, RESTful Web API, MVC Web UI, EF Core, SQL Server, and AI features for recipe generation, support replies, translation, and message moderation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors