Skip to content

AliesTaha/likeit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LikeIt

LikeIt is a social media application that combines features from facebook, instagram, and twitter. The web application deals with client and server side, and uses big stack approach. The global state is managed using redux libray, and uses React Router V6. The app also implements authentication for users, which is implemented using JWT authentication. The website allows the users to create an account, sign up / login, create a profile picture and background picture. It also allows users to follow and unfollow each other, post pictures, and populates their timeline with posts from the users they follow, in chronological order. They are also able to edit a status on thier profile, like other posts, and automatically calculates their number of followers/following.

Table of Contents

Technologies

Typing SVG

Typing SVG


Back to table of contents

Languages

Typing SVG


Back to table of contents

Functionality

Sign Up

image Signing up adds the new user to the database, and gives them the default profile and background image. It checks to see if passwords match, and checks if the user already exists in the database before doing so.
Back to table of contents


Log In or Out

Logging in simply checks if the user exists in the databse. If so, it checks if the passwords match. If so, then they can move on their own home page. Logging out simply clears the memory of the browser such that the user has to log back in, either with the same credentials or a different one.
Back to table of contents

Follow or Unfollow a User

Following a user and unfollowing them is similar to liking the post. Clicking the follow button allows the user to be added to the userBeingFollowed's array of followers, and adds the userBeingFollowed to the user's array of followings. Pressing the button again reverses this process. This is shown above. image
Back to table of contents


Scroll Through Feed

The feed is created by appending all the posts of the users who are followed in the database, then ordering the posts using the timestamps so that the most recent post in on top.
Back to table of contents

Create a Post

One can create a post that includes a text, an image, or both. The functionality is supported for any option, and each post has its own ID in the backend, and is timestamped so that they are shown in chronological order.
Back to table of contents

Like or Unlike a Post

Liking a post is simply done through pressing the like button, which increments the post's number of likes by 1. Clicking the button again removes the like from the post
Back to table of contents

Add Profile Status

At the click of a button, the user is able to access their status. They can change the fields, their information, and the respective picture, for background and profile.
Back to table of contents

Change Profile/Background Picture]

This is performed in the same way as above
Back to table of contents

Backend

Useful functionalities implemented by connecting MongoDB to app, and Express server and Node.js used on the server side. Routing and the aggregation of timeline were also taken care of 😎 .
Back to table of contents

Installation

  • Download the files, then CD into the /client and run the following commands
cd client
npm i redux red ux-thunk react-redux
npm i axios
yarn 
yarn add react-roucter-dom
yarn start
)
  • Simultaneously open a new terminal, CD into the /server and run the following
npm init
npm i express
npm i mongoose
npm i body-parser
npm i nodemon
yarn 
yarn add react-roucter-dom
npm start
)
  • The backend is connected to mongo db cloud
  • The server runs in port 8080
  • The client runs in port 3000
  • Make sure these are free before downloading the project

This project was bootstrapped with Create React App.

Available Scripts

In the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http:https://localhost:3000 to view it in your browser.

The page will reload when you make changes.
You may also see any lint errors in the console.

yarn test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

yarn build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

yarn eject

Note: this is a one-way operation. Once you eject, you can't go back!

If you aren't satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.

You don't have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

yarn build fails to minify


Back to table of contents