Skip to content

mitTheos/m223-punchclock-quarkus

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backend

##Purpose The backend serves as a interface between the frontend and the database server and provides the functionality for adding/deleting/updating/reading data from the server

Installation

Follow these steps to start the application

  1. Install OpenJDK 11 or higher and have the JAVA_HOME variable set
  2. Install Apache Maven 3.8.1 or higher

Run the backend application

  1. Navigate to the root Directory of the Project cd m223-helloworld-quarkus/
  2. Start the Application with
./mvnw compile quarkus:dev

If the command mentioned above does not work try to run the command without the "./"

Useful services:

Swagger API: http://localhost:8080/q/swagger-ui/

H2 Console: http://localhost:8080/h2/
JDBC URL: jdbc:h2:mem:punchclock
User Name: zli
Password: zli




JPQL

The JPQL query with HAVING is located in ExpenseService.getExpensesOver50() and is designed to return all Expenses with an amount that is greater than 50.

Script for example data

At start a script is run which inserts example data into the database
The data is as follows:


category:

| id | title | | 1 | 'Admin' | | 2 | 'Projekte' | | 3 | 'IT-Support' |


entry:

| id | checkIn | checkOut | category_id | | 1 | '2021-09-30T07:16:14.807Z' | '2021-10-30T07:16:14.807Z' | 1 | | 2 | '2011-08-12T20:17:46.384Z' | '2011-09-11T20:17:46.384Z' | 2 | | 3 | '1989-03-30T07:16:14.807Z' | '1989-04-30T07:16:14.807Z' | 3 | | 4 | '2031-03-17T20:17:46.384Z' | '2001-02-13T20:17:46.384Z' | 2 |


absence:

| id | end | start | | 1 | '2021-09-30T07:16:14.807Z' | '2021-10-30T07:16:14.807Z' | | 2 | '2011-08-12T20:17:46.384Z' | '2011-09-11T20:17:46.384Z' | | 3 | '1989-03-30T07:16:14.807Z' | '1989-04-30T07:16:14.807Z' | | 4 | '2031-03-17T20:17:46.384Z' | '2001-02-13T20:17:46.384Z' |


expense:

| id | amount | receipt | | 1 | 67.50 | 'Vapiano-SihlCity' | | 2 | 69.25 | 'ArenaCinemas-SihlCity' | | 3 | 23.00 | 'BurgerKing-HauptBanhofZürich' | | 4 | 11.50 | 'Coop-SihlCity' | | 5 | 356.90 | 'GameStop-SihlCity' |

Frontend (Flutter)

Purpose

The Flutter frontend serves as a interface for the backend and as a way to create/edit/view/delete the entities of the database. The Flutter Application has only been tested on web but since the Flutter framework also works on IOS, Android and Windows the adjustments needed to get it working on additional operating systemns should not be too big.

Install Flutter

Follow this guide to install Flutter: Flutter-Install

if not already on Stable, switch to Flutter Channel Stable

    flutter channel stable

Download FLutter 2.5.1 from the official Flutter releases page: Flutter releases 2.5.1

Some useful commands:

command description
flutter help shows a list of commands Flutter supports
flutter doctor check if you have installed Flutter correctly and if not tells you what to fix
flutter --version gives you information about you flutter installation (Flutter verison, Flutter channel, Dart version...)
flutter channel <CHANNEL_NAME> list available channels or add the channel name to switch to the given channel
flutter run <DART_FILE> run a flutter app
where flutter dart displays the path to the local instance of flutter & dart (omit "dart" to only display th flutter path)

Build Flutter application in Web

If you already have Chrome installed you should be able to start Flutter in web without any additional steps, so the steps below are some general Information.

Follow this guide to setup your Flutter app for web: Flutter-Build a web application

Some useful commands:

command description
flutter create <PROJECT_NAME> to create a new project that includes web support
flutter create . to add web support to an existing project
flutter build web build the project for web
flutter run to run a flutter project in web run the flutter app like normal and select a browser as a device to launch the app on

Run Project

To run the project:

    flutter run
  1. proceed select the wanted device and the application will start

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 85.7%
  • JavaScript 7.9%
  • HTML 5.7%
  • CSS 0.7%