
SNS App
A Social Networking Service (SNS) application built using the MERN stack (MongoDB, Express.js, React, Node.js).
Table of Contents
Introduction
This SNS app allows users to create an account, log in, create posts, follow other users, and interact with posts by liking and commenting. It is built using the MERN stack to provide a robust, full-stack JavaScript solution.
Features
User authentication (Sign Up, Login)
Create, read, update, and delete posts
Like and comment on posts
Follow and unfollow users
User profile pages
News feed showing posts from followed users
Installation
Prerequisites
Make sure you have the following installed:
Node.js
MongoDB
npm or yarn
Steps
Clone the repository
Install server dependencies
Install client dependencies
Create a
.env file in the server directory and add the following variables:Start the server and client
The server will run on
http://localhost:5000 and the client on http://localhost:3000.Usage
Open your browser and navigate to
http://localhost:3000.Sign up for a new account or log in with an existing account.
Start creating posts, following users, and interacting with posts.
API Endpoints
Authenticationl
POST /api/auth/signup: Sign up a new userPOST /api/auth/login: Log in a userPosts
GET /api/posts: Get all postsPOST /api/posts: Create a new postGET /api/posts/:id: Get a specific postPUT /api/posts/:id: Update a specific postDELETE /api/posts/:id: Delete a specific postPOST /api/posts/:id/like: Like a postPOST /api/posts/:id/comment: Comment on a postUsers
GET /api/users: Get all usersGET /api/users/:id: Get a specific userPUT /api/users/:id: Update a userDELETE /api/users/:id: Delete a userPOST /api/users/:id/follow: Follow a userPOST /api/users/:id/unfollow: Unfollow a userTechnologies
Frontend: React, Redux, Axios
Backend: Node.js, Express.js
Database: MongoDB, Mongoose
Authentication: JWT (JSON Web Tokens)
Styling: CSS, Material-UI
Contributing
Contributions are welcome! Please follow these steps to contribute:
Fork the repository
Create a new branch (
git checkout -b feature/your-feature)Commit your changes (
git commit -m 'Add some feature')Push to the branch (
git push origin feature/your-feature)Open a pull request
0 likes · 0 views · Sep 26, 2024
This project is a MERN stack social networking app with features like user authentication, posts, comments, likes, follows, using JWT for secure logins.