A Next.js 15 breakfast-themed application powered by Hashbrown AI for generating dynamic breakfast content including recipes, menus, stories, and cooking tips.
- AI-Powered Content Generation: Create breakfast recipes, menus, stories, and tips using LLMs
- Structured Output: Uses JSON Schema to ensure consistent, well-formatted content
- Interactive Components: Beautiful Tailwind-styled components with Radix UI primitives
- Secure API Routes: Server-side LLM integration with environment-based configuration
- Multi-Provider Support: Works with OpenAI, Anthropic, Azure OpenAI, and custom endpoints
- Responsive Design: Mobile-first design with warm breakfast-themed colors
- Next.js 15 App Router: Modern React with server/client components
- Vanilla JavaScript: No TypeScript dependencies
- Tailwind CSS: Utility-first styling with custom breakfast theme
- Radix UI: Accessible component primitives
- Components: Reusable UI components (RecipeCard, MenuSection, etc.)
- Functions: Local mock functions for nutrition calculation, timing, etc.
- Schema: JSON Schema definitions for structured LLM output
- Environment Config: Multi-provider API key management
- Zod Schemas: Request/response validation
- Edge Runtime: Fast, globally distributed API routes
-
Install Dependencies
npm install
-
Set Environment Variables Create a
.env.localfile:# OpenAI (default) AI_PROVIDER=openai OPENAI_API_KEY=your_openai_api_key OPENAI_MODEL=gpt-4o-mini # Or Anthropic AI_PROVIDER=anthropic ANTHROPIC_API_KEY=your_anthropic_api_key ANTHROPIC_MODEL=claude-3-sonnet-20240229 # Or Azure OpenAI AI_PROVIDER=azure AZURE_OPENAI_API_KEY=your_azure_key AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com AZURE_OPENAI_MODEL=gpt-4o-mini
-
Start Development Server
npm run dev
-
Open Browser Navigate to http://localhost:3000
breakfast-brain/
├── app/ # Next.js App Router
│ ├── layout.jsx # Root layout with Tailwind styles
│ ├── page.jsx # Main application page (client)
│ └── api/
│ └── generate/
│ └── route.js # AI generation API (edge runtime)
├── hb/ # Hashbrown components & functions
│ ├── components.jsx # UI component definitions
│ ├── functions.js # Mock utility functions
│ └── schema.js # JSON Schema for LLM output
├── lib/ # Utilities & configuration
│ ├── env.js # Environment & provider config
│ └── schemas.js # Zod validation schemas
├── src/styles/ # Styling
│ └── globals.css # Tailwind directives
├── tailwind.config.js # Tailwind configuration
├── postcss.config.js # PostCSS configuration
├── next.config.mjs # Next.js configuration (ESM)
├── jsconfig.json # Path aliases configuration
└── package.json # Dependencies & scripts
The app supports multiple AI providers through environment variables:
- OpenAI: Standard OpenAI API
- Anthropic: Claude models
- Azure OpenAI: Enterprise OpenAI deployment
- Custom: Any OpenAI-compatible API
Generated content can be:
- Recipes: Complete breakfast recipes with ingredients and instructions
- Menus: Restaurant-style breakfast menus with prices
- Stories: Breakfast-themed narratives and anecdotes
- Tips: Cooking and preparation advice
- Mixed: Combination content types
Hashbrown components include:
RecipeCard: Full recipe display with ingredients and stepsMenuSection: Restaurant menu with items and pricesTipCard: Cooking tips and adviceNutritionInfo: Nutritional information displayStorySection: Narrative content with styling
- API keys are never exposed to client-side code
- All LLM requests go through secure server-side API routes
- Input validation using Zod schemas
- Environment-based configuration management
The app uses a warm breakfast-inspired color palette:
- Primary: Amber tones (amber-50 to amber-900)
- Accents: Orange, yellow, and warm browns
- Backgrounds: Soft gradients and subtle textures
next@15.5.2: React frameworkreact@18.3.1: UI library@hashbrownai/react@0.2.3: Hashbrown React integration@hashbrownai/core@0.2.3: Core Hashbrown functionality@hashbrownai/openai@0.2.3: OpenAI provider
tailwindcss: Utility-first CSS@radix-ui/react-*: Accessible componentspostcss&autoprefixer: CSS processing
zod: Runtime type validation
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.