Skip to content

This project provides an easily deployable dockerized service generating EAN, UPC barcodes and QR codes

License

Notifications You must be signed in to change notification settings

kocmana/barcode-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Barcode Service

About the Project

The aim of this project is to provide an easily deployable service for the rendering different types of barcodes. The idea for such a thin wrapper service for barcode libraries was based on a Baeldung tutorial available here.

The current service supports the following barcode types:

  • EAN 8

  • EAN 13

  • QR Codes

  • UPC A

  • UPC E

Stack

The solution is based on the following stack:

  • Java 17

  • Spring Boot 2.6.3

  • JIB for creation of the docker images

  • Barcode Creation Libraries

Getting Started

Prerequisites

This project requires

  • Java Version 17

  • Maven

  • A local docker daemon such as a docker client or access to a remote docker image repository

How To Use

  1. Clone the repository

    git clone https://github.com/kocmana/barcode-service.git
  2. Compile and package the application into a docker image

    1. To add the image to a local docker daemon use

      mvn clean compile jib:dockerBuild
    2. To add the image to a remote repository use

      mvn clean jib:build -Dimage=DestinationOfYourImage
  3. Run the docker image either locally or deploy

Modularization

In case that barcode generation is only required for a subset of the offered barcodes, packages containing not required barcodes can be deleted prior to deployment without affecting any other barcode generation functionality.

If e.g. only QR code generation is required, the ean package can be deleted altogether before compilation of the service as described above.

Caching

Currently, the project is set to use Caffeine as the technical basis for caching. If cross-instance caching is required for multiple deployed instances of the service, this can easily be done by configuring alternative solutions like Redis in the application-docker.yml (for additional information see here.

Security

Security of the exposed endpoints is not considered part of the responsibilities of this application, since the actual requirements may differ widely depending on the actual deployment environment and service landscape.

If auth is not handled by the service mesh or by using any external solution, Spring Security can be added easily and configured to the specific requirements.

⚠️
If no additional precautions are taken, all endpoints are publicly available if deployed as is.

About

This project provides an easily deployable dockerized service generating EAN, UPC barcodes and QR codes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages