technobyte-nitkkr / blogs Goto Github PK
View Code? Open in Web Editor NEWBlogs by Technobyte
Blogs by Technobyte
get all blogs
Response:
[
{
id: string
title: string
content: string
image: string <url>
}
]
this page will be similar to create post page #28 . Only difference is this will use /blogs/update/:id
to update the selected blog by the user. Also the input fields on this page will already be filled by the blog's content retrieved from backend.
Also this page will contain a Review section where all the review messages sent by the admin will be displayed.
Here the button Send for review
will generate a post request to /blogs/update/:id
Add the pending blogs component to the Admin Dashboard
This component will display all those blogs which are requested for a review by a user.
use /blogs/getAll
route and apply filter on blog.review
property to properly identify such blogs.
Design will be uploaded soon
Using the given design implement the landing page for the blog. The page will display all the posted blogs on our site. Along with a search bar to filter from the blogs.
design will be uploaded here soon.
/blogs/getAll
#9 to fetch the data from backend.This issue will be updated later
a dashboard for the logined user to view all his/her blogs (pending,approved,rejected) and a button to create a new blog.
The page will have a component and a button
/blogs/getAll
and apply filter on blogs.createdBy
Update blog based on ID
{
title: string
description: string
content: string
photo: type<Photo>
}
@@ADMIN ONLY
// get auth_token from cookie
const { userId, email } = requestDataFromJWTToken(auth_token)
const user = findUniqueUser(id, email)
if ( user.type != admin)
return 'Unauthorized'
// continue
@@Admin
Ensure user is admin based on #15
send review of blog based on:
pending
: no review doneapproved
: blog is published for everyoneupdate
: improve blog based on review_message
Integrate react router so that routing to different pages is possible
add comment to blog
req:
header: {
auth_token: <user_auth_token>
} // passed using cookie
body: {
content: string
}
Search blog based on a query such as tags, time uploaded, search query string
Sign up email for the newsletter
create new blog.
req:
{
title: string
description: string
content: string
image: type<photo>
}
The schema might be changed based on further recommendation
Tags:
blogs:
Comments:
users:
Integration of Google OAuth with jwt token for authentication verification
Store cookie in client-side with key-value pair: auth_token: <auth_token>
get a specific blog based on blogId
Here admin can see all the posted blogs and remove any blog.
Uses /blogs/getAll
to view all blogs and /blogs/delete/:id
to delete the blog
A popup will be shown to visiting users after a short interval, asking for:
design will be uploaded soon
When admin selects a blog from Pending blogs s/he will be directed to view the complete blog and add a review.
Uses /blogs/get/:id
to display the blog and admin/blog/review/:id
to give a review.
design will be uploaded soon
Add the page to view the selected blog from landing page (#20)
The page will use the following backend route /blogs/get/:id
(#10) to fetch the blog data.
Response from /blogs/get/:id
{
title: String
content: String
tags: [Tags]
image: String
comments: Comments
review: enum('pending', 'approved', 'update')
reviewMessage: String
}
design will be uploaded soon
Page only accessible to user.role = 'admin'
Consists of a Component and 3 buttons
Posted
to show all the posted blogs. Directed to #25Send Newsletter
to send newsletter to all the resgistered users. Directed to #26Create new post
to create a fresh post. Directed to #28Design will be uploaded soon
@Moddynow69 sir permission dedo.
add the create post page which will be only accessible to logined user and the admin.
The page will contain input fields for
and a Send for review
button to send the blog for review to the admin using /blogs/create
route.
A large part of the page will be dedicated to a richtext editor.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.