Giter VIP home page Giter VIP logo

socialmedianodebackend's Introduction

SocialMedia App API Documentation

Welcome, It is a social media-like application built with Node.js, Express, and MongoDB. It allows users to create posts, like, reply, and follow other users, fostering a sense of community and connection.

Getting Started

Configuration

MONGODB_URL=Your MongoDBURL | JWT_SECRET=your_secret_key_here | PORT=3000

API Documentation

User Routes

Route Purpose HTTP Method Request Body Authentication Required
/api/users/signup User registration POST name, email, username, password No
/api/users/login User login POST username, password No
/api/users/profile/:username Get user profile GET None Yes
/api/users/follow/:id Follow/unfollow another user POST None Yes
/api/users/update/:id Update user profile POST name, email, username, password, profilePic, bio Yes

Post Routes

Route Purpose HTTP Method Request Body Authentication Required
/api/posts/create Create a new post POST text, img Yes
/api/posts/:id Get a specific post GET None Yes
/api/posts/feed Get feed posts (from followed users) GET None Yes
/api/posts/like/:id Like/unlike a post POST None Yes
/api/posts/reply/:id Reply to a post POST text Yes
/api/posts/:id Delete a post DELETE None Yes
/api/posts/:id Update a post PUT text, img Yes

Please note:

  • Authentication Required: Indicates whether the route requires the user to be authenticated (logged in) before accessing it.
  • Request Body: Lists the required data that should be included in the request body for each API call.
  • The HTTP methods (POST, GET, DELETE) correspond to the actions being performed on the routes.

Make sure to handle error cases, data validation, and input sanitization properly in your actual implementation.

Feel free to refer to the code and the documentation above for more details on each route's functionality.

socialmedianodebackend's People

Contributors

sachinsingh3232 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.