Inventory service acts as a medicine inventory management and dispensing unit that helps in distributing the medicine to the pateint as per the prescription. Exposes below set of features as REST APIs.
- Item tracking
- Purchase order management
- Inventory reports
- Create, read, update, and delete inventory items.
- Get inventory levels.
This microservice is built on Java, Spring boot framework and MySQL DB. For detailed steps, refer to the Developer Guide
- JDK 17
- Wildfly 11
- MySQL
- Springboot V2
To install the inventory module, follow these steps:
- Clone the repository to your local machine.
- Install the dependencies
mvn clean install
- You can copy
common_example.propertiestocommon_local.propertiesand edit the file accordingly. The file is undersrc/main/environmentfolder. - Run the spring server with local configuration
mvn spring-boot:run -DENV_VAR=local
Open the application in your browser. The inventory module will be accessible at http://localhost:3000/inventory.
This project uses Git hooks to enforce consistent code quality and commit message standards. Even though this is a Java project, the hooks are powered by Node.js. Follow these steps to set up the hooks locally:
- Node.js (v18 or later)
- npm (comes with Node.js)
- Install Node.js and npm
- Download and install from nodejs.org
- Verify installation with:
node --version npm --version
- Install dependencies
- From the project root directory, run:
npm ci - This will install all required dependencies including Husky and commitlint
- From the project root directory, run:
- Verify hooks installation
- The hooks should be automatically installed by Husky
- You can verify by checking if the
.huskydirectory contains executable hooks
This project follows a specific commit message format:
- Format:
type(scope): subject - Example:
feat(login): add remember me functionalityTypes include: feat: A new featurefix: A bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code changes that neither fix bugs nor add featuresperf: Performance improvementstest: Adding or fixing testsbuild: Changes to build process or toolsci: Changes to CI configurationchore: Other changes (e.g., maintenance tasks, dependencies) Your commit messages will be automatically validated when you commit, ensuring project consistency.
Inventory module can be used to track items, create purchase orders, generate inventory reports, and scan barcodes. To access the inventory module, navigate to http://localhost:3000/inventory in your browser. You will be able to view all of the items in your inventory, create purchase orders and generate inventory reports.
All other features have been exposed as REST endpoints. Refer to the SWAGGER API specification for details.
If you encounter any issues, bugs, or have feature requests, please file them in the main AMRIT repository. Centralizing all feedback helps us streamline improvements and address concerns efficiently.
We’d love to have you join our community discussions and get real-time support!
Join our Discord server to connect with contributors, ask questions, and stay updated.