A fun and intelligent recipe recommendation system powered by LLMs that suggests recipes based on available ingredients and preferences. The name "Biar Kami Masak" means "Let Us Cook" in Malay.
Visit our web application: https://biarkamimasak.vercel.app/
Biar Kami Masak is a full-stack application consisting of:
- A FastAPI backend service deployed on Railway
- A frontend web application hosted on Vercel
- Integration with OpenAI's GPT models for intelligent recipe generation
The system features a goofy, friendly chef persona that makes cooking more enjoyable by adding humor to the recipe recommendations while ensuring they remain practical and useful.
- Ingredient-Based Recipe Generation: Get personalized recipes based on your available ingredients
- Smart Recipe Recommendations: Takes into account:
- Number of servings
- Dietary restrictions
- Cuisine preferences
- Maximum cooking time
- Streaming Responses: Real-time recipe generation with streamed responses for better user experience
- Bilingual Support: Handles both English and Malay inputs
- API Security: Protected endpoints with API key authentication
- CORS Support: Built-in Cross-Origin Resource Sharing support
- Health Monitoring: Dedicated health check endpoint
- Error Handling: Comprehensive error handling with informative messages
- Streaming Capability: Both simple and detailed recipe endpoints support streaming responses
- FastAPI
- LangChain
- OpenAI GPT Models
- Python 3.x
- Pydantic
- python-dotenv
- React
- Vite
- TypeScript
- Tailwind CSS
- Vercel Hosting
- Railway (API)
- Vercel (Web Application)
- Python 3.x
- OpenAI API key
- Recipe API key (for authentication)
- Clone the repository:
git clone https://github.com/fahmifauzi00/biarkamimasak
cd biarkamimasak
- Install required dependencies:
pip install -r requirements.txt
- Create a
.env
file in the root directory:
OPENAI_API_KEY=your_openai_api_key
RECIPE_API_KEY=your_recipe_api_key
uvicorn main:app --reload
The API will be available at http://localhost:8000
POST /v1/recipe/simple
Content-Type: application/json
X-Recipe-API-Key: your_api_key
{
"ingredients": ["chicken", "rice", "onion"],
"servings": 2
}
POST /v1/recipe/detailed
Content-Type: application/json
X-Recipe-API-Key: your_api_key
{
"ingredients": ["chicken", "rice", "onion"],
"servings": 4,
"dietary_restrictions": ["gluten-free"],
"cuisine_preference": "asian",
"cooking_time": 60
}
POST /v1/recipe/simple/stream
POST /v1/recipe/detailed/stream
These endpoints provide real-time streaming responses for a better user experience.
{
"title": "Goofy Chef's Amazing Nasi Goreng",
"ingredients": [
"2 cups cooked rice",
"2 chicken breasts, diced",
"1 onion, chopped"
],
"instructions": [
"Heat oil in a wok over medium heat",
"Sauté chopped onions until fragrant",
"Add diced chicken and cook until golden"
],
"cooking_time": "20 minutes",
"difficulty": "Easy",
"notes": "Want to make it fancy? Just add a fried egg on top! 🍳",
"timestamp": "2024-11-16T12:44:36.278Z"
}
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- Frontend Development: Wan Firdaus
- Backend API Development: Fahmi Fauzi
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for providing the LLM capabilities
- FastAPI for the excellent web framework
- LangChain for the LLM integration tools
- Railway for hosting the API
- Vercel for hosting the web application