Home

Awesome

angular-boilerplate ยท <a href="https://github.com/hofiorg/angular-boilerplate/actions/workflows/node.js.yml">node_js workflow</a> <a href="https://github.com/hofiorg/angular-boilerplate/actions/workflows/maven.yml">node_js workflow</a>

Technologies Overview ๐Ÿš€

TechnologyPurposeDocumentation
Angular 18Base Frameworkhttps://angular.dev/
Bootstrap v5.3Grid Systemhttps://getbootstrap.com/docs/5.3/layout/grid/#how-it-works
NgRxState Handlinghttps://ngrx.io/
Angular MaterialComponentshttps://material.angular.io/components/categories
ngx-datatableTable Componenthttp://swimlane.github.io/ngx-datatable/
Spring Boot<br/>(REST + JSON)Serverhttps://spring.io/projects/spring-boot

Installation

Install node/npm

nvm install lts/jod
nvm use lts/jod
nvm alias default lts/jod

Install Angular Command Line Interface (CLI)

npm install -g @angular/cli

Install Java

Installation with Homebrew (MacOS)

brew install openjdk
sudo ln -sfn $HOMEBREW_PREFIX/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk

Install Maven

Installation with Homebrew (MacOS)

brew install maven

Scripts directory

All development scripts can be found under src/main/scripts.

Install dependencies

Run 01_install_fe.sh to install the JavaScript project. This runs npm install.

01_install_fe.sh

Development server

Run 02_start_fe_dev_server.sh for a frontend development server. Navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.

02_start_fe_dev_server.sh

Running unit tests

Run 03_test_fe.sh to execute the frontend unit tests via Karma.

03_test_fe.sh

Install Server

Run 10_install_server.sh to install the server project. This runs mvn clean install.

10_install_server.sh

Test Server

Run 11_test_server.sh to test the server project. This runs mvn test.

11_test_server.sh

Build

Run 20_build.sh to build the project. The build artifacts will be stored in the target/ directory.

20_build.sh

Start

Run 30_start_server.sh to start the Spring Boot server with Java.

30_start_server.sh

Open in Chrome

Run 40_open_chrome.sh to start Chrome.

40_open_chrome.sh

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Further help

For more help with the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.

Steps to reproduce

New Angular Project

ng new angular-boilerplate

Git

git init
git add *
git commit -m "initial commit"
git branch -M main
git remote add origin https://github.com/hofiorg/angular-boilerplate.git
git push -u origin main

Angular Material

ng add @angular/material

Bootstrap

npm install bootstrap --save

Ngx Datatable

npm install @swimlane/ngx-datatable

NgRx Store and Effects

ng add @ngrx/store@latest
ng add @ngrx/effects@latest

TODO List