Skip to content

Store SAP API with petty cash, sales receipt, and expense accounting features.

License

Notifications You must be signed in to change notification settings

CW-Codewalnut/store-sap-backend

Repository files navigation

Store SAP API

Store SAP manages multiple stores, provides api for petty cash, sales reciepts and expenses accounting, and uses Node.js with Express and MSSQL for the backend, offering the flexibility to use other SQL databases via Sequelize ORM. Know more

Petty Cash Sales Receipts
Petty Cash Sales Receipts
Expenses Accounting User
Expenses Accounting User

Note: The screenshots provided are for illustrative purposes only. This repository does not contain any actual views.

System requirement:

  1. NodeJs >= 16
  2. NPM >= 8.X
  3. SQL Server 2022 - 16.X

SAP Features

  • Petty cash (FBCJ)
  • Sale receipts (F-02)
  • Expenses (F-02)

Quick Start

  1. Navigate to the root directory of the project and install the required dependencies:
npm install
  1. Rename the file .env.example to .env and provide the necessary credentials. If you opt for a different database other than MSSQL, remember to modify the dialect within the src/config/config.js file. for the quick start in local machine just provide the below config. then later you can add as per need:

    LOCAL_DB=DATABASE_NAME
    LOCAL_DB_USER=DATABASE_USER
    LOCAL_DB_PASS=DATABSE_PASSWORD
    LOCAL_HOST=HOST_NAME
    LOCAL_PORT=PORT_NUMBER
  2. Execute the database migration process:

npx sequelize-cli db:migrate
  1. Launch the application by running:
npm run dev

Expected Output:

[1] Environment running on: local
[1] Server is running on port: 3000
[1] Database connection has been established.

Available API's

Feel free to explore our range of accessible APIs for experimentation and use. Run in Postman

Furthermore, for more detailed information about a specific API, you can refer to the API documentation within Postman, accessible through the options on the right side of the interface.

Run Test

We employ Jest for our test cases. You can initiate the tests by executing the following command:

npm run test

Note: There are many useful script such as, generating test report, ESlinting, Prettier formatting you can use those as per your need.

SonarQube Report

SonarQube Report

Environments

We've set up various environment types like local, dev, uat, prod, and test in the src/config.js file. Feel free to utilize them based on your specific needs.

License

MIT