ReadIt is a microblog site where users can talk about topics, news, and more while interacting with other users by applauding and commenting on other posts.
- Description
- How to use ReadIt
- Mockups
- Defining our Working MVP
- Learning Points
- Code Snippets
- Credits
- Contact Info
The ReadIt Application is a great way for users to Create posts on their favorite topics. They can comment on their posts and they can also comment on other peoples posts. We've made it so that users can also give an 'applause' (or like) to someone's post.
Other cools features are editing abilities for the user that is logged in, they can edit their own posts (but not others), edit their own comments (to their own comments), and Delete their own posts or comments.
You will have to sign up first and then you can
- create posts
- add comments
- edit your own stuff and
- add reactions to any post.
Further features you will find here are after logging in:
- You can check out your profile page will show you
- all of your own posts, in ascending order so you can see the latest things you've created.
- Edit abilities and creating comments
So, get moving and start posting! Click Here ...for the deployed link for ReadIt
When you first come to the landing page (logged in or not) you are presented with all of the posts within the application that all of the users have created. You are able to read and search through all posts. Just not able to comment, update, or react to the posts.
However, you cannot add a reaction or create a post/comment unless you have a login. Here are some examples of login, and sign up that you should do next.
If not Logged in, you will see the opening page like this:
If not, and get going on reading/posting/commenting.
Or you can and enjoy the application a big more.
Once you are logged in. You will see the landing page and be able to create-posts, see what is in your profile (if an) and update/comment on all of your posts. Below is what it will look like after you sign in.
There is loads more. Go and explore.
The site actually came out quite a bit like the mockups. You will see that when you go to it (link is at the top of this page) and start exploring.
- Client side gql mutations have an effect on the
useMutation
hooks. If the mutation gql doesn't return the appropriate values that are updated, then theuseMutation
hook will not cause a component render.
Mutation of updating a nested subdoc's array.
addReactionToComment: async (parent, { postId, commentId, ...newReaction }) => {
return await Post.findOneAndUpdate(
{ _id: new ObjectId(postId), 'comments._id': new ObjectId(commentId) },
{
$push: { 'comments.$.reactions': newReaction }
},
{ new: true }
)
}
Using async in react useEffect
hook
Idea for react rendering with multiple conditions
Idea for using filter: saturate
for handclap emoji
MongoDB using Regex in .find()
Collaborator | GitHub | Reach Out to Us |
---|---|---|
Jorge Castro | Profile | |
Deepak Sinha | Profile | |
Jason Savoie | Profile | |
Nathan Geronimo | Profile |