11# lvz-viz
22
3- ![ GitHub license ] ( https://img.shields.io/github/license/CodeforLeipzig/lvz-viz.svg )
3+ < div align = " center " >
44
5+ ![ GitHub license] ( https://img.shields.io/github/license/CodeforLeipzig/lvz-viz.svg )
56[ ![ Java CI with Gradle] ( https://github.com/CodeforLeipzig/lvz-viz/actions/workflows/java_ci.yml/badge.svg )] ( https://github.com/CodeforLeipzig/lvz-viz/actions/workflows/java_ci.yml )
67[ ![ Node CI] ( https://github.com/CodeforLeipzig/lvz-viz/actions/workflows/node_ci.yml/badge.svg )] ( https://github.com/CodeforLeipzig/lvz-viz/actions/workflows/node_ci.yml )
7-
88[ ![ Maintainability] ( https://qlty.sh/gh/CodeforLeipzig/projects/lvz-viz/maintainability.svg )] ( https://qlty.sh/gh/CodeforLeipzig/projects/lvz-viz )
99[ ![ Code Coverage] ( https://qlty.sh/gh/CodeforLeipzig/projects/lvz-viz/coverage.svg )] ( https://qlty.sh/gh/CodeforLeipzig/projects/lvz-viz )
1010
11+ </div >
12+
1113## Intro
1214
1315Visualization of [ LVZ police ticker] ( https://www.lvz.de/Leipzig/Polizeiticker/Polizeiticker-Leipzig ) .
1416
1517The official website is hosted at < https://lvz-viz.leipzig.codefor.de >
1618by [ OK Lab Leipzig] ( http://codefor.de/projekte/2014-07-01-le-lvz_polizeiticker_visualisierung.html ) .
1719
20+ ## Prerequisites
21+
22+ ### Java
23+
24+ * ` jdk 17 ` or higher
25+
26+ We recommand the usage of [ The Software Development Kit Manager] ( https://sdkman.io/ ) .
27+
28+ ### Node and pnpm
29+
30+ * ` node 22.20.0 ` or higher
31+
32+ We recommand the usage of [ Node Version Manager] ( https://github.com/nvm-sh/nvm ) .
33+
34+ * ` pnpm 10.27.0 ` or higher
35+
36+ Check out the [ installation instructions] ( https://pnpm.io/installation ) .
37+
38+ ### Angular CLI
39+
40+ * ` @angular/cli 21.0.4 ` or higher
41+
42+ Install @angular/cli by running:
43+
44+ ``` bash
45+ pnpm install -g @angular/cli@21
46+ ```
47+
48+ ### Docker (when running services within docker)
49+
50+ * ` docker 28.0.2 ` or higher
51+
1852## Usage
1953
20- Build and run the app with [ npm ] ( https://www.npmjs.com ) , [ Grunt ] ( http://gruntjs.com/ ) and [ Gradle] ( https://gradle.org ) .
54+ Build and run the app with [ pnpm ] ( https://pnpm.io ) and [ Gradle] ( https://gradle.org ) .
2155
2256The crawling and indexing of new articles is activated by default.
2357It can be delayed by setting the startup parameter ` --app.initialDelay=<time in ms> ` to a high value (e.g. ` 1800000 ` for 30 minutes)
@@ -28,27 +62,30 @@ or by setting an environment variable via `export SPRING_PROFILES_ACTIVE=<profil
2862
2963Please use the ` prod ` profile for production systems with a dedicated data volume (see ` docker-compose.prod.yml ` ).
3064
31- ### npm and Grunt
65+ ### Read more
3266
33- Use appropriate node and npm version via [ nvm ] ( https://github.com/nvm-sh/nvm#nvmrc ) .
67+ Check the documentation for each module .
3468
35- ``` bash
36- nvm use
37- ```
69+ For frontend check [ lvz-viz - Frontend ] ( ./frontend/README.md ) .
70+
71+ For docker check [ lvz-viz - Docker ] ( ./README_docker.md ) .
3872
39- Download client js dependencies with npm and package them with Grunt.
73+ ### Set node version
74+
75+ Use appropriate node and pnpm version via [ nvm] ( https://github.com/nvm-sh/nvm#nvmrc ) .
4076
4177``` bash
42- npm install --no-progress
43- npm run grunt-build
78+ nvm use
4479```
4580
46- ### Gradle
81+ ### Starting development
82+
83+ #### Gradle
4784
4885For local development and testing you need to startup elasticsearch via [ docker-compose] ( https://docs.docker.com/compose/ ) .
4986
5087``` bash
51- docker- compose up -d elasticsearch
88+ docker compose up -d elasticsearch
5289```
5390
5491You can build and test an executable jar with gradle.
@@ -77,42 +114,25 @@ export SPRING_PROFILES_ACTIVE=local
77114./gradlew bootRun
78115```
79116
80- ### Docker
117+ ### Running backend and frontend together
81118
82- You can build and run the app within a Docker container.
119+ For development you can use two separate terminals for starting backend and frontend separately.
120+ For further information, please refer to the README files.
83121
84- Required version for the multi-stage build: Docker 19.03+
122+ You could also use following command in root folder to start development in one single terminal:
123+ Run the following command to install:
85124
86125``` bash
87- -- Build or rebuild services
88- docker-compose build
89- -- Create and start containers
90- docker-compose up -d
91- ```
126+ # install dependencies
127+ pnpm install
92128
93- ``` bash
94- -- Build services and start containers with dev profile
95- docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d --build
96- ```
97-
98- ``` bash
99- -- Build services and start containers with prod profile
100- docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d --build
101- ```
102-
103- ``` bash
104- -- View output from containers
105- docker-compose logs -f
106- ```
107-
108- ``` bash
109- -- Stop and remove containers, networks, images, and volumes
110- docker-compose down
129+ # start both development server
130+ pnpm start
111131```
112132
113133## Maintenance
114134
115135``` bash
116- -- Display dependency updates
136+ # display dependency updates
117137./gradlew dependencyUpdates
118138```
0 commit comments