Skip to content

Rak2k6/Restuarant-Analytics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🍽️ Restaurant Analytics: AI-Powered Kitchen & Inventory Intelligence

Python React FastAPI License: MIT

Restaurant Analytics is a professional-grade, data-driven platform designed to optimize restaurant operations through predictive intelligence. By bridging the gap between historical sales data and future inventory needs, it empowers restaurateurs to minimize waste, prevent stockouts, and maximize profitability.


🚀 Key Features

📈 Smart Sales Forecasting

  • AI-Driven Predictions: Utilizes Random Forest regression models to predict demand for top-selling menu items over the next 7 days.
  • Context-Aware Learning: Features engineering that considers seasonality, day-of-week patterns, and weekend surges.

🍱 Ingredient-Level Intelligence

  • Automated Recipe Mapping: Dynamically translates predicted dish demand into precise ingredient quantities.
  • Restock Planning: Generates optimized procurement lists based on predicted usage and existing stock levels.

🧊 Inventory Management 2.0

  • Shelf-Life Awareness: Intelligent reordering logic that prioritizes ingredients based on perishability and lead times.
  • Real-time Tracking: A unified dashboard to monitor current stock levels and ingredient health.

📊 Analytics Dashboard

  • Visual KPIs: Instant visibility into total revenue, transaction counts, and category performance.
  • Interactive Charts: Powered by Recharts for clear, actionable data visualization.

🛠️ Tech Stack

Backend (The Brain)

  • FastAPI: High-performance asynchronous API framework.
  • Scikit-learn: Machine learning models for demand forecasting.
  • Pandas/NumPy: Robust data manipulation and numerical processing.
  • Joblib: Efficient model persistence and retrieval.

Frontend (The Interface)

  • React 19: Modern component-based UI.
  • Vite: Lightning-fast build tool and dev server.
  • Tailwind CSS: Utility-first styling for a premium, responsive design.
  • Lucide React: Clean and consistent iconography.
  • Recharts: Responsive charting library.

📥 Installation & Setup

Prerequisites

  • Python 3.9+
  • Node.js 18+ & npm

1. Backend Setup

cd Kitchen_eda
# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Run the API
python app.py

The API will be available at http://localhost:8000

2. Frontend Setup

cd Kitchen_eda/client
npm install
npm run dev

The dashboard will be available at http://localhost:5173


📂 Project Structure

Restuarant-Analytics/
├── Kitchen_eda/             # Core Application Directory
│   ├── app.py               # FastAPI Entry Point
│   ├── prediction_engine.py  # ML Logic & Ingredient Mapping
│   ├── requirements.txt     # Python Dependencies
│   ├── dataset/             # CSV/Excel Data Sources
│   ├── models/              # Trained Joblib Models
│   └── client/              # React Frontend Project
│       ├── src/
│       │   ├── pages/       # Dashboard, Inventory, Predictions
│       │   └── components/  # Reusable UI Elements
│       └── package.json
└── README.md                # Project Documentation

💡 How It Works

  1. Data Ingestion: Upload historical sales CSVs via the Settings page.
  2. Training: The engine trains individual models for top-performing items to understand their unique demand patterns.
  3. Prediction: The system forecasts dish demand for the upcoming week.
  4. Explosion: Dish forecasts are "exploded" into ingredient requirements using the Recipe Mapping master.
  5. Reordering: The final output is a restock plan that ensures you only buy what you'll use before it spoils.

🗺️ Roadmap

  • Support for Multi-outlet management.
  • Integration with POS systems (Toast, Square).
  • Deep Learning (LSTM) models for long-term seasonality.
  • Automated supplier order generation (Email/API).

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


Developed with ❤️ for the Culinary Industry.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors