██████╗ ███████╗ ██████╗██╗██████╗ ███████╗ █████╗ ██╗
██╔══██╗██╔════╝██╔════╝██║██╔══██╗██╔════╝ ██╔══██╗██║
██████╔╝█████╗ ██║ ██║██████╔╝█████╗ ███████║██║
██╔══██╗██╔══╝ ██║ ██║██╔═══╝ ██╔══╝ ██╔══██║██║
██║ ██║███████╗╚██████╗██║██║ ███████╗ ██║ ██║██║
╚═╝ ╚═╝╚══════╝ ╚═════╝╚═╝╚═╝ ╚══════╝ ╚═╝ ╚═╝╚═╝
Tell it what's in your fridge. Get a recipe. Order the rest.
Recipe.ai is a full-stack web application that lets you describe ingredients you have at home (or snap a photo of them) and instantly get a professional, step-by-step recipe generated by Google Gemini AI. Beyond recipe generation, it's a complete culinary ecosystem with a marketplace, blog platform, and admin dashboard.
- Text-based — type your ingredients, get a complete recipe instantly
- Image-based — upload a photo of your fridge or ingredients, AI identifies them and crafts a recipe
- Powered by Google Gemini API
- Saves full recipe history per user
- Browse premium, chef-curated ingredients
- Filter by category and price range
- Cart management with real-time quantity updates
- Full checkout flow with GST calculation
- UPI QR code on the bill for payment
- Save and edit delivery address from your profile
- Address is required before checkout (gate enforced)
- Address shown on the bill during payment
- Users can submit culinary articles and tips
- Admin approval workflow (pending / approved / rejected)
- Filter by category, search by keyword
- Featured post support
- Recipe count, membership duration stats
- Saved delivery address management
- Full order history with expandable item details
- JWT-based auth (register / login)
- Role-based access: user and admin
- Admin panel for managing users, orders, blogs, and products
- KPI stats: total users, revenue, recipes, pending blogs
- Manage all users, orders, products, and blogs
- Toggle product stock, update order status, approve/reject blogs
recipe.ai/
├── Recipe-Generator/
│ ├── main.py # FastAPI app — all routes
│ ├── database_sql.py # SQLite wrapper class
│ ├── APIConnect.py # Gemini API integration
│ ├── security.py # JWT, password hashing
│ └── database/
│ └── data.db # SQLite database (auto-created)
│
├── recipe-chef-frontend/
│ ├── app/
│ │ ├── page.tsx # Landing page
│ │ ├── layout.tsx
│ │ ├── globals.css
│ │ ├── auth/page.tsx # Login / Register
| | ├── admin-panel/page.tsx # admin dashboard
│ │ └── dashboard/page.tsx # Main dashboard
│ └── components/
│ └── Blogs.tsx # Blog component
│
└── README.md
Create a .env file in your backend directory:
GEMINI_API_KEY="your_gemini_api_key_here"| Variable | Description |
|---|---|
GEMINI_API_KEY |
Your Google Gemini API key from Google AI Studio |
git clone https://github.com/yourusername/recipe.ai.git
cd recipe.aicd Recipe-Generator
pip install fastapi uvicorn python-jose passlib google-generativeai python-multipart
python database_sql.py # initializes the DB tables
uvicorn main:app --reload --port 8000cd recipe-chef-frontend
npm install
npm run devhttp://localhost:3000
The FastAPI docs are available at
http://localhost:8000/docs
| Table | Purpose |
|---|---|
user |
User accounts |
chat_history |
Recipe generation history |
blogs |
Community blog posts |
products |
Marketplace ingredients |
cart |
Per-user cart items |
orders |
Placed orders |
order_items |
Individual items per order |
user_address |
Saved delivery addresses |
| Method | Endpoint | Description |
|---|---|---|
POST |
/register |
Create new account |
POST |
/login |
Login and receive JWT token |
POST |
/generate_recipe |
Generate recipe from ingredients |
POST |
/generate_recipe_from_image |
Generate recipe from uploaded image |
GET |
/history |
Retrieve user recipe history |
DELETE |
/history/{id} |
Delete history entry |
GET |
/profile |
Get user profile |
GET |
/products |
List marketplace products |
GET |
/products/categories |
List product categories |
GET |
/cart |
View cart items |
POST |
/cart |
Add or update cart item |
DELETE |
/cart |
Clear cart |
POST |
/checkout |
Place an order |
GET |
/orders |
Get user orders |
GET |
/orders/{id} |
Get specific order |
GET / PUT |
/address |
Get or save delivery address |
GET |
/blogs |
List approved blogs |
POST |
/blogs |
Submit blog post |
GET |
/my-blogs |
User blog submissions |
GET |
/admin/stats |
Admin dashboard metrics |
Full interactive API docs:
http://localhost:8000/docs
| Layer | Technology |
|---|---|
| Frontend | Next.js 14, TypeScript, Tailwind CSS |
| Backend | FastAPI, Python |
| Database | SQLite (via custom wrapper) |
| AI | Google Gemini API |
| Auth | JWT (python-jose), bcrypt (passlib) |
| Styling | Tailwind CSS, Playfair Display + DM Sans fonts |