Skip to content

pawl1n/ks-java

Repository files navigation

Build Lines of Code Coverage Code Smells Bugs Vulnerabilities

E-commerce Backend API

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.

Getting Started

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.

Running project

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

Database

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 user
  • PGPASSWORD - Password
  • PGHOST - Hostname (for example, localhost)
  • PGPORT - Port (5432 by default)
  • PGDATABASE - Database name

Saving Images

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

Testing

To run unit tests, you can run this command:

mvn test

The integration tests use testcontainers. For testing, Docker should be installed and started.

About

E-commerce Backend API, written with Spring Framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •