Skip to content
This repository has been archived by the owner on Jun 15, 2019. It is now read-only.

AlexAegis/elte-appdev

Repository files navigation

Demo Build Status Codacy Badge Maintainability code style: prettier Greenkeeper badge

Compiling and running this is straightforward and only needs Java to be installed, however if you want to jump straight to running the server head over to releases and grab the newest one. It's a background process so I recommend you starting it in a console if you want to shut it down easily.

java -jar cinema.jar

Functional requirements

This application provides an interface for cinema employees top schedule movie screenings and for users to get tickets for such screenings.

Users can register on the homepage, after logging in they can view a list of available movies and then apply to it by buying tickets.

Admins can create movies and events.

Non-functional requirements

The project supposed to be built into a single java executable which contains both the backend and the frontend. The application has to be secured via tokens to not let unauthorized access to non-users. The application has to implement multi grouped user categories in which we can distinguish between managers, admins and regular users.

Keep every asset of the project fresh and updated.

Entity Relation

ER Diagram

Folder Structure

REST

Security

The backend security solution is based on this article and a few tweaks here and there to support my use case.

The frontend uses the JWTModule to inject the bearer token into the headers of each call heading towards the API.

An interceptor refreshes the token on each http request so it never expires while in the application is in use.

User Groups

  • Admin
  • User

If you're not running this project from a recommended environment (IntelliJ or VS Code) You can still run it using the command line:

./mvnw spring-boot:run

If you want to use hot reload (and your JVM is capable) just pass the -P dev profile parameter and it will use the necessary JVM arguments.

./mvnw -P dev spring-boot:run

Technologies

Frontend framework

Backend framework

Token based authentication and authorization

In-memory database for development

Package manager for JS projects

JS Runtime featuring V8 from chromium

Build tool for the whole project. Can build and package the frontend too for static hosting

CSS extension

Drag and drop made really easy

Datatable, the best

Icons, awesome ones

Recommendations

Java IDE for the backend of this project

IDE for mainly the frontend but can be used for both. Settings

Linting in IDEA for java Install this plugin if you're using IntelliJ

Hot Reload capable alternative JVM

Download the latest release of DCENV Light binary, run it with administrator privileges and install it as an alternative JVM

java -jar DCEVM-8u181-installer.jar

This also needs a Hot Swap Agent. Download the latest and place it somewhere in your computer. I already provided one in the .hotswap folder of this repository.

To be able to use the newly installed alternative VM you have to provide the necessary VM arguments. You also need to provide the newly downloaded agent aswell. If you use IntelliJ to start the Spring-Boot application you can do this by opening up the 'Environment' panel and putting this in the VM Options field.

-XXaltjvm=dcevm -javaagent:./.hotswap/hotswap-agent-1.3.0.jar=autoHotswap=true

REST endpoint testing

Font with ligatures

Reload the Page for Chrome when the server changes

Inspect tokens in chrome to check the payload of your token stored in the local storage

Compile time magic before compile time Install this plugin if you're using IntelliJ

Package Manager for Windows

Command Line Tools for Travis

You need ruby to use the Travis CLI

Windows:

choco install ruby

then follow the instructions on the link given

Clean big files from the git history

Services

Git repository

Continuous Integration solution

To setup automatic deployment to Heroku through travis you either enable the Travis app on Github and then enable CI on Heroku or you tell Travis to deploy to Heroku in the configuration file of Travis. The Travis CLI has a wizard for setting up this entry. You need both Travis and Heroku CLI's installed.

travis setup heroku

Deployment Platform

Code review tool

Code review tool for maintainability

Badges to look cool