This is a social media dashboard built where we can add users, and make them friends of each other, and using a user profile we can get to know about the friends of the user and the suggestions for users that we can add as friend. For the suggestions, we can see the possible path in the network of users between user and the suggested user.
Users connected on a social media can be thought of as a graph, where users are nodes and the friendship relation is an edge. The degree of separation between two users is the minimum number of edges that need to be traversed to reach from one user to another. The degree of separation between two users can be found using the Breadth First Search algorithm. The algorithm starts from the source user and traverses the graph in a breadth-first manner. The algorithm stops when the destination user is found. The number of edges traversed is the degree of separation between the two users.
NextJs 13, Typescript, Tailwind CSS, Cloudinary(Image Hosting)
- Light/dark mode toggle
- Add a user
- View a user profile
- Delete user's friends
- Add friends to user from suggestions
- Network route between a user and a suggestion
- Dashboard to view all users
To run this project, you will need to add the following environment variables to your .env file
NEXT_PUBLIC_Upload_Preset
NEXT_PUBLIC_Cloud_Name
To get these environment variables, refer this article
Clone the project
git clone https://github.com/kunaaal13/degree-of-separation.git
Go to the project directory
cd degree-of-separation
Install dependencies
npm install
Start the server
npm run dev