Skip to content

Repository files navigation

Clothing Store Rest API

Rest API used for clothing stores that can provide transaction reports, customer data and clothing data. This API has initial data that can be tested directly using Postman by entering the endpoint clothing-store-rest-api-production.up.railway.app/api.

Features

  • Display clothing data with the highest and lowest prices.
  • Display customer data for the first time to register (oldest customer) and the last customer to register (newest customer) by branch.
  • Display the 10 most purchased clothing data in 1 month at each branch (based on quantity).
  • Display 10 customer data that spend the most in 1 month at each branch (based on accumulated total spending).
  • Display the total sales data for each branch in 1 year.
  • Display 5 clothing data that experienced the highest increase in sales this month compared to the previous month. By comparing the quantity sold this month with the quantity sold the previous month.

Table of Contents

Getting Started

To get started running the project locally, please follow the steps below.

  1. Make sure you have installed Node.js, PostgreSQL and Postman on your local machine.

  2. Clone the repository

git clone https://github.com/TegarNH/Clothing-Store-Rest-API.git
  1. Install dependencies and fetch data to your local machine.
cd Clothing-Store-Rest-API
npm install
  1. Adjust username, password, host, and port with your PostgreSQL database configuration in file ./config/database.json

Local Usage

  1. Run the project
npm run local
  1. Open Postman, create a new request, paste http://localhost:3000/api in the request URL, and provide the path according to the one in the API Documentation.

  2. Click the Send button to send the request to the server

Production Usage

  1. Open Postman, create a new request, paste clothing-store-rest-api-production.up.railway.app/api in the request URL, and provide the path according to the one in the API Documentation.

  2. Click the Send button to send the request to the server

API Documentation

Visit the following site to view the API documentation

Built with

JS PostgreSQL Postman NodeJS Express Sequelize Railway

Author


Tegar Naufal Hanip

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Rest API used for clothing stores that can provide transaction reports, customer data and clothing data.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages