A powerful, optimized, and developer-friendly Recipe & Food Data API built with Next.js 15 and MongoDB.
- 🚀 High Performance: Optimized API with pagination, text search caching, and SWR hooks.
- 🧹 Data Quality: Automated deduplication (fuzzy matching) and content filtering.
- 🔐 Admin Dashboard: Monitor stats, trigger scrapers, and manage data quality.
- 📦 Multi-Source: Aggregates data from TheMealDB, Spoonacular, Edamam, and RecipePuppy.
- 🛠️ Developer Ready: Detailed documentation, clean architecture, and easy deployment.
- Framework: Next.js 15 (App Router)
- Database: MongoDB Atlas
- Styling: Tailwind CSS
- Scraping: Node.js scripts
- Validation: Joi schemas
-
Clone & Install
git clone https://github.com/0AnshuAditya0/happyfood-api.git cd happyfood-api npm install -
Setup Env Copy
.env.exampleto.env.localand fill in your keys. -
Run Database Setup
npm run setup:indexes
-
Start Development Server
npm run dev
Visit
http://localhost:3000.
npm run dev: Start dev server.npm run scrape:all: Run all scrapers.npm run find:duplicates: Scan database for duplicates.npm run remove:ingredient: Remove recipes by ingredient.
| Endpoint | Method | Description |
|---|---|---|
/api/dishes |
GET | List recipes (supports search, sort, filter) |
/api/dishes/:id |
GET | Get full recipe details |
/api/health |
GET | Check API health status |
Access the admin dashboard at /admin to monitor system health and trigger manual actions.
Default Password: happyfood2024
Contributions are welcome! Please read SCRAPER_GUIDE.md for architecture details.
MIT License.