This project is a comprehensive backend solution for managing and sharing culinary recipes. Designed with simplicity and efficiency in mind, it provides robust APIs for user authentication, recipe creation, and management. Whether you're a hobbyist cook or a professional chef, this API helps organize and share your culinary creations with ease.
Note: This project was meticulously crafted by Lucas Erkana, showcasing a blend of technical expertise and passion for culinary arts.
To see this project's live demo, please click here.
This API was developed using the following technologies:
- Node.js
- Express
- MongoDB
- Mongoose
- JavaScript
- Postman
- User authentication and registration.
- CRUD operations for recipes.
- Filtering and sorting recipes.
- Image upload and management for recipes.
- Nutritional information tracking.
- User role management (e.g., admin, editor, user).
- Responsive and intuitive API endpoints.
- Secure data handling and storage.
In order to run this project you need:
- Node.js installed on your machine
- A MongoDB database
- A code editor such as Visual Studio Code
To set up the Recipe Website API project, follow the steps below:
- Clone this repository to your desired folder:
git clone https://github.com/Lucas-Erkana/recipe_website.git
- Navigate into the cloned folder:
cd recipe_website
3.Install the necessary dependencies:
npm install
4.Set up your environment variables in a .env file based on the .env.example provided.
MONGO_URL = mongodb+srv://recipebookwebsite:[email protected]/?retryWrites=true&w=majority
5.Start the server:
npm start
Sure, here's how you can include the "Usage" section in your README.md
file to guide users on how to use your Recipe Website API through Postman:
After starting the server with npm start
, you can use Postman to interact with the API. If you don't have Postman installed, you can use it directly in your browser here.
- Set the request type to
POST
. - Enter the URL:
http://localhost:3000/users
. - Click on
Body
, then selectraw
and chooseJSON
. - Add the following user details in the request body:
{ "username": "john", "email": "[email protected]", "role": "user", "password": "1234567" }
- Click
Send
.
-
To fetch all users:
- Set the request type to
GET
. - Enter the URL:
http://localhost:3000/users
. - Click
Send
.
- Set the request type to
-
To fetch a specific user:
- Set the request type to
GET
. - Enter the URL:
http://localhost:3000/users/[user-id]
(replace[user-id]
with the actual user ID). - Click
Send
.
- Set the request type to
- Set the request type to
PUT
. - Enter the URL:
http://localhost:3000/users/[user-id]
(replace[user-id]
with the user ID you want to update). - In the
Body
section, selectraw
and chooseJSON
. - Add the updated user details. For example:
{ "username": "johndoe" }
- Click
Send
.
- Set the request type to
DELETE
. - Enter the URL:
http://localhost:3000/users/[user-id]
(replace[user-id]
with the user ID you want to delete). - Click
Send
.
๐ค Lucas Erkana
- GitHub: @Lucask-Erkana
- Twitter: @Lucas_David_22
- LinkedIn: Lucas Erkana
- Frontend Mentor - @Lucask-Erkana
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
If you like this project, please leave a โญ๏ธ
- I would like to express my heartfelt gratitude to BAG for providing me with the opportunity to complete this task. Their support and encouragement have been invaluable throughout the development process.
This project is MIT licensed.