Skip to content

This application is designed to create an interactive labseq sequence calculator using Quarkus for the backend and Angular for the frontend.

Notifications You must be signed in to change notification settings

dafilmorais/labseq-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[Quarkus + Angular] : "REST Service returning labseq sequence"

This application is designed to create an interactive labseq sequence calculator using Quarkus for the backend and Angular for the frontend.

Challenge Description

The goal of this challenge is to create an interactive labseq sequence calculator using Quarkus for the backend and Angular for the frontend.

  • The Backend Service should implement a RESTful API that calculates and returns values from the labseq sequence. The labseq – l(n) - sequence is defined as follows:
    • n=0 => l(0) = 0
    • n=1 => l(1) = 1
    • n=2 => l(2) = 0
    • n=3 => l(3) = 1
    • n>3 => l(n) = l(n-4) + l(n-3)

The Endpoint should be in the form <baseurl>/labseq/{n} where {n} represents the index of the sequence’s (single) value to return. The index may be any non-negative integer number.

The implemented service should use a caching mechanism to take advantage of previous calculations to speed up future calculations. This caching mechanism must be used in the algorithm’s intermediate calculations (if applicable), and not only in the endpoint’s invocations.

  • The Frontend should be an Angular application that provides a simple user interface to invoke the labseq sequence calculation service. Users should be able to input a value for n and receive the corresponding l(n) value.

Technologies 💻

This project uses the following technologies:

Repository Structure 🚧

The repository is organized as follows:

  • backend/: Source code and resources for the Quarkus backend.
  • frontend/: Source code and resources for the Angular frontend.
  • docker-compose.yml: Docker Compose configuration file to initialize the containers.
  • start.sh: This script builds and compiles the two Docker images in order to execute this project.

Prerequisites ⚠️

To run this project, you must have:

  • Docker -- for building & initialize the containers.
  • Java 21-- quarkus dependency.
  • WSL or GitBash -- for running the execution script.

Configuration and Usage 🔧

Make sure you have Docker installed and running:

> docker info

In the root directory of this project, run the script using the following command:

> ./start.sh

This script builds the two docker images from the source code and initializes them in containers. After the containers are up and running, access the frontend URL:

Verify the addresses in your Docker.

Calculator in action!

LabSeq Calculator

Validating results (by hand)

N25 by hand

Conclusion 🚀

I hope you can use this project to learn more about implementing Quarkus + Angular + Docker. Happy coding! ☕

About

This application is designed to create an interactive labseq sequence calculator using Quarkus for the backend and Angular for the frontend.

Resources

Stars

Watchers

Forks

Packages

No packages published