This project provides the backend API for an e-commerce website.
It is built using Spring Boot and provides RESTful API with the HATEOAS.
The project is still under development, so not all features have been fully implemented.
To get started with the project, clone the repository and import it into your preferred IDE.
The project uses Maven for dependency management, so you must have Maven installed on your system.
To run the project, you should set up environment variables for the database and CDN.
You can then run the application using the following command:
mvn spring-boot:run
The application will start up and listen for requests on http://localhost:8080.
It is possible to start the project using Docker with following command:
mvn clean install && docker-compose up
The project uses Liquibase for database version control.
Liquibase-related tables are stored in the public
schema, while the actual data is stored in the main
schema.
PostgreSQL was chosen as an RDBMS.
To connect the project to the database, you should insert these environment variables:
PGUSER
- Database userPGPASSWORD
- PasswordPGHOST
- Hostname (for example,localhost
)PGPORT
- Port (5432 by default)PGDATABASE
- Database name
All the created images are stored in the Cloudinary.
The end client will receive a link to the saved image transformed into the WebP format.
To set up Cloudinary, you should insert this environment variable:
CLOUDINARY_URL
- Url from Cloudinary
To run unit tests, you can run this command:
mvn test
The integration tests use testcontainers. For testing, Docker should be installed and started.