Git Product home page Git Product logo

lms's Introduction

Description

Loyalti Management System API

Dependencies Documentation

Install

  • pull this repository to your local machine
  • open your project folder and run pnpm i -g ts-node
  • run pnpm install
  • make your .env based on .env.example and fill the minimum required environment property
  • run pnpm run migrate core up to run database migrations and seeders
  • open api documentation with http://localhost:3000/api/docs, default port is 3000

Running the app

# development
$ pnpm run start

# watch mode
$ pnpm run start:dev

Description System & How to use

  • Untuk ERD bisa dilihat pada root folder dengan nama ERD-LMS.png

  • Untuk data yang menggunakan seeders antara lain:

    • Data Member
    • Data Loyalty
    • Data Loyalty Policy
    • Data Loyalty Benefit
    • Data Tier
  • Untuk menggunakan API sign-in masukan kredensial di bawah ini:

  • Untuk endpoint yang memerlukan authorization seperti endpoint API Earned Point dan Redeemed Point silahkan masukan token
    dari response API sign-in ke dalam input tipe Authorize Bearer di Swagger.

Default config Loyalty Policy & Benefit

  • Pengaturan default loyalty policy adalah sebagai berikut

    • Transactional

      • minimal qty pembelian
      • apakah pembelian pertama kali
      • minimal total pembelian transaksi
      • RULES - 1: first_purchase && total qty >= qty pembelian = earned point
      • RULES - 2: total pembelian transaksi > minimal pembelian transaksi = earned point
    • Community

      • MGM: RULES:: total member invited * dengan fixed point di pengaturan loyalty benefit
      • ACTIVITY: RULES: tidak ada, default earned point yang di dapat mengikuti pengaturan loyalty benefit
  • Pengaturan default loyalty benefit adalah sebagai berikut

    • Transactional

      • Percentage dan fixed point: Dapat berupa kelipatan
      • NOTES: untuk nilai percentage yg di input ke database harus berupa nilai desimal, seperti 0.30 artinya 30% di ambil dari max point nilai fixed point. Jika nilai percentage null atau tidak di set, nilai kelipatan menggunakan fixed point
    • Community

      • fixed point: Dapat berupa kelipatan

lms's People

Watchers

salman 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.