Skip to content

Commit a90d777

Browse files
committed
docs(): update readme files
1 parent 68431da commit a90d777

File tree

4 files changed

+149
-108
lines changed

4 files changed

+149
-108
lines changed

README.md

Lines changed: 40 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
# lvz-viz
1+
# LVZ Polizeiticker
22

3-
[![Build Status](https://travis-ci.org/sepe81/lvz-viz.svg?branch=master)](https://travis-ci.org/sepe81/lvz-viz)
43
![GitHub license](https://img.shields.io/github/license/CodeforLeipzig/lvz-viz.svg)
5-
[![Code Climate](https://codeclimate.com/github/CodeforLeipzig/lvz-viz/badges/gpa.svg)](https://codeclimate.com/github/CodeforLeipzig/lvz-viz)
6-
74
[![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)
5+
[![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)
6+
[![Build Fullstack App](https://github.com/CodeforLeipzig/lvz-viz/actions/workflows/build.yml/badge.svg)](https://github.com/CodeforLeipzig/lvz-viz/actions/workflows/build.yml)
87

98
## Intro
109

@@ -13,104 +12,78 @@ Visualization of [LVZ police ticker](https://www.lvz.de/Leipzig/Polizeiticker/Po
1312
The official website is hosted at <https://lvz-viz.leipzig.codefor.de>
1413
by [OK Lab Leipzig](http://codefor.de/projekte/2014-07-01-le-lvz_polizeiticker_visualisierung.html).
1514

16-
## Usage
17-
18-
Build and run the app with [npm](https://www.npmjs.com), [Grunt](http://gruntjs.com/) and [Gradle](https://gradle.org).
19-
20-
The crawling and indexing of new articles is activated by default.
21-
It can be delayed by setting the startup parameter `--app.initialDelay=<time in ms>` to a high value (e.g. `1800000` for 30 minutes)
22-
or by setting an environment variable via `export APP_INITIALDELAY=<time in ms>`.
15+
## Prerequisites
2316

24-
Profiles (`dev|local|prod|test`) can be set by the startup parameter `--spring.profiles.active=<profile>`
25-
or by setting an environment variable via `export SPRING_PROFILES_ACTIVE=<profile>`.
17+
### Node, npm or pnpm
2618

27-
Please use the `prod` profile for production systems with a dedicated data volume (see `docker-compose.prod.yml`).
19+
* `node 22.14.0` or higher in combination with
20+
* `npm 10.9.2` or higher or
21+
* `pnpm 10.4.1` or higher, used in this repository
2822

29-
### npm and Grunt
23+
It's recommended to use [nvm (Node version Manager)](https://github.com/nvm-sh/nvm).
3024

31-
Use appropriate node and npm version via [nvm](https://github.com/nvm-sh/nvm#nvmrc).
25+
Install pnpm by running:
3226

3327
```bash
34-
nvm use
28+
npm install -g [email protected]
3529
```
3630

37-
Download client js dependencies with npm and package them with Grunt.
31+
This repo uses `pnpm` as package manager.
32+
You can also use `npm` for your local work but changes will be made by `pnpm` only.
3833

39-
```bash
40-
npm install --no-progress
41-
npm run grunt-build
42-
```
34+
### Angular CLI
4335

44-
### Gradle
36+
* `@angular/cli 19.2.8` or higher
4537

46-
For local development and testing you need to startup elasticsearch via [docker-compose](https://docs.docker.com/compose/).
38+
Install @angular/cli by running:
4739

4840
```bash
49-
docker-compose up -d elasticsearch
41+
pnpm install -g @angular/cli@19
5042
```
5143

52-
You can build and test an executable jar with gradle.
44+
### Java
5345

54-
```bash
55-
./gradlew build
56-
```
46+
* `jdk 17` or higher
5747

58-
You can run a specific test with gradle.
48+
### Docker (when running services within docker)
5949

60-
```bash
61-
./gradlew test --tests *CrawlSchedulerTest
62-
```
50+
* `docker 28.0.2` or higher
51+
* `docker compose v2.34.0` or higher
6352

64-
You can build an executable jar with gradle and run it as a separate process.
53+
## Getting started
6554

6655
```bash
67-
./gradlew assemble
68-
java -jar build/libs/lvz-viz-*.jar --spring.profiles.active=local
56+
# clone project
57+
git clone https://github.com/CodeforLeipzig/lvz-viz
58+
cd lvz-viz
6959
```
7060

71-
Or you can simply run the project within gradle during development.
61+
### Read more
7262

73-
```bash
74-
export SPRING_PROFILES_ACTIVE=local
75-
./gradlew bootRun
76-
```
63+
Check the documentation for each module/component.
7764

78-
### Docker
65+
For frontend check [lvz-viz - frontend](./frontend/README.md).
7966

80-
You can build and run the app within a Docker container.
67+
For backend check [lvz-viz - backend](./backend/README.md).
8168

82-
Required version for the multi-stage build: Docker 19.03+
69+
For docker check [lvz-viz - docker](./README_docker.md).
8370

84-
```bash
85-
-- Build or rebuild services
86-
docker-compose build
87-
-- Create and start containers
88-
docker-compose up -d
89-
```
71+
### Install Tools
9072

91-
```bash
92-
-- Build services and start containers with dev profile
93-
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d --build
94-
```
73+
Some tools are both used by backend and frontend.
74+
Run the following command to install:
9575

9676
```bash
97-
-- Build services and start containers with prod profile
98-
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d --build
77+
pnpm install
9978
```
10079

101-
```bash
102-
-- View output from containers
103-
docker-compose logs -f
104-
```
80+
### Starting the application
10581

106-
```bash
107-
-- Stop and remove containers, networks, images, and volumes
108-
docker-compose down
109-
```
82+
For development, you can use two separate terminals to start the backend and frontend separately.
83+
You can find more information in the README files in the separate folders.
11084

111-
## Maintenance
85+
You can also use the following command in the root directory to start in a single terminal:
11286

11387
```bash
114-
-- Display dependency updates
115-
./gradlew dependencyUpdates
88+
pnpm start
11689
```

README_docker.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# LVZ Polizeiticker - docker
2+
3+
## Getting started
4+
5+
You can build and run the app within a Docker container.
6+
7+
Required version for the multi-stage build: Docker 19.03+
8+
9+
```bash
10+
-- Build or rebuild services
11+
dockercompose build
12+
-- Create and start containers
13+
docker compose up -d
14+
```
15+
16+
```bash
17+
-- Build services and start containers with dev profile
18+
docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d --build
19+
```
20+
21+
```bash
22+
-- Build services and start containers with prod profile
23+
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d --build
24+
```
25+
26+
```bash
27+
-- View output from containers
28+
docker compose logs -f
29+
```
30+
31+
```bash
32+
-- Stop and remove containers, networks, images, and volumes
33+
docker compose down
34+
```

backend/README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# LVZ Polizeiticker - backend
2+
3+
## Getting started
4+
5+
```bash
6+
# all commands used in ./backend
7+
cd backend
8+
```
9+
10+
## Usage
11+
12+
### General
13+
14+
The crawling and indexing of new articles is activated by default.
15+
It can be delayed by setting the startup parameter `--app.initialDelay=<time in ms>` to a high value (e.g. `1800000` for 30 minutes)
16+
or by setting an environment variable via `export APP_INITIALDELAY=<time in ms>`.
17+
18+
Profiles (`dev|local|prod|test`) can be set by the startup parameter `--spring.profiles.active=<profile>`
19+
or by setting an environment variable via `export SPRING_PROFILES_ACTIVE=<profile>`.
20+
21+
Please use the `prod` profile for production systems with a dedicated data volume (see `docker-compose.prod.yml`).
22+
23+
### Run in development mode
24+
25+
For local development and testing you need to startup elasticsearch via [docker-compose](https://docs.docker.com/compose/).
26+
27+
```bash
28+
docker-compose up -d elasticsearch
29+
```
30+
31+
You can build and test an executable jar with gradle.
32+
33+
```bash
34+
./gradlew build
35+
```
36+
37+
You can run a specific test with gradle.
38+
39+
```bash
40+
./gradlew test --tests *CrawlSchedulerTest
41+
```
42+
43+
You can build an executable jar with gradle and run it as a separate process.
44+
45+
```bash
46+
./gradlew assemble
47+
java -jar build/libs/lvz-viz-*.jar --spring.profiles.active=local
48+
```
49+
50+
Or you can simply run the project within gradle during development.
51+
52+
```bash
53+
export SPRING_PROFILES_ACTIVE=local
54+
./gradlew bootRun
55+
```
56+
57+
## Maintenance
58+
59+
```bash
60+
-- Display dependency updates
61+
./gradlew dependencyUpdates
62+
```

frontend/README.md

Lines changed: 13 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,22 @@
1-
# LVZ Polizeiticker
2-
3-
[![MIT license](https://img.shields.io/badge/license-MIT-blue.svg)](../LICENSE)
4-
5-
Visualization of LVZ police ticker.
6-
7-
## Prerequisites
8-
9-
### Angular CLI
10-
11-
* `@angular/cli 19.2.8` or higher
12-
13-
### Node, npm or pnpm
14-
15-
* `node 22.14.0` or higher in combination with
16-
* `npm 10.9.2` or higher or
17-
* `pnpm 10.7.0` or higher, used in this repository
1+
# LVZ Polizeiticker - frontend
182

193
## Getting started
204

215
```bash
22-
# clone project
23-
git clone
24-
cd lvz-viz
6+
# all commands used in ./frontend
7+
cd frontend
258

269
# install tools and frontend dependencies
2710
pnpm install
2811
```
2912

30-
Create environment files for `development mode` and `production mode`.
13+
Create environment file for `development mode`.
3114

3215
```bash
3316
cp src/environments/environment.ts src/environments/environment.dev.ts
34-
cp src/environments/environment.ts src/environments/environment.prod.ts
3517
```
3618

37-
**Note**: These files will not be under version control but listed in .gitignore.
19+
**Note**: These file will not be under version control but listed in .gitignore.
3820

3921
## Usage
4022

@@ -45,28 +27,19 @@ For the other options your app should run on a server which you like.
4527

4628
### Run in development mode
4729

48-
If you want to work with mock data, start the mock server in a separate terminal, reachable on [http://localhost:3000/](http://localhost:3000/).
49-
50-
Comment out the providers in `SearchComponent` and `StatisticComponent` to use the mock services.
51-
Update your `environment.dev.ts` file `api` to `http://localhost:3000/`.
52-
53-
```bash
54-
pnpm run mock
55-
```
56-
5730
```bash
5831
# build, reachable on http://localhost/app/path/to/dist/
59-
pnpm run build:dev
32+
pnpm build:dev
6033

6134
# build and starts a server, rebuild after changes, reachable on http://localhost:4200/
62-
pnpm run start
35+
pnpm start
6336
```
6437

6538
### Package
6639

6740
```bash
6841
# build in production mode, compressed
69-
pnpm run build:prod
42+
pnpm build:prod
7043
```
7144

7245
### Tests
@@ -97,14 +70,13 @@ Change for `production mode` the option `production` to `true`.
9770
### `api`
9871

9972
Defines the URL to the backend.
100-
If you want to work with mock data, use [http://localhost:3000/](http://localhost:3000/).
10173

10274
* default: `./api/`
10375
* type: `string`
10476

10577
### `appname`
10678

107-
Application-wide title of the app, displayed in title and toolbar.
79+
Applicationwide title of the app, displayed in title and toolbar.
10880

10981
* default: `LVZ Polizeiticker`
11082
* type: `string`
@@ -119,10 +91,10 @@ Defines whether the app is in production or not.
11991

12092
### `theme`
12193

122-
Name of a build-in theme from angular-material or a custom light or dark theme.
94+
Name of a pre-build-theme or a custom theme.
12395

124-
* default: `indigo-pink`
96+
* default: `rose-red`
12597
* type: `string`
126-
* values: `deeppurple-amber`/`indigo-pink`/`pink-bluegrey`/`purple-green`/`custom-light`/`custom-dark`
98+
* values: `rose-red`/`azure-blue`/`magenta-violet`/`cyan-orange`/`custom`
12799

128-
To create a custom light or dark theme just edit the colors and themes in `themes.scss`.
100+
To modify the custom theme just edit the colors and themes in `themes.scss`.

0 commit comments

Comments
 (0)