A simple social media web application inspired by Twitter that allows users to register, log in, post tweets (text, images, and videos), like/dislike posts, retweet, and comment. It also includes an admin mode for user management.
- backend: Express server with MongoDB database using Mongoose. It handles authentication, user management, and post operations.
- frontend: React application using Redux for state management and Material-UI for styling. It includes features such as tweet posting, retweeting, commenting, and a responsive design for both desktop and mobile.
- Node.js (v18.12.1 or later recommended)
- npm (v8.19.2 or later recommended)
- MongoDB (local or cloud instance)
git clone https://github.com/ansonk4/csci3100-project-e7
Then, change directory into the project:
cd csci3100-project-e7
-
Navigate to the backend folder:
cd backend
-
Install the npm dependencies:
npm install # If you encounter warnings or errors, try: npm install --force
-
Install nodemon globally (if not installed already):
npm install -g nodemon
-
Create a
.env
file in the backend folder (if not provided) with at least the following content:MONGO_URL=your_mongodb_connection_string JWT_SECRET=your_jwt_secret PORT=3001
-
Start the server:
npx nodemon index.js
You should see a message like:
Server Port: 3001
-
Open a new terminal window and navigate to the frontend folder:
cd frontend
-
Install the npm dependencies:
npm install # If you encounter warnings or errors, try: npm install --force
-
Start the React client:
npm run start
The website should open in your browser.
Make sure to configure the necessary environment variables in the backend .env
file:
MONGO_URL
: MongoDB connection string.JWT_SECRET
: Secret key for JWT token generation.PORT
(optional): Server port (default is 3001).
- Register / Login: Users can register with their details and login. The login form supports both regular and admin login.
- Tweet Management: Users can post tweets with optional image/video attachments, like/dislike posts, retweet, and comment.
- Social Features: Follow/unfollow friends, view friend lists, and see tweet recommendations.
- Admin Mode: Admins can search and manage users.
- Frontend: React, Redux, Material-UI, Formik, Yup, React Dropzone.
- Backend: Express, MongoDB, Mongoose, JWT, bcrypt.
Open two terminal windows:
- One for running the backend server.
- One for running the frontend client.
Follow the installation and startup instructions provided above.
This project is open source. See the LICENSE file for more details.