A social media web application built using ReactJS, NextJS, Express, MongoDB.
Portfolio project, Open to contributions
- Upload Posts(Images, Video).
- Add and Remove Friends.
- Share Location.
- Invite Friends.
- Hashtags.
You can view the project here: https://circle-link.netlify.app
If you want to run the app locally, you need:
You can either install a local MongoDB database or you can create a cluster in the cloud using MongoDB Atlas.
- Familiriaty with NodeJS and MongoDB. This includes how to create clusters, databases and collections in MongoDB.
- Clone the project to a local repository.
- Run
npm install
to install the required packages.
npm install
- Create a MongoDB database, either local or using MongoDB Atlas in order to get the connection string.
- 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
belowdbConnect();
. 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
.
- 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.
- Run
npm start
to run the app.
npm start