This is the back-end API for Inventory Tracker. It's purpose is to keep track of items in inventory and also monitor when those items are entered into inventory, when they have been shipped to the warehouse and when the items are no longer available.
The project was developed based on SOLID principles and Domain Driven Design to deliver a highly structured, modularized and easy to maintain code.
Server: NodeJS, Express, Typescript, Typeorm, Postgres
The basic tech stack is NodeJS with Express using Typeorm on Postgres for database access.
A couple of other libraries are used, such as Node Mailer for sending e-mails, handlebars for e-mail templating, multer for file upload, helmet and rate-limiter-flexible for security purposes and celebrate for data validation.
Also, external services were integrated for e-mail sending (Sendgrid) and image file storage (Cloudinary).
For successfully running the project, it's necessary that the items below are also installed:
In order to run the project locally, you will need to perform the following steps to get the api installed on your machine:
Clone the project
git clone https://github.com/Backend-Mentorship/inventory-tracker-api.git
Before starting the server configure environment variables and execute migrations.
Go to the project directory
cd inventory-tracker-api
Build Image
docker-compose build
Run Container
docker-compose up
Stop Container
docker-compose down
To run this project, you will first need to add environment variables to your .env
file (must be located in the project's root folder, you can copy/paste and then rename .env.example
editing it's contents).
In order to create the database tables, run the command...
make migration-generate
Apply the migrations with
docker compose exec api npm run migration:up
Revert the migrations with...
docker compose exec api npm run migration:down