This project is designed on a 4 Tier architecture
- Presentation layer: Primefaces
- Application layer: Wildfly
- Business layer: Jakarta EE
- Data access layer:
- Relational Database: JPA with PostgreSQL
- Document Oriented Database: ElasticSearch
This project also uses Apache Maven as it's project management and comprehension tool.
This project was developed in a modular architecture in which the components contain their specific logic and are combined in the Main module and afterwards deployed in the War module.
Modules:
- Components
- Main
- War
Component documentation:
- Core: doc
- Elastic: doc
- GCS: doc
- ParkData-Sorter: doc
- ParkData-Receiver: doc
- Web: doc
- User: doc
- Admin: doc
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Following programs are needed:
- JDK 1.8
- Maven
- Wildfly 22.0.0.Final
- Postgres 12.3
- ElasticSearch 7.13.1
- Kibana 7.13.1 (Recommended)
In order to connect to the postgres database a JDBC driver is needed. You can download the Postgres 42.2.18 driver here.
Place the driver in WILDFLY_HOME\modules\org\postgresql\main create folders if necessary. Afterward add a module.xml with the following content to the same directory:
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.3" name="org.postgresql">
<resources>
<resource-root path="postgresql-42.2.18.jar"/>
<!-- Make sure this matches the name of the JAR you are installing -->
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
Add a new driver and datasource to your standalone.xml at WILDFLY_HOME\standalone\configuration
<datasource jndi-name="java:/parkguidance" pool-name="ParkGuidance" enabled="true" use-java-context="true">
<connection-url>jdbc:postgresql://localhost:5432/parkguidance</connection-url>
<driver>postgresql</driver>
<security>
<user-name>DBACC</user-name>
<password>DBACC</password>
</security>
</datasource>
<driver name="postgresql" module="org.postgresql">
<driver-class>org.postgresql.Driver</driver-class>
<xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
</driver>
Add a new console-handler and logger to your standalone.xml at WILDFLY_HOME\standalone\configuration
<subsystem xmlns="urn:jboss:domain:logging:8.0">
....
<console-handler name="stdout-console" autoflush="true">
<level name="ALL"/>
<formatter>
<pattern-formatter pattern="%s%n"/>
</formatter>
</console-handler>
<logger category="stdout" use-parent-handlers="false">
<handlers>
<handler name="stdout-console"/>
</handlers>
</logger>
....
</subsystem>
Add a new admin user with the provided bat file at WILDFLY_HOME\bin\add-user.bat.
Create a new User with Username: DBACC and Password: DBACC.
Add a new Database with the name parkguidance
Please Note: Do not use these users in a production system.
This project requires a forked version of Primefaces 8.0. You can download it as zip or with git.
git clone --branch 8.0@Neo https://github.com/Neoministein/primefaces/
After installing, you need to add it to your local maven repository using.
mvn clean install
You can download the source code as a zip or with git.
git clone https://github.com/Neoministein/parkguidance
To build the sources use the command:
mvn clean package
After building the sources you can start wildfly at WILDFLY_HOME\bin\standalone.bat.
If you want to access the page from other sources than localhost, you would need to add "-b 0.0.0.0" as a parameter to the execution of standalone.bat
You can now log in to the admin panel at http://localhost:9990 and add the war Files to your deployment:
- parkguidance-war-x.x.x.war
After deploying it you can reach the website at:
- User Panel: http://localhost:8080/park-guidance
To see the admin features you'll need to login at:
- Admin Panel: http://localhost:8080/park-guidance/login
And these two API endpoints:
- Parkdata Receiver http://localhost:8080/park-guidance/api/park-data/receiver
- Parkdata Sorter: http://localhost:8080/park-guidance/api/park-data/sorter