Acebook is a full-featured social networking web application inspired by Facebook, built using the MERN stack (MongoDB, Express.js, React, Node.js). It aims to replicate core functionalities of Facebook, providing users with an intuitive platform for connecting and sharing with friends and family.
- User Authentication (Sign Up, Log In, Log Out)
- Profile Customization (Profile Picture, name, email, about me)
- Posts (Create, Edit, Delete Posts)
- Comments & Like (CRUD)
- Friends System (Send Friend Requests, Accept/Reject Requests)
- Responsive Design for all devices
- MongoDB - Database
- Express.js - Web Application Framework
- React - Frontend Library
- Node.js - JavaScript Runtime
- Demetrius Vissarion - https://github.com/demetriusvissarion
- Thomas Mazzag - https://github.com/TomMazzag
- Gabriela Ehrenbrink - https://github.com/gabrielaehrenbrink/
- Jehoshua - https://github.com/AVJehoshua
- Fawaz Tarar - https://github.com/Fawaztarar
This project wouldn't have been possible without the collective effort and dedication of our entire team. Each member brought unique skills and perspectives that enriched the development of Acebook, making it not just a project, but a learning journey for all of us
-
Team Spirit: A huge shoutout to every team member for their unwavering commitment
-
Collaborative Learning: Special thanks to everyone for creating an environment where learning from one another was not just encouraged but became a part of our daily routine. The shared knowledge has been invaluable.
-
Problem-Solving: Kudos to the team for not shying away from challenges. Tackling each obstacle head-on and turning them into opportunities for growth has been inspiring
-
Support and Encouragement: Gratitude to each team member for the support and motivation provided throughout the project. Whether it was debugging, design feedback, or just a word of encouragement, it made all the difference.
-
Special Thanks to Claire Castanet (Technical Coach at Makers): Claire's insights and constructive feedback have not only helped us overcome numerous technical challenges but have also contributed significantly to our growth as developers.
These instructions will help you set up a copy of Acebook running on your local machine for development and testing purposes.
- Node.js
- MongoDB
- Git
Rerun
npm install
after commits
This repo contains two applications:
- A frontend React App
- A backend api server
These two applications will communicate through HTTP requests, and need to be run separately.
More documentation of the codebase and its architecture can be found here. It's recommended you all read the suggested docs after making sure the whole setup below worked for everyone. Then work together on a diagram describing how the application works.
https://trello.com/b/7rxgh5Ru/earthteamacebookmern
https://excalidraw.com/#room=e115eb6edcbdeb8825e3,kac4R5E5jjeYdOzmObmeXA
https://miro.com/app/board/uXjVNznJ0RY=/
https://docs.google.com/document/d/1jghTv3mIVKXAueXtq8aNkR4giNgNY8sVf-ct_ZhpC7U/edit
If you haven't already, make sure you have node and NVM installed.
- Install Node Version Manager (NVM)
Then follow the instructions to update your
brew install nvm
~/.bash_profile
. - Open a new terminal
- Install the latest version of Node.js, (
20.5.0
at time of writing).nvm install 20
-
Developer can fork to their local machine
-
Install dependencies for both the
frontend
andapi
applications:cd frontend npm install cd ../api npm install
-
Install an ESLint plugin for your editor, for example ESLint for VSCode
-
Install MongoDB
brew tap mongodb/brew brew install mongodb-community@6.0
Note: If you see a message that says
If you need to have mongodb-community@6.0 first in your PATH, run:
, follow the instruction. Restart your terminal after this. -
Start MongoDB
brew services start mongodb-community@6.0
We need to create two .env
files, one in the frontend and one in the api.
Create a file frontend/.env
with the following contents:
VITE_BACKEND_URL="http://localhost:3000"
Create a file api/.env
with the following contents:
MONGODB_URL="mongodb://0.0.0.0/acebook"
NODE_ENV="development"
JWT_SECRET="secret"
For an explanation of these environment variables, see the documentation.
- Start the server application (in the
api
directory) in dev mode:
; cd api
; npm run dev
- Start the front end application (in the
frontend
directory)
In a new terminal session...
; cd frontend
; npm run dev
You should now be able to open your browser and go to
http://localhost:5173
.
Then, after signing up, you should be able to log in by going to
http://localhost:5173/login
.
After logging in, you won't see much but you can create posts using PostMan and they should then show up in the browser if you refresh the page.
When in the branch you're working in, and you're happy with all your changes, use the following:
git add .
git commit -m "Your commit message"
git push
Switch to the main branch and pull any changes from there:
git checkout main
git pull origin main
Switch to your branch and merge it with the main branch.
git checkout your-branch-name
git fetch
git merge origin/main
Once you've merged your branch with the main, open your virtual environment and retest all your code and also checking the html pages are working appropriately.
If there were changes, **repeat step 1** and do another pull to check there aren't any changes from main.
## 5. Push your final changes
Push your final changes when you're happy.
```shell
git push origin your-branch-name
Or if you're in your branch, just use
git push
If you've successfully completed steps 1-5, and would like your branch to be merged onto the main branch, open up a pull request and ask for your team to review it.
Caution
Make sure you do not just merge the changes FROM YOUR BRANCH to MAIN yourself! Ensure everyone has reviewed and approved your code first
If there are any issues with your code, make the appropriate changes and repeat steps 1-5.
Note
If you have opened a pull request, any commits after that will be shown in that pull request so ensure your pull request is reviewed before you continue working on that branch.
If everything is approved and you merge your branch to the main branch, drop a message in the Slack channel to notify everyone to pull these changes.
Step 1. To see all previous commits:
git logs
or To see all previous commits from the current user:
git reflog
Step 2. Reset the branch to last working version using the commit hash of the commit you want to revert to ( the one before the issues )
git reset --hard <commit_hash>