How to set it up (Developer Guide) - iks-gmbh-tools/Fileman GitHub Wiki

Check out the source code from this repository. (As we are on GitHub here, we assume that you are already familiar with Git and know how to set it up. If not, see e.g. here.)

What you need to participate in the development of the Fileman project:

1) Frontend

The frontend is based on Angular. So you need a corresponding IDE (i.e. for support of TypeScript, HTML, CSS). A good and free IDE for this is Visual Studio Code. To work with the frontend, you will need to execute the following steps:

a) Install Node.js (as you need its package manager Node Package Manager, shortly called npm). Download it here.

b) Install the Angular CLI by executing the command npm install -g @angular/cli, either in your system command line terminal or (this is equivalent) in the terminal view of your IDE.

c) Navigate into the "Fileman-Frontend" subdirectory under your chosen Git checkout path and run the command npm install. This will download all necessary dependencies into a subfolder "node_modules". (This is large and therefore not contained in the Fileman GitHub repository.)

d) Execute the command ng serve. (This will make the Fileman frontend available under "http://localhost:4200/fileman").

To run the implemented Unit Tests, execute ng test.

2) Backend

The backend is based on Java and Spring. A good and free IDE for this is Eclipse. Eclipse and the Fileman-Backend both need the Java VM (see Java installation details below). To work with the backend, you will need to execute the following steps:

a) Install Java. For development, you need to download the Java Development Kit (JDK). The minimum version needed to work with the backend is Java 8. However, we recommend using Java 10 or higher. You can download Java here. After the installation, check whether the "JAVA_HOME" enviroment variable has been created in your system (and create it if necessary), pointing to the JDK installation directory (e.g. "C:\dev\Java\jdk-10.0.2"). Also check whether the entry "%JAVA_HOME%\bin" is existing in your "Path" variable (and add it if necessary).

b) Install the build tool Maven. Download Maven here. After the installation, you need to add the "MVN_HOME" environment variable to your system, pointing to the Maven main directory (e.g. "C:\dev\apache-maven-3.6.3"). Also make sure to add the entry "%MVN_HOME%\bin" to your "Path" variable.

c) To initially build the Fileman backend, you need to navigate into the "Fileman-Backend" subdirectory under your chosen Git checkout path and run the Maven command mvn clean install.

d) The first time you start the application, uncomment the line spring.datasource.data = classpath:/insertDefaultData.sql" in the file Fileman-Backend/src/main/resources/application.properties, so that the H2 database will be created with its initial contents.

e) Once the build has been successfully completed, the backend can be run by executing the class Fileman-Backend/src/main/java/com/iksgmbh/fileman/backend/FilemanBackend.java as "Java Application". The backend is then available under "http://localhost:10002/fileman/".

f) Comment the line spring.datasource.data = classpath:/insertDefaultData.sql" in the file Fileman-Backend/src/main/resources/application.properties again, in order to avoid a failure when starting the backend a second time.

After starting the backend, you can view the database contents under "http://localhost:10002/fileman/db".