Skip to content

brohit22/SocialSnap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Social Media Web Application

Welcome to our Social Media Web Application! This project is built using the MERN stack - MongoDB, Express.js, React.js, and Node.js.

Table of Contents

Introduction

Our Social Media Web Application provides a platform for users to connect, share posts, comment, and interact with others. Users can create accounts, post updates, like and comment on posts, and follow other users to see their posts in their feed.

Features

  • User Authentication: Secure user authentication and authorization system.
  • User Profiles: Users can create and customize their profiles.
  • Posts: Users can create, edit, delete, and like posts.
  • Comments: Users can comment on posts.
  • Follow System: Users can follow/unfollow other users.
  • Feed: Users can view posts from users they follow.
  • Real-time Updates: Real-time notifications for new posts and comments.

Technologies Used

  • Frontend:
    • React.js
    • Redux (or Context API for state management)
    • Axios (for making API requests)
    • Bootstrap (or any other CSS framework for styling)
  • Backend:
    • Node.js with Express.js
    • MongoDB (mongoose ODM for database interactions)
  • Authentication:
    • JSON Web Tokens (JWT) for secure authentication
    • bcrypt.js for password hashing
  • Real-time Updates:
    • Socket.io (for real-time notifications)

Getting Started

Prerequisites

  • Node.js and npm installed on your machine
  • MongoDB database (either locally or using a cloud service like MongoDB Atlas)

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/social-media-app.git
    cd social-media-app
  2. Install dependencies:

    cd client
    npm install
    cd ../server
    npm install
  3. Set up environment variables:

    • Create a .env file in the server directory and configure MongoDB connection URI, JWT secret, and other necessary variables.
  4. Start the development server:

    • In the server directory:
    npm start
    • In the client directory:
    npm start

Usage

  • Visit http://localhost:3000 in your browser to access the web application.
  • Sign up for an account, create posts, comment, and interact with other users.
  • Explore different features and functionalities of the application.

API Endpoints

  • GET /api/posts: Get all posts.
  • POST /api/posts: Create a new post.
  • GET /api/posts/:postId: Get a specific post by ID.
  • PUT /api/posts/:postId: Update a post.
  • DELETE /api/posts/:postId: Delete a post.
  • POST /api/posts/:postId/comment: Add a comment to a post.
  • POST /api/users/register: Register a new user.
  • POST /api/users/login: User login and authentication.
  • GET /api/users/profile/:userId: Get user profile by ID.
  • PUT /api/users/profile/:userId: Update user profile.
  • POST /api/users/follow/:userId: Follow a user.
  • POST /api/users/unfollow/:userId: Unfollow a user.

Note: These are example endpoints. You can customize them according to your application's requirements.

Contributing

Feel free to contribute to this project. Pull requests and issue reports are welcomed!

License

This project is licensed under the MIT License.


Feel free to enhance this README file further with detailed instructions, screenshots, or any additional features specific to your social media application. Good luck with your project!

About

A social media application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published