This is a TypeScript/NestJS project that demonstrates the implementation of Hexagonal architecture using an e-commerce use case. This application provides a set of APIs for managing an e-commerce platform.
Before running the application, ensure you have the following installed:
- Node.js (version >= 16.3.1)
- Docker (for running PostgreSQL)
- Clone the repository:
git clone git@github.com:Hazem-Ben-Khalfallah/hexaplace.git
- Navigate to the project directory:
cd hexaplace
- Install the dependencies:
npm install
To start the PostgreSQL Docker container, use the following command:
npm run docker:up
To stop the PostgreSQL Docker container, use the following command:
npm run docker:down
To start the application, use the following command:
npm run start
After starting the application, you can access the Swagger documentation by opening the following URL in your browser:
http://localhost:3000/docs
To create the need database and its related tables, use the following command:
npm run migration:up
To execute unit tests only, use the following command:
npm run test:unit
To execute end-to-end (e2e) tests only, use the following command:
npm run test:e2e
To run all tests, including unit and e2e tests, use the following command:
npm run test:all
To check the code coverage report from unit tests, use the following command:
npm run test:unit:cov
the generated reports will found under ./coverage/unit
To check the code coverage report for all tests, including unit and e2e tests, use the following command:
npm run test:all:cov
the generated reports will found under ./coverage/all
After starting the application, you can access the Swagger documentation by opening the following URL in your browser:
http://localhost:3000/docs
The Swagger documentation provides detailed information about the available APIs and their usage.
Feel free to explore and use the Hexaplace API for your e-commerce needs!