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 |
---|---|
Expenses Accounting | User |
---|---|
Note: The screenshots provided are for illustrative purposes only. This repository does not contain any actual views.
- NodeJs >= 16
- NPM >= 8.X
- SQL Server 2022 - 16.X
- Petty cash (FBCJ)
- Sale receipts (F-02)
- Expenses (F-02)
- Navigate to the root directory of the project and install the required dependencies:
npm install
-
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
-
Execute the database migration process:
npx sequelize-cli db:migrate
- 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.
Feel free to explore our range of accessible APIs for experimentation and use.
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.
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.
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.