A social platform web application built with MERN stack. This is the codebase for the MongoDB NodeJS and Express RESTful backend API.
This is the solution for the full-stack web dev course @CoderSchoolVn
This include all common features of a Social Platform.
- User can create account with email and password ✅
- User can login with email and password ✅
- User can see a list of all users ✅
- User can see other user's information by id ✅
- Owner can see own user's information ✅
- Owner can update own account profile ✅
- Owner can deactivate own account ✅
- Rocket Search user by name ✅
- Rocket Owner update password
- Rocket Password confirm when update
- Authenticated user can make friend request to other ✅
- Authenticated user can see list of friend ✅
- Authenticated user can accept or reject a friend request ✅
- Authenticated user can see a list of all request receive ✅
- Author can see a list of all request sent ✅
- Author of Request can cancel the request✅
- Friend can unfriend✅
- Authenticated user can make a post (POST a post) ✅
- Author can update post by post's id ✅
- Author can delete post by post's id ✅
- Friend can see list of friend's post ❌
- Friend can make a comment (POST a comment) to other friend's post ✅
- Friend can see a list of all comment belong to friend's post ✅ (Post api)
- Author of Comment can update that comment ✅
- Author of Comment can delete that comment ✅
- Friend can make a reaction (like, dislike) to each other post ✅
- Friend can make a reaction (like, dislike) to each other comment ✅
-
Generate express boiler plate
npx express-generator --no-view npm install touch .gitignore .env
-
Install project dependencies
npm i nodemon cors bcryptjs dotenv npm i jsonwebtoken mongoose
-
Add dev script
{ "scripts":{ ... "dev":"nodemon ./bin/www" } }
-
Environment variable config (JSK, MURI) In
.env
JWT_SECRET_KEY=someKey MONGO_DEV_URI=mongodb://locahost:27017/ MONGO_PRO_URI=mongodb_srv://atlas.com/
In
.gitignore
node_modules .env
NODE_OPTIONS=--experimental-vm-modules
@copyright by CoderSchool