File structure

Once created, the application will have the following file structure:

As you can see, the root folder is quite busy since it contains a few folders but a lot of configuration files. The most interesting among them are as follows:

  • src: This is the source folder which holds the main application source and the test source files.
  • webpack: This folder holds all the webpack client-side build configurations for development, production, and testing.
  • gradle: This folder contains a Gradle wrapper and additional Gradle build scripts that will be used by the main Gradle build file (JHipster provides a similar wrapper if Maven is chosen as well).
  • build.gradle: This is our Gradle build file and specifies our application's build life cycle. It also has specifies server-side dependencies. The build uses the properties defined in the gradle.properties file alongside it. You'll also find an executable named gradlew (gradlew.bat for Windows), which lets you use Gradle without having to install it.
  • .yo-rc.json: This is the configuration file for JHipster. This file stores the options we selected during app creation, and it is used for app regeneration and upgrades.
  • package.json: This NPM configuration file specifies all your client-side dependencies, client-side build dependencies, and tasks. 
  • tsconfig.json: This is the configuration for Typescript. There is also tsconfig-aot.json for Angular ahead-of-time (AOT) compilation.
  • .eslintrc.json: This is the lint configuration for the application.
Install and configure Typescript and the ESLint plugin for your IDE or editor to make the most of Typescript.

Now, let's take a look at the source folder. The main folder will hold the main app source code and the test folder will test the source code. The folder structure is as follows:

  • main:
    • docker: Holds the Dockerfile for the application and the Docker compose configurations for selected options
    • java: Holds the main Java source code for the application
    • resources: Holds Spring Boot configuration files, Liquibase changelogs, and static resources such as server-side i18n files and email templates that are used by the application
    • webapp: Holds the Angular application source code and the client-side static content such as images, stylesheets, i18n files, and so on
  • test:
    • java: Holds the unit and integration test source for the server-side
    • javascript: Holds the Karma unit test specs and Protractor end-to-end specs for the client-side application
    • resourcesHolds Spring configuration files and static resources such as server-side i18n files and email templates that are used by the application to perform tests

We'll take a look at the server-side source code in the next section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.13.255