Skip to content

A modern, responsive, and feature-rich social media web application built with the MERN (MongoDB, Express.js, React.js, Node.js) stack. This project provides a complete foundation for a social network, allowing users to sign up, create posts with images, interact with others through lkes and commen

Notifications You must be signed in to change notification settings

imvikrammaurya/social-media

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Social Connect - A Full-Stack Social Media MERN Application

A modern, responsive, and feature-rich social media web application built with the MERN (MongoDB, Express.js, React.js, Node.js) stack. This project provides a complete foundation for a social network, allowing users to sign up, create posts with images, interact with others through likes and comments, and manage their profiles.

It's an ideal portfolio project for full-stack developers looking to showcase their skills in building scalable, authenticated, and interactive web applications with RESTful APIs and modern frontend practices.


Social.Media.Website.mp4

✨ Key Features

  • 🔐 Secure JWT Authentication: Robust user registration and login system using JSON Web Tokens (JWT) for secure, stateless authentication.
  • 🌐 Google Authentication: Option to sign up or log in seamlessly using a Google account for quick and easy access.
  • 📝 Full CRUD for Posts: Users can easily Create, Read, Update, and Delete their posts.
  • ❤️ Interactive Engagement: Like and unlike posts, and add comments to foster user interaction.
  • 🧑‍💻 User Profiles: Every user has a dedicated profile page displaying their posts and information.
  • 🖼️ Image Uploads: Seamlessly upload and attach images to posts.
  • 📱 Fully Responsive Design: A clean and modern UI built with Material-UI that looks great on desktops, tablets, and mobile devices.
  • ⚡ Optimized Backend: A fast and efficient RESTful API built with Node.js and Express.js, connected to a MongoDB database.

🛠️ Tech Stack

This project is built using a modern and powerful technology stack:

Layer Technology / Library
Frontend React.js, Material-UI (MUI), React Hooks, Context API
Backend Node.js, Express.js
Database MongoDB Atlas, Mongoose (Object Data Modeling)
Authentication JSON Web Token (JWT), Google OAuth 2.0, bcrypt.js (Password Hashing)
Deployment Vercel / Netlify (Frontend), Render / Railway (Backend)

⚙️ Getting Started

Follow these instructions to get the project up and running on your local machine.

Prerequisites

Make sure you have the following software installed:

Installation Guide

1. Clone the Repository Open your terminal and clone the repository:

git clone https://github.com/imvikrammaurya/social-media.git
cd social-media

2. Setup the Backend Server Navigate to the server directory, install dependencies, and set up your environment variables.

# Move into the server directory
cd server

# Install server dependencies
npm install

Next, create a .env file in the /server directory and add the following variables. You will need to get Google OAuth credentials from the Google Cloud Console.

# .env
# Server Port
PORT=5000

# MongoDB Connection
MONGO_URI=your_mongodb_connection_string

# JWT Secret
JWT_SECRET=your_super_secret_key_for_jwt

3. Setup the Frontend Client Open a new terminal window, navigate to the client directory, and install its dependencies.

# From the root directory (social-media/), move into the client directory
cd client

# Install client dependencies
# The --legacy-peer-deps flag is used to bypass peer dependency conflicts.
npm install --legacy-peer-deps

4. Run the Application You need to run both the backend and frontend servers simultaneously in their respective terminals.

  • In your backend (/server) terminal, run:

    npm start

    The server should now be running on http://localhost:5000.

  • In your frontend (/client) terminal, run:

    npm start

    The React application will open automatically in your browser at http://localhost:3000.

🎉 Congratulations! The application is now running locally.


📸 Screenshots

HomePage Without Signup Homepage “Homepage screenshot”

SignUp Page Signup Page “SignUp Page Screenshort”

Login Page Login Page “Login Page Screenshort”

HomePage After Login HomePage After Login “HomePage After Login Screenshort”

Creating Post Creating Post “Creating Post Screenshort”

Post Created Post Created “Post Created Screenshort”

After Deleting Post After Deleting Post “After Deleting Post Screenshort”

👨‍💻 Author

Vikram Maurya

This application was created as my 5th-semester final project while pursuing a Bachelor of Computer Application.


🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

About

A modern, responsive, and feature-rich social media web application built with the MERN (MongoDB, Express.js, React.js, Node.js) stack. This project provides a complete foundation for a social network, allowing users to sign up, create posts with images, interact with others through lkes and commen

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published