Skip to content

Fullstack social media application built using ReactJS, NextJS, MongoDB.

Notifications You must be signed in to change notification settings

DanielGoye/Circle_Link_MERN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

Circle Link MERN


A social media web application built using ReactJS, NextJS, Express, MongoDB.

Portfolio project, Open to contributions

Features

  • Upload Posts(Images, Video).
  • Add and Remove Friends.

Coming Soon

  • Share Location.
  • Invite Friends.
  • Hashtags.

You can view the project here: https://circle-link.netlify.app

Technologies used

Frontend:

javascript    react    redux

Backend:

nodejs    express    nextjs    mongodb

Requirements

If you want to run the app locally, you need:

  1. NodeJS installed.
  2. MongoDB database installed.

You can either install a local MongoDB database or you can create a cluster in the cloud using MongoDB Atlas.

  1. Familiriaty with NodeJS and MongoDB. This includes how to create clusters, databases and collections in MongoDB.

Install and use

  1. Clone the project to a local repository.
  2. Run npm install to install the required packages.
npm install
  1. Create a MongoDB database, either local or using MongoDB Atlas in order to get the connection string.
  2. You can prepopulate your database with data in the server/data folder.

You can do this by adding the following lines to server/server.js below dbConnect();. Remember to do this ONLY once when you run the app for the first time. Immediately delete this lines after that to prevent duplicate data insertion.

const { User } = require("./models/user");
const { Post } = require("./models/posts");
const { users } = require("./data/index");
const { posts } = require("./data/index");
User.insertMany(users);
Post.insertMany(posts);

You can also manually import the data directly into your created MongoDB database using the .json files in server/data.

  1. Create a .env file in the root folder and add the following:
NODE_ENV=development
JWT_SECRET_KEY=AnySecretKeyForJWT
MONGODB_URL=MongodbUrlConnectionString
NEXT_PUBLIC_API=http://localhost:3000

For the JWT_SECRET_KEY, you can put any string that you want. For the MONGODB_URL, you have to put the connection string that is used to connect to your database, whether it's local or in the cloud.

  1. Run npm start to run the app.
npm start