This project is a full-stack Recipe Finder application where users can search for recipes, filter them by area, and sort by the number of ingredients. Users can also save their favorite recipes to a personal collection. The app is built using React for the frontend and Node.js with Express and MongoDB for the backend.
- Search for recipes by name
- Filter recipes by area of origin
- Sort recipes by the number of ingredients
- Save recipes to a personal collection
- View saved recipes in a collection
- Frontend: React
- Backend: Node.js, Express.js
- Database: MongoDB
- HTTP Client: Axios
-
Clone the repository and navigate to the
serverfolder.git clone <repo-url> cd server
-
Install the required dependencies.
npm install
-
Ensure that MongoDB is running locally or update the MongoDB connection string in
server/index.jsif using a remote database. -
Start the server.
node index.js
The server will start running on
http://localhost:3001.
-
Open a new terminal window and navigate to the
clientfolder.cd client -
Install the required dependencies.
npm install
-
Start the client.
npm start
The client will start running on
http://localhost:3000.
- Ensure you have MongoDB installed and running on your local machine. The default connection string assumes that MongoDB is running locally on the default port (
mongodb://localhost:27017/recipe). - If you are using a remote MongoDB instance, update the connection string in
server/index.js.
POST /saveRecipe: Save a recipe to the collection.GET /savedRecipes: Retrieve saved recipes from the collection.