README.md 1.9 KB
Newer Older
Jan Löwenstrom's avatar
Jan Löwenstrom committed
1
2
3
4
5
6
# HSBCC

Hochschule Bremerhaven - Coding Challenge

## Setup
* clone this repo `git clone https://git.ortgies.it/swe3-si2018/swe3-hscc.git`
7
* (optional) pull the HSCC-docker-image `docker pull jortgies/hsbcc-handler`
8
* execute the startup script `./buildAndRun.sh`
9
* website will be hosted on port *:8080  => `localhost:8080/home.xhtml`
Jan Löwenstrom's avatar
Jan Löwenstrom committed
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
* hsbcc-handler will be started on *:3000


## Folder Structure

* ``/beans``: all backend beans, including the important `LoginBean` which is part of almost every other bean
as ManagedProperty. This bean's scope is "SessionScoped" and holds the user who is currently logged in.
* ``/dataAccessObjects``: DAO to execute transactions and hibernate calls.

* ``/exceptions``: custom Exceptions mostly thrown in the process of registration.

* ``/hibernate``: EntityFactory to offer abstract methods to perform transactions and the PersistenceManager to 
produce EntityManagers.

* ``/models``: POJOs like User or Challenge. Hibernate will generate MySQL tables out of these. Additionally includes a
folder "enums" for all enums and otherwise "1:n" tables.

* ``/rest``: Includes JAXActivator and the rest API interface to perform HTTP requests. Includes POJOs which are used by Jackson to 
to create JSONs or the other way around.

* ``/utilities``: Validators and EncryptionHelper to generate salts and hash passwords.


## Key Dependencies

Hibernate: Open-Source- Persistence- and ORM-Framework for Java
MySQL: H2 alternative
Primefaces: Open source framework for JavaServer Faces featuring over 100 components, touch optimized mobilekit, client side validation, theme engine and more.
Bootsfaces: JSF framework based on Bootstrap 3 and jQuery UI 

## Features

#### User
* ``solve programming puzzles``
* ``increase your rating by passing challenges``

#### Admin
47
48
* ``list all users``
* ``list all challenges``
Jan Löwenstrom's avatar
Jan Löwenstrom committed
49
50
51
52
* ``create challenges``
* ``update challenges``
* ``delete challenges``
* ``change User roles``