A full-stack React.js application that helps users plan budget-friendly meals based on ingredients they have in their fridge. The app suggests recipes that match available ingredients and provides alternatives that require minimal additional purchases.
- Secure user registration and login
- JWT-based authentication
- Password hashing
- User-specific data storage
- Select dietary restrictions during registration
- Options include: Vegetarian, Vegan, Gluten-Free, Dairy-Free, Nut-Free, Pescatarian, Keto, Paleo
- Recipes automatically filtered based on preferences
- Fridge Photo Recognition: Take a photo of your fridge and automatically detect ingredients
- Supported by Google Cloud Vision API for advanced recognition
- Smart fallback system that always works
- Detects items like milk, cream, vegetable broth, and more
- Perfect Matches: Recipes you can make with current ingredients
- Suggestions: Recipes requiring minimal additional purchases
- Intelligent ingredient matching with fuzzy logic
- Match percentage displayed for each recipe
- Save your favorite recipes
- Access bookmarked recipes anytime
- Dedicated bookmarks page
- Select multiple recipes to generate shopping lists
- Interactive checklist with checkboxes
- Add custom items manually
- Items automatically move to "Completed" when checked
- Delete items or entire lists
- Ingredients and search results saved automatically
- Data persists across page refreshes
- User-specific storage
- React 18 with TypeScript
- React Router for navigation
- Axios for API calls
- CSS3 for styling
- Node.js with Express
- SQLite database
- JWT authentication
- bcryptjs for password hashing
- Google Cloud Vision API (optional) for image recognition
- Node.js (v14 or higher)
- npm or yarn
-
Clone the repository
git clone <your-repo-url> cd VibeCoding
-
Install dependencies
npm run install-all
This installs both root and client dependencies.
-
Set up environment variables
Create a
.envfile in the root directory:PORT=5000 JWT_SECRET=your-super-secret-jwt-key-change-this-in-production # Optional: Google Cloud Vision API (for better image recognition) GOOGLE_CLOUD_API_KEY=your-google-cloud-api-key-here # OR use service account: # GOOGLE_APPLICATION_CREDENTIALS=path/to/service-account-key.json
-
Start the development servers
npm run dev
This starts:
- Backend server on
http://localhost:5000 - React frontend on
http://localhost:3000
Or start them separately:
# Terminal 1 - Backend npm run server # Terminal 2 - Frontend npm run client
- Backend server on
budget-meal-prep-app/
βββ client/ # React frontend
β βββ src/
β β βββ pages/ # Page components
β β β βββ Login.tsx
β β β βββ Register.tsx
β β β βββ Dashboard.tsx
β β β βββ Bookmarks.tsx
β β β βββ ShoppingList.tsx
β β βββ context/ # React Context
β β β βββ AuthContext.tsx
β β βββ services/ # API service functions
β β β βββ api.ts
β β βββ App.tsx # Main app component
β βββ package.json
βββ server/ # Express backend
β βββ routes/ # API routes
β β βββ auth.js
β β βββ recipes.js
β β βββ users.js
β β βββ bookmarks.js
β β βββ shoppingList.js
β β βββ imageRecognition.js
β βββ database/ # Database setup
β β βββ db.js
β βββ middleware/ # Auth middleware
β β βββ auth.js
β βββ index.js # Server entry point
βββ package.json
βββ README.md
POST /api/auth/register- Register a new userPOST /api/auth/login- Login user
POST /api/recipes/suggest- Get recipe suggestions based on ingredients (requires auth)GET /api/recipes/all- Get all recipes (requires auth)
GET /api/users/me- Get current user info (requires auth)PUT /api/users/dietary-restrictions- Update dietary restrictions (requires auth)
GET /api/bookmarks- Get user's bookmarked recipesPOST /api/bookmarks/:recipeId- Add bookmarkDELETE /api/bookmarks/:recipeId- Remove bookmarkGET /api/bookmarks/check/:recipeId- Check if recipe is bookmarked
GET /api/shopping-list- Get user's shopping listsGET /api/shopping-list/:listId- Get specific shopping list with itemsPOST /api/shopping-list/create- Create shopping list from recipesPUT /api/shopping-list/:listId/items/:itemId- Toggle item checked statusPOST /api/shopping-list/:listId/items- Add item to listDELETE /api/shopping-list/:listId/items/:itemId- Delete itemDELETE /api/shopping-list/:listId- Delete shopping list
POST /api/image/recognize- Recognize ingredients from fridge photo (requires auth)
# Install all dependencies
npm run install-all
# Start both servers (development)
npm run dev
# Start backend only
npm run server
# Start frontend only
npm run client
# Setup environment
npm run setupISC
Cursor - Rohini A.
Created as a full-stack meal planning application.
- Recipe images from Unsplash
- Google Cloud Vision API for image recognition
- React and Express communities
Happy Cooking! π³β¨
