Estate360 / postit-social

Postit is a social media app that lets users create and share posts containing text, images, video, and/or audio. Users can reply to posts and delete their own post-it replies. The app implements soft delete on all resources and sorts posts (post-its) by newest first.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

postiT-social

let it go social😎☄️

Postit is a social media app that lets users create and share posts containing text, images, video, and/or audio. Users can reply to posts and delete their own post-it replies. The app implements soft delete on all resources and sorts posts (post-its) by newest first.

Live/Hosted Link: PostiT-Social 😎

Entity Relationship Diagram Link: PostiT_Model

API Documentation Link: PostiT_API_Doc or this link click on PostiT_API_Doc to access it faster.

PostiT Socials API (TypeScript)

This is a RESTful API built with TypeScript, Node.js, and MongoDB for basically creating text(posts or postit), and replying to Postit's. The API allows users to perform various actions, such as creating, updating, upvoting/devoting deleting postits(posts) etc...

Technologies Used

Getting Started Locally To use this API, you will need to have Node.js and MongoDB installed on your computer. Then, follow these steps:

  1. Run git clone https://github.com/Estate360/postit-social.git to clone the repository to your local machine.

  2. Run cd postit-social to navigate to the cloned repository directory.

  3. Install the required dependencies:

  4. Run npm install to install the required dependencies. npm start

  5. Run npm run dev or npm run prod to start the server locally in dev or production environment. The server will start running at http://localhost:4000. You can now use this API to perform various actions.

Hosted Link:

https://estate-postit-socials.onrender.com

Examples of possible responses (error messages)

  • Create a new user: Request enter the following on the body;
{
  "name": "Will Smith",
  "email": "willsmith@gmail.com",
  "password": "0000000000",
  "confirmPassword": "0000000000"
}

Response;

{
  "message": "User successfully created.",
  "token": "token appears here",
  "data": {
    "newUser": {
      "name": "Will Smith",
      "email": "willsmith@gmail.com",
      "role": "user",
      "active": true,
      "_id": "63fd0edfae3348c5cb28f52b",
      "createdAt": "2023-02-27T20:13:19.195Z",
      "updatedAt": "2023-02-27T20:13:19.195Z",
      "__v": 0
    }
  }
}

(By default, you get the role of "guest" except if specified)

if user already exists, the error responds becomes;

{
  "error": "User already exists"
}

More precise information and instruction about the api is provided on the api documentation

In a nutshell, Users can :

  • Create account
  • Login
  • Logout
  • Post a Postit
  • See a Postit feed
  • Comment on a Postit
  • Delete their Postit
  • Delete their comment
  • Edit Postit
  • View Postit
  • See a Postit Reply/Comments

Contributing

If you're interested in contributing to this project, please feel free to fork the repository and make any changes you like. Once you're ready, submit a pull request to have your changes reviewed and merged into the main branch.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

Leave a Star ⭐️ if you find this helpful or worth a Start

About

Postit is a social media app that lets users create and share posts containing text, images, video, and/or audio. Users can reply to posts and delete their own post-it replies. The app implements soft delete on all resources and sorts posts (post-its) by newest first.

License:MIT License


Languages

Language:TypeScript 85.4%Language:Pug 14.6%