Chef Wise is a modern React + Vite + TypeScript web application that generates smart recipes based on the ingredients provided by the user.
The app leverages GroqCloud’s llama-3.1-8b-instant model to produce clean, markdown-formatted recipe suggestions with ultra-low latency.
All requests and responses are validated with Zod, ensuring runtime safety and predictable data handling across the entire application.
🛡️ API security is a top priority: all AI requests are routed through secure Vercel Serverless Functions, keeping your Groq API key fully private and bypassing regional restrictions.
- Input and manage a dynamic list of ingredients
- AI-generated recipes based on available ingredients (powered by GroqCloud)
- Markdown-formatted recipes rendered in the UI
- Loading progress feedback with smooth mobile scrolling
- Fully typed with TypeScript
- Runtime validation with Zod
- Secure backend API (no exposed secrets)
- Fast development experience with Vite
- The user enters ingredients in the UI.
- The frontend sends a POST request to
/api/getRecipe. - A Vercel Serverless Function validates the request using Zod.
- The backend securely calls the Groq SDK using a Serverless Function.
- The Llama 3.1 model generates a recipe.
- The response is validated and displayed as formatted Markdown.
Frontend (React + Vite + TypeScript)
│
▼
Vercel Serverless Function (/api/getRecipe)
│
▼
GroqCloud API (Llama 3.1 8b)
chef-wise/
│
├── api/
│ └── getRecipe.ts
│
├── public/
│ └── favicon.svg
├── src/
│ ├── assets/
│ │ └── chef-wise-icon.png
│ │
│ ├── components/
│ │ ├── Header.tsx
│ │ ├── IngredientsInputSection.tsx
│ │ ├── IngredientsList.tsx
│ │ ├── ProgressBar.tsx
│ │ ├── RecipeSection.tsx
│ │ └── WiseRecipe.tsx
│ │
│ ├── hooks/
│ │ └── useMobileSmoothScroll.ts
│ │
│ ├── layouts/
│ │ └── DefaultLayout.tsx
│ │
│ ├── pages/
│ │ ├── Home.tsx
│ │ ├── Error.tsx
│ │ └── NotFound.tsx
│ │
│ ├── schemas/
│ │ └── RecipeSchema.ts
│ │
│ ├── services/
│ │ └── RecipeService.ts
│ │
│ ├── styles/
│ │ ├── index.css
│ │ ├── DefaultLayout.css
│ │ ├── Error.css
│ │ └── NotFound.css
│ │
│ ├── utils/
│ │ └── GenerateUtils.ts
│ │
│ ├── App.tsx
│ ├── main.tsx
│ └── vite-env.d.ts
│
├── .env
├── index.html
├── vite.config.ts
├── tsconfig.json
├── tsconfig.app.json
├── tsconfig.api.json
├── tsconfig.node.json
├── package.json
├── package-lock.json
└── README.md
git clone https://github.com/Ha-Mundo/chef-wise.git
cd chef-Wise
npm install
Create a .env file in the root of your project and add your Groq API key:
GROQ_API_KEY=your_groq_api_key_here
Make sure .env is listed in .gitignore to prevent it from being committed.
Run the project locally using Vercel Dev:
npm start
This will start both the frontend and the serverless backend.
-
API keys are never exposed to the client.
-
All AI requests pass through a secure backend.
-
Zod validates both request payloads and AI responses.
-
Secrets are managed through environment variables only.
-
React 19
-
TypeScript
-
Vite
-
Zod
-
React Router
-
Groq SDK - AI Inference (Llama 3.1)
-
Vercel Serverless Functions
-
ESLint
-
Automatic language detection (responses match the user’s input language)
-
Save recipes to a database
-
User profiles and favorites
-
Recipe image generation
-
Drag & drop ingredient input
-
Improved accessibility and UX
-
Offline caching
- This project is open source and available under the MIT License
-
AI Infrastructure: GroqCloud
-
Model: llama-3.1-8b-instant