Guythatcooks is a food blog based upon the MERN stack where users could view different food recipes and filter them based upon different cuisines. The users could also favourite a particular blog to access it quickly.
- Register/Login
- View Blogs
- Create, Update, Delete Blogs
- Favourite Blogs
Clone the project
git clone https://github.com/YamalAli770/guythatcooks-frontend
Install dependencies
npm install
Start the server
npm run server
GET /api/blogs
GET /api/blogs/${id}
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Id of blog to fetch |
POST /api/blogs/
Parameter | Type | Description |
---|---|---|
title |
string |
Required. Title of blog |
img |
string |
Required. Link of image for blog |
author |
string |
Required. Author of blog |
desc |
string |
Required. Description of blog |
markdown |
string |
Required. Markdown of blog |
PUT /api/blogs/${id}
Parameter | Type | Description |
---|---|---|
id |
string |
Id of blog to create |
title |
string |
Title of blog |
img |
string |
Link of image for blog |
author |
string |
Author of blog |
desc |
string |
Description of blog |
markdown |
string |
Markdown of blog |
DELETE /api/blogs/${id}
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Id of blog to delete |
POST /api/auth/register
Parameter | Type | Description |
---|---|---|
username |
string |
Required. username of user |
email |
string |
Required. email of user |
password |
string |
Required. password of user |
POST /api/auth/login
Parameter | Type | Description |
---|---|---|
email |
string |
Required. email of user |
password |
string |
Required. password of user |
GET /api/auth/logout
PUT /api/user/favourite/${id}?${blogid}
Parameter | Type | Description |
---|---|---|
id |
string |
Required. id of user |
blog |
string |
Required. id of blog |
Following is given the list of private routes which can only be accessed once user has logged in.
- Create Blog
- Update Blog
- Delete Blog
- Favourite Blog
To run this project, you will need to add the following environment variables to your .env file
MONGO_URI
ACCESS_TOKEN_SECRET
REFRESH_TOKEN_SECRET
If you have any feedback, please reach out to us at Yamal.Ali@outlook.com