Transform your ingredients into amazing recipes with AI-powered suggestions!
ShelfChef is a modern web application that transforms your available ingredients into delicious recipes using intelligent algorithms. Built with React, FastAPI, and MongoDB.
- Smart Recipe Generation: AI-powered recipe suggestions based on your ingredients
- Beautiful Food Images: High-quality images for each recipe
- Recipe Management: Save and manage your favorite recipes
- Responsive Design: Works perfectly on all devices
- Real-time Matching: See how well your ingredients match each recipe
- Node.js 18+
- Python 3.9+
- MongoDB
- Yarn
-
Clone the repository
git clone https://github.com/yourusername/shelfchef.git cd shelfchef
-
Setup Backend
cd backend pip install -r requirements.txt cp ../.env.example .env uvicorn server:app --reload
-
Setup Frontend
cd frontend yarn install yarn start
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
-
Fork this repository
-
Set up deployment secrets in GitHub:
VERCEL_TOKEN
: Your Vercel API tokenVERCEL_ORG_ID
: Your Vercel organization IDVERCEL_PROJECT_ID
: Your Vercel project IDRAILWAY_TOKEN
: Your Railway API tokenDOCKER_REGISTRY
: Your Docker registry URLSLACK_WEBHOOK
: (Optional) Slack webhook for notifications
-
Push to main branch
git push origin main
-
Automatic deployment will trigger:
- Tests run automatically
- Frontend deploys to Vercel
- Backend deploys to Railway
- Database sets up on MongoDB Atlas
-
Using the deployment script:
chmod +x deploy/deploy.sh ./deploy/deploy.sh
-
Using Docker:
cd backend docker build -t shelfchef-backend . docker run -p 8000:8000 shelfchef-backend
-
Using Docker Compose:
cd backend docker-compose up -d
cd backend
python -m pytest tests/ -v
cd frontend
yarn test
yarn test:e2e
shelfchef/
βββ frontend/ # React frontend
β βββ src/
β β βββ components/ # React components
β β βββ hooks/ # Custom hooks
β β βββ mock/ # Mock data
β βββ public/ # Static assets
β βββ vercel.json # Vercel configuration
βββ backend/ # FastAPI backend
β βββ server.py # Main server file
β βββ recipe_generator.py # Recipe generation logic
β βββ tests/ # Backend tests
β βββ Dockerfile # Docker configuration
β βββ requirements.txt # Python dependencies
βββ .github/workflows/ # CI/CD workflows
βββ deploy/ # Deployment scripts
βββ README.md # This file
POST /api/generate-recipes
- Generate recipes from ingredientsGET /api/saved-recipes
- Get saved recipesPOST /api/save-recipe
- Save a recipeDELETE /api/saved-recipes/{id}
- Delete a recipe
GET /api/health
- Health checkGET /api/
- API status
Create a .env
file in both frontend and backend directories:
# Backend (.env)
MONGO_URL=mongodb://localhost:27017
DB_NAME=shelfchef
# Frontend (.env)
REACT_APP_BACKEND_URL=http://localhost:8000
- Frontend: Vercel, Netlify, AWS S3 + CloudFront
- Backend: Railway, Heroku, AWS ECS, Google Cloud Run
- Database: MongoDB Atlas, AWS DocumentDB
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Backend:
GET /api/health
- Frontend: Built-in Vercel monitoring
- Backend: FastAPI structured logging
- Frontend: Console logging in development
- Vercel Analytics for frontend
- Railway metrics for backend
- Python
- ES7+ React/Redux/React-Native snippets
- Thunder Client (API testing)
- Docker
- GitLens
- ESLint + Prettier for frontend
- Black + isort for backend
- Pre-commit hooks (optional)
This project is licensed under the MIT License - see the LICENSE file for details.
- Food images from Unsplash and Pexels
- Icons from Lucide React
- UI components from shadcn/ui
- Built with β€οΈ using React, FastAPI, and MongoDB
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: support@shelfchef.com
Made with β€οΈ by the ShelfChef team. Happy cooking! π³