Skip to content

This is a blogging website to connect ideas and people around the globe.

Notifications You must be signed in to change notification settings

Aaroh1/Un-Fold

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 

Repository files navigation

Unfold your thoughts with Un-Fold ✉️

Un-Fold : Connecting People, Ideas and Products worldwide !

Project Description

Blogging website for webkriti.

  • Users can create their un-fold account or can directly sign in if they already have an account .

  • Then the users will be directed to home page , and they can see all the latest blogs , and all the blogs by the users they follow.

  • Users can search for blogs by title and also search for other users by their names.

  • Users can open blogs, read , like and give review on them.

  • In the same page , he/she can see otherblogs by the same user .

  • Users can open any users' profile and can FOLLOW or UNFOLLOW them. They can also see users that they follow as well as their followers .

  • In the profile page , all blogs by the user are also visible.

  • Users can compose their own blog and choose categories related to the blog. The blog can be formatted with various tools present in the text-editor , links , images can also be added to the blog. Later the blogs can also be edited .

  • Users can also edit their profile whenever they desire from the profile page.

  • Users can bookmark any blog that they like from any page so as to get quick access to them in their profile page.

Screen shots

Features Implemented

Front-end

  1. Sign in and sign up page :
  • All the checks have been made on the frontend side for email and password.

  • A user friendly prompts appear if there is any error while filling the input values.

  1. Home Page :
  • Once the user is signed in, a token is generated, saved in local storage and also stored in browser cookie, which helps maintain session activity. This token is verified every time the user visits any page.

  • Users can here view all the blogs(sorted by time) that have been posted and can bookmark them .

  • It also has a section of categories showcasing all the available genres.

  • Then it has a 3rd section displaying the blogs added by the users whom the logged in user follows.

  1. Blog Page :
  • In the blog page , it has the record of the person by whom the blog is posted.

  • Then the logged in user can also like or unlike (if he has already liked) and comment on the blog. The comments by users can be deleted by the respective commenter.q

  • Then it has a section of other blogs by the author of the blog.

  1. Blog edit page
  • Users can edit their blogs .
  1. Profile Page :
  • Users can see the number of followers , following and the blogs .

  • Can also follow/unfollow the user.

  • See all the bookmarked blogs here.

  • Can also see whom are they following and by whom they are being followed.

  1. Edit Profile Page :
  • Users can make changes to their profile like their profile image, bio, description etc., and all this information is sent to the back-end and then further stored in the database.
  1. Category Page
  • It displays information about the category and also exhibits the trending blogs belonging to the category.
  1. EXTRA FEATURES THAT ARE IMPLEMENTED
  • Users can add tags to their blogs to mention the genre of their blogs.

  • Users can bookmark blogs and view them later.

  • Users can follow/unfollow any other users.

Future Ideas

  • One-on-One chat feature

  • Allowing the user to archive his/her blogs or make it private

  • implement notification for any activity(like/comment/bookmark) on posted blogs

  • Allow users to share blogs via other platforms

Back-end

  1. slash routes for authentication purpose
  • We have setup basic authentication for login and signup wherein we set up a token in the cookie and use it for authentication.

  • POST routes


/api/login

/api/register

/api/logout

  1. user routes to perform get, post and put operations pertaining to user information --We are verifying token as middleware for every post, get or delete request
  • GET routes

/api/user/getuserinfo

/api/user/getFollowingblogs

/api/user/getbookmarkedblogs

/api/user/getFollowers

/api/user/getFollowing

/api/user/getallusers



  • POST routes

/api/user/followUser

/api/user/unfollowUser

/api/user/bookmarkblog

/api/user/unbookmarkblog



  • PUT route

/api/user/editprofile



  1. blog routes to perform delete, get, post and put operations pertaining to blogs -- We are verifying token as middleware for every post, get or delete request
  • DELETE routes

/api/blog/deleteBlog



  • GET routes

/api/blog/getAllBlogs

/api/blog/getblogbyid

/api/blog/allUserBlogs

/api/blog/getlikedusers



  • POST route

/api/blog/addBlog



  • PUT routes

/api/blog/editBlog

/api/blog/likeBlog

/api/blog/unlikeBlog



  1. comment route to add, delete and get comments.
  • We are verifying token as middleware for every post, get or delete request

/api/comment/deletecomment

/api/comment/getComments

/api/comment/addComment



  1. category routes for get and post requests on blog categories --We are verifying token as middleware for every post, get or delete request
  • GET routes

/api/category/getallcategories

/api/category/getallcategoryblogs

/api/category/getcategoryinfo

/api/category/getblogcategories



  • POST routes

/api/category/addcategorytoblog

/api/category/addcategory



  1. Middlewares
  • error middleware inorder to effectively handle any/all encountered errors in controller functions.

  • tokenauth middleware for authemtication (put before each request) which checks for the presence of a jwt token in the cookie.

    Database

    -- PostgresSQL used as a database -- Schemas defined using Sequelize -- Several relationships (One to One, Many to One and Many to Many) have been defined between the main schemas (including user,blog ,comment and category schemas) in order to increase efficiency in data retrieval and eliminate redundancies. DAO as well as lazy and eager loading methods have been utilized.

Technologies/Libraries/Packages Used

Packages README
bcrypt To store hashed password in database
dotenv To keep db connection string, client id, client secret key and also cloudinary config credentials safe
jsonwebtoken To store users session encrypted and verify them as middleware in user/blog/comment/category api requests
nodemon To run application in dev mode
body-parser Parse incoming request bodies in a middleware before your handlers, available under the req.body property.
cloudinary It provides cloud-based image and video management services.
cookie-parser Parse Cookie header and populate req.cookies with an object keyed by the cookie names.
cors For Cross-Origin Resource Sharing
express a back end web application framework for building RESTful APIs with Node.js
jwt JSON Web Tokens are an open, industry standard RFC 7519 method for representing claims securely between two parties.
multer Multer is a node.js middleware for handling multipart/form-data , which is primarily used for uploading files.
Sequelize Sequelize is a modern TypeScript and Node.js ORM for Postgres

Built With

html5css3javascriptnodejspostgresql express

Contact

👤 Aaroh Srivastava, Anshu Joshi, Hari Om Sharma

Aaroh Srivastava (2021BCS-001)

Anshu Joshi (2021BCS-014)

Hari Om Sharma (2021BCS-029)

Show your support

Give a ⭐️ if this project helped you!

About

This is a blogging website to connect ideas and people around the globe.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published