Skip to content

fvrqan/rentnesia-backend

Repository files navigation

Rentnesia Backend, API & Data Specification

Rentnesia, a modern way to rent and store things online in your neighborhood

Tech Stack

  • Nodejs Server Runtime Environment
  • Expressjs Node.js Framework
  • Nodemailer Node.js Email Delivery Service
  • Sequalizejs ORM That Talks to Database
  • MySQL SQL Database Management System
  • AWS Amazon Web Services
  • Heroku Backend Deployment System
  • JWT Securely Transmitting Information
  • bcrypt Password Hashing Function

Preparation

Database Design

Rentnesia Database Design

Database Management System

Install mysql database management system

Installation and Configuration

  1. Run: npm install or yarn install to install the dependencies
  2. Create database
  3. Edit .env
  4. Run: npm migrate or yarn migrate to create the tables into the database

Running

Development

Run: npm run dev or yarn dev to run server

API Testing

Install: POSTMAN or INSOMNIA to test API

Production

Run: npm run start or yarn start to run server

API Endpoints

Authentication

Authorization: Bearer jwt.token.here

Root URL: http://localhost:8000

Items

Endpoint HTTP Description
/items GET Get all items
/items/:id GET Get item by id
/items/search?q= GET Search item data by keyword
/items POST Insert a new item
/items/:id DEL Delete item by id
/items/:id PUT Update item by id

Role:Customer Request Things to Pick-up

Endpoint HTTP Description
/requests/ GET Get all requests
/requests/:id GET Get one request by id
/requests/:id POST Create a new pick-up request by id
/requests/:id DELETE Delete request by id

Rent or Store Payment

Endpoint HTTP Description
/payments/ GET Get all payments
/payments/:id GET Get one payment by id

Role:Customer Borrow Things to Other Customer

Endpoint HTTP Description
/requests/ GET Get all requests
/requests/:id GET Get one request by id
/requests/:id POST Create a new pick-up request by id
/requests/:id DELETE Delete request by id

Users

Endpoint HTTP Description
/users/ GET Get all users
/users/:id GET Get one user by id
/users/register POST Create sign up form by email validation
/users/forgot_password POST Forgot password
/users/login POST Create login user
/users/:id PUT Update user profile

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published