Skip to content

AI-powered culinary companion that turns leftovers into gourmet meals. Features intelligent recipe generation, batch cooking planning, and scientific dish rescue. Built with Next.js 16, TypeScript, MongoDB & Llama 3 (Groq).

License

Notifications You must be signed in to change notification settings

RanitDERIA/Chefini

Repository files navigation

GitHub repo size GitHub stars GitHub forks

Twitter Follow LinkedIn


CHEFINI Logo

Computational Kitchen Companion

Chefini is an intelligent culinary companion that turns your leftovers into gourmet meals, plans your weekly batch cooking, and scientifically rescues dishes gone wrong. Built with Next.js 16 and powered by Llama 3 (Groq), it features a bold brutalist aesthetic and practical AI tools for the modern home cook.

βž₯ Live Demo


Chefini Interface Showcase

Table of Contents

Overview

Cooking shouldn't be stressful or wasteful. Chefini solves common kitchen chaos with three core pillars:

  • Resourcefulness: Instantly generate recipes from whatever ingredients you have on hand.
  • Planning: Create structured 3-5 day meal prep plans to save time and money.
  • Rescue: A scientific "Flavor Rescue Lab" to fix salty, spicy, or bland dishes in real-time.

All wrapped in a high-contrast, partially accessible, and mobile-responsive Brutalist UI.

Prerequisites:

Before setting up Chefini, ensure you have:

Technologies Utilized:

  • Framework: Next.js Next.js 16 (App Router)
  • Language: TypeScript TypeScript
  • Database: MongoDB MongoDB (Mongoose)
  • Styling: Tailwind Tailwind CSS
  • AI Engine: Groq Groq SDK (Llama-3.3-70b-versatile)
  • Auth: NextAuth.js NextAuth.js (v5 Beta)
  • Emails: NextAuth.js Nodemailer / Resend
  • Icons: NextAuth.js Lucide React
  • PDF/Image Gen: NextAuth.js jsPDF & html2canvas

Features:

  • πŸͺ„ Leftover Magic: Input your ingredients and get a tailored recipe instantly.
  • πŸ₯— Intelligent Diet Filtering: Toggle between Veg and Non-Veg recipes with instant visual feedback (🟒/πŸ”΄).
  • πŸ”’ Edge Authentication: Secure, lightning-fast route protection using Next.js Middleware and Auth.js.
  • 🍱 Smart Meal Prep: "Batch Compiler" creates a Sunday prep guide + daily runtime instructions for the week.
  • 🎨 Premium Brutalist UI: Custom dark-themed scrollbars and interactive elements designing for a unique experience.
  • πŸš‘ Flavor Rescue Lab: Too salty? Too spicy? The AI analyzes the problem and provides a chemical/culinary fix.
  • πŸ›‘οΈ AI Content Moderation: Inputs are validated to prevent gibberish or offensive content.
  • πŸ“š Digital Cookbook: Save, categorize, and manage your favorite AI-generated recipes.
  • πŸ›’ Smart Shopping List: Auto-generated grocery lists from your meal plans.
  • πŸ“€ Export Options: Download recipes and lists as high-quality PDFs or images.
  • πŸ“± Fully Responsive: Optimized for use on your phone while cooking.

Run Locally:

  1. Clone the Repository:

    git clone https://github.com/RanitDERIA/chefini.git
    cd chefini
  2. Install Dependencies:

    npm install
  3. Environment Setup: Create a .env file in the root directory:

    # Database
    MONGODB_URI=your_mongodb_connection_string
    
    # AI Provider
    GROQ_API_KEY=your_groq_api_key
    
    # Authentication
    AUTH_SECRET=your_nextauth_secret_key
    
    # Email (Optional)
    EMAIL_SERVER_USER=your_email
    EMAIL_SERVER_PASSWORD=your_password
    EMAIL_SERVER_HOST=smtp.example.com
    EMAIL_SERVER_PORT=587
    EMAIL_FROM=[email protected]
  4. Start Development Server:

    npm run dev
  5. Open Browser: Navigate to http://localhost:3000.

