Time-Saving Treats: 30 Minute Recipes for Busy Chefs
Sleepy Chef is a modern recipe discovery platform designed for busy people who want delicious meals in 30 minutes or less. Search recipes by type, ingredient, or name, and discover your next favorite dish with our intuitive interface and smart filtering system.
- Smart Search: Find recipes by type, ingredient, or name with intelligent filtering
- 30-Minute Focus: All recipes designed for quick preparation
- Recipe Submission: Community-driven recipe collection with moderated submissions
- Responsive Design: Optimized for desktop and mobile experiences
- Dark Mode: Toggle between light and dark themes
- Interactive UI: Smooth animations and modern design patterns
- Node.js 16+
- npm or yarn
- MongoDB database (for recipe submissions)
-
Clone the repository
git clone https://github.com/soundwanders/sleepy-chef.git cd sleepy-chef
-
Install dependencies
npm install # or yarn install
-
Set up environment variables
cp .env.example .env.local
Configure the following variables:
MONGODB_URI=your_mongodb_connection_string NEXT_PUBLIC_RECAPTCHA_SITEKEY=your_hcaptcha_site_key RECAPTCHA_SECRET=your_hcaptcha_secret_key ELASTIC_EMAIL=your_email_service_user ELASTIC_PASSWORD=your_email_service_password
-
Run the development server
npm run dev # or yarn dev
-
Open your browser Navigate to http://localhost:3000
- Next.js 13 - React framework with SSR/SSG
- React 18 - UI library with hooks and context
- Tailwind CSS - Utility-first CSS framework
- Framer Motion - Animation library
- SWR - Data fetching with caching
- Next.js API Routes - Serverless API endpoints
- MongoDB - Document database for recipe storage
- HCaptcha - Bot protection for form submissions
- Jest - Testing framework
- React Testing Library - Component testing utilities
- ESLint - Code linting
sleepy-chef/
βββ components/ # React components
β βββ form/ # Recipe submission form components
β βββ nav/ # Navigation components
β βββ recipes/ # Recipe display components
β βββ ui/ # Reusable UI components
βββ pages/ # Next.js pages and API routes
β βββ api/ # API endpoints
β βββ id/ # Dynamic recipe pages
β βββ types/ # Recipe type pages
βββ data/ # Recipe database and context
βββ hooks/ # Custom React hooks
βββ utils/ # Utility functions
βββ styles/ # CSS and styling
βββ __tests__/ # Test files
- Multi-parameter search: Type, ingredient, or recipe name
- Smart filtering: Intelligent matching with fallback options
- Sorting options: Name (A-Z, Z-A) and preparation time
- Category browsing: Dedicated pages for each recipe type
- Form validation: Client and server-side validation
- Rate limiting: Prevents spam submissions
- Moderation workflow: Admin approval system via email notifications
- Local storage: Auto-save form progress
- Bot protection: HCaptcha integration
- Static Site Generation: Pre-rendered pages for optimal performance
- Progressive loading: Skeleton screens and loading animations
- Responsive design: Mobile-first approach with Tailwind CSS
- Dark mode: System preference detection with manual toggle
Run the test suite:
npm test
# or
yarn test
The project includes comprehensive tests for:
- Form validation and submission
- Search functionality
- Component rendering
- API endpoints
GET /api/recipes?type={type}&ingredient={ingredient}&name={name}
Parameters:
type
(optional): Recipe category (beef, chicken, pasta, etc.)ingredient
(optional): Ingredient to search forname
(optional): Recipe name to search for
Response:
[
{
"id": 1,
"name": "Recipe Name",
"types": ["chicken", "soup"],
"time": "25 minutes",
"vegetarian": false,
"vegan": false,
"ingredients": ["ingredient1", "ingredient2"],
"nutrition": { "calories": "400", "fat": "10g" },
"directions": ["step1", "step2"]
}
]
POST /api/submit-recipe
Body:
{
"recipeData": "stringified_recipe_object",
"token": "hcaptcha_token",
"userId": "unique_user_id"
}
- Push your code to GitHub
- Import your repository to Vercel
- Configure environment variables
- Deploy automatically on push
npm run build
npm start
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Add tests for new functionality
- Commit your changes
git commit -m 'Add amazing feature'
- Push to your branch
git push origin feature/amazing-feature
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Icons: Freepik from Flaticon
- Font Optimization: Glyphhanger for web font subsetting
- Inspiration: Built with β€οΈ for busy cooks everywhere