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.
- Overview
- Key Features
- AI & Integrations
- Architecture
- Tech Stack
- Getting Started
- Configuration (API Keys & Secrets)
- API Reference
- Screenshots
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.
- ποΈ 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.
- π¨ 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 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.
| 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.
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
- 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
- .NET 6 SDK
- Visual Studio 2022 / JetBrains Rider / VS Code
- SQL Server (LocalDB or Express)
- EF Core CLI (
dotnet tool install --global dotnet-ef)
git clone https://github.com/Houzcetin/APIProject6.git
cd APIProject6
dotnet restoreUpdate the connection string in APIProject6.WebAPI/Context/APIContext.cs to point to your local SQL Server instance.
dotnet ef database update --project APIProject6.WebAPITo 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"Both projects must be running simultaneously. The Web UI expects the Web API to be hosted at https://localhost:7277.
-
Start the Web API:
dotnet run --project APIProject6.WebAPI
Swagger documentation will be available at
https://localhost:7277/swagger. -
Start the Web UI:
dotnet run --project APIProject6.WebUI
The main application will be available at
https://localhost:7208.
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 |
Developed by OΔuz Γetin
GitHub Profile
Built with passion, ASP.NET Core 6, and modern AI.