Deployment:

Chefini is optimized for Vercel.

  1. Push to GitHub.
  2. Import project in Vercel.
  3. Add Environment Variables in Vercel Dashboard.
  4. Deploy.

Configuration:

  • Groq Model: Defaults to llama-3.3-70b-versatile for balance of speed and creativity. Configurable in app/api/... routes.
  • Theme: The "Brutalist" theme uses standard Tailwind colors extended in tailwind.config.js (chefini-yellow, chefini-black).

Project Structure:

Chefini/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ (auth)/                 # Authentication Routes
β”‚   β”‚   β”œβ”€β”€ login/
β”‚   β”‚   β”œβ”€β”€ signup/
β”‚   β”‚   └── verify-otp/
β”‚   β”œβ”€β”€ (dashboard)/            # Protected User Interface
β”‚   β”‚   β”œβ”€β”€ batch/              # "Batch Cooking" Feature
β”‚   β”‚   β”œβ”€β”€ cookbook/           # Saved Recipes
β”‚   β”‚   β”œβ”€β”€ dashboard/          # Main UI + AI Generation Trigger
β”‚   β”‚   β”œβ”€β”€ debug/              # "Scientific Rescue" (Flavor Debugger)
β”‚   β”‚   └── shopping-list/      # Smart Grocery List
β”‚   β”œβ”€β”€ api/                    # Backend API Routes
β”‚   β”‚   β”œβ”€β”€ generate/           # Llama 3 AI Logic Endpoint
β”‚   β”‚   β”œβ”€β”€ debug-dish/         # Flavor correction logic
β”‚   β”‚   └── recipes/            # CRUD for user recipes
β”‚   └── landing/                # Public Landing Page
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ ui/
β”‚   β”‚   β”œβ”€β”€ BatchCompiler.tsx   # Logic for weekly meal planning
β”‚   β”‚   β”œβ”€β”€ CookMode.tsx        # Step-by-step cooking interface
β”‚   β”‚   β”œβ”€β”€ FlavorDebugger.tsx  # Scientific dish rescue UI
β”‚   β”‚   └── RecipeModal.tsx     # Recipe visualization
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ auth.ts                 # NextAuth Configuration (Node.js)
β”‚   β”œβ”€β”€ mongodb.ts              # Database Connection
β”‚   └── ready-recipes.ts        # Fallback/Static recipe data
β”œβ”€β”€ models/                     # Mongoose Schemas
β”‚   β”œβ”€β”€ BatchPlan.ts
β”‚   β”œβ”€β”€ Recipe.ts
β”‚   β”œβ”€β”€ ShoppingList.ts
β”‚   └── User.ts
β”œβ”€β”€ auth.config.ts              # Edge-compatible Auth Config
β”œβ”€β”€ middleware.ts               # Edge Middleware for Route Protection
β”œβ”€β”€ public/                     # Static Assets
β”œβ”€β”€ next.config.mjs             # Next.js Configuration
β”œβ”€β”€ tailwind.config.js          # Styling Configuration
└── package.json                # Project Dependencies

Privacy & Safety:

  • Content Safety: Integrated AI moderation ensures inputs are safe and relevant to cooking.
  • Data: User data (recipes/plans) is stored securely in MongoDB. Passwords are hashed.

License:

This project is licensed under the MIT License.

πŸ“¬ Let's Connect

Email LinkedIn Twitter GitHub


⭐ Star this repository if you love cooking with AI!

Made with ❀️ and πŸ§‚ by Ranit Deria

About

AI-powered culinary companion that turns leftovers into gourmet meals. Features intelligent recipe generation, batch cooking planning, and scientific dish rescue. Built with Next.js 16, TypeScript, MongoDB & Llama 3 (Groq).

Topics

Resources

License

Stars

Watchers

Forks

Languages