Giter VIP home page Giter VIP logo

sales-incentive-management-platform's Introduction


Sales Incentive Management System

Spring Boot React Native MySQL Hibernate Maven Bootstrap Spring Security JWT

OverviewEntitiesAPIsDemoApplication PropertiesDevelopmentBuild

Overview

Problem Statement

Creating a solution for a customer which is a big player in the Vehicles sales. The company has sales channels in multi geographies and sells different types of vehicles - 2 wheelers, 3 wheelers, 4 wheelers and commercial vehicles. They have a complex commission calculation model and needs help in creating a sales incentive management platform.

Demands of the customer

  • Used to manage the commission to be paid to the Salesmen.
  • The system should allow addition of a sales team member.
  • System should allow for the definition of products under the following product types:
    • 2 Wheelers
    • 3 Wheelers
    • 4 Wheelers
    • Commercial Vehicles
  • System should allow for batch input of sales for every product on a daily basis.
  • The system should calculate the commission payable for every sales team member once the data for a month is updated.

Technology Stack

  • Backend - Spring Boot
  • Database - MySQL
  • Frontend - React
  • Build System - Maven

Entities

User

  • userId (primary key)
  • username
  • name
  • password
  • userQuota
  • role

Role

  • roleId (primary key)
  • roleName

User Role (Hibernate Auto Generated Table)

  • userId (foreign key)
  • roleId (foreign key)

Product Type

  • productTypeId (primary key)
  • pType

Products

  • pId (primary key)
  • pName
  • pCost
  • pType

Sales Details

  • salesId (primary key)
  • pId (foreign key)
  • userId (foreign key)
  • pName
  • pType
  • transactionMonth

Commission Structure

  • commissionId (primary key)
  • productTypeId (foreign key)
  • startRange
  • endRange
  • commissionPercentage

User Commission (Query Auto Generated Table)

  • transactionId (primary key)
  • userId (foreign key)
  • productTypeId (foreign key)
  • userAmount
  • transactionMonth
  • pCost
  • userQuota
  • pType
  • commissionPercentage

APIs

Authenticate

  • Post Mapping to return JWT.
{
    username: "user",
    password: "password"
}

Admin

  • Get Mapping to find all users in the database.
  • Get Mapping to find user by ID provided.
  • Post Mapping to create user.
{
    "username": "username",
    "name": "Full Name",
    "password": "password",
    "userQuota": 50000
}
  • Put Mapping to edit user by ID.
{
    "username": "newusername",
    "name": "Full Name",
    "password": "password",
    "userQuota": 48000
}
  • Get Mapping to find all products in the database.
  • Post Mapping to create new product.
{
    "pName": "Honda",
    "pCost": 72000
    "pType": "2 Wheeler"
}
  • Post Mapping to add sales details (Upload CSV in frontend). Auto updates the User Commission table when performed.
[
    {
        "pId": 1,
        "userId": 2,
        "pName": "Honda",
        "pType": "2 Wheeler",
        "transactionMonth": "2022-07"
    },
    {
        "pId": 2,
        "userId": 3,
        "pName": "Hyundai",
        "pType": "4 Wheeler",
        "transactionMonth": "2022-08"
    }
]
  • Get Mapping to return commission structure for every product type.
  • Get Mapping to find commission structure for a particular product type within a rage by it's ID.
  • Put Mapping to edit the commission structure by ID.
{
    "productTypeId": 3,
    "startRange": 28000,
    "endRange": 45000,
    "commissionPercentage": 6
}
  • Get Mapping for forced commission change. Updates the auto calculated commission amount of a user by force using Query.
{
    "userId": 2,
    "transactionMonth": "2022-07",
    "userAmount": 34000
}

Salesman

  • Get Mapping to find all sales by every salesman in the database.
  • Get Mapping to find their sales based on the month.
{
    "userId": 2,
    "transactionMonth": "2022-07"
}
  • Get Mapping to display all the sales carried out by the logged in user.
  • Get Mapping to display commission amount and user quota in bar chart form for the logged in user.

Demo

demo.mp4

Application Properties

server.port = yourPreferredPortNumber

spring.datasource.url = jdbc:mysql://localhost:3306/yourSchemaName
spring.datasource.username = yourUsername
spring.datasource.password = yourPassword

Development

  • Frontend
npm install
  • Backend
mvn install

Build

  • Frontend
npm start
  • Backend
mvn spring-boot:run

sales-incentive-management-platform's People

Contributors

ibizabroker avatar pranavmanitripathi avatar kumarsaksham avatar prateeksingh508 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.