You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
14.[API specification and generated code](#api-specification-and-generated-code)
19
-
15.[Configuration](#configuration)
20
-
16.[Rest API & Relationships](#rest-api--relationships)
21
-
17.[Error codes in the Client](#error-codes-in-the-client)
22
-
18.[Preview mode in the Client](#preview-mode-in-the-client)
23
-
19.[Feeds](#feeds)
24
-
20.[Custom Templates](#custom-templates)
25
-
21.[Static Analysis](#static-analysis)
26
-
22.[Upgrade Guide](#upgrade-guide)
27
-
23.[Tenants](#tenants)
28
-
24.[Screen layouts](#screen-layouts)
29
-
25.[Templates](#templates)
9
+
5.[Technologies](#technologies)
10
+
6.[Taskfile](#taskfile)
11
+
7.[Prerequisites](#prerequisites)
12
+
8.[Development setup](#development-setup)
13
+
9.[Production setup](#production-setup)
14
+
10.[Container images](#container-images)
15
+
11.[Coding standards](#coding-standards)
16
+
12.[Stateless](#stateless)
17
+
13.[Authentication](#authentication)
18
+
14.[Tenants](#tenants)
19
+
15.[OIDC providers](#oidc-providers)
20
+
16.[JWT Auth](#jwt-auth)
21
+
17.[Test](#test)
22
+
18.[API specification and generated code](#api-specification-and-generated-code)
23
+
19.[Configuration](#configuration)
24
+
20.[Rest API & Relationships](#rest-api--relationships)
25
+
21.[Online check for Client](#online-check-for-client)
26
+
22.[Error codes in the Client](#error-codes-in-the-client)
27
+
23.[Preview mode in the Client](#preview-mode-in-the-client)
28
+
24.[Screen status](#screen-status)
29
+
25.[Feeds](#feeds)
30
+
26.[Themes](#themes)
31
+
27.[Templates](#templates)
32
+
28.[Custom Templates](#custom-templates)
33
+
29.[Screen Layouts](#screen-layouts)
34
+
30.[Static analysis](#static-analysis)
35
+
31.[Upgrade Guide](#upgrade-guide)
36
+
32.[License](#license)
37
+
33.[Contributing](#contributing)
30
38
31
39
## Description
32
40
@@ -58,10 +66,12 @@ Further documentation can be found in the
58
66
| Theme | A theme has css, that can override the slide css. | Admin |
59
67
| Template | The template is how the slide looks, and which content is on the slide. Templates are accessible to choose on Slides. | Admin, editor |
60
68
| Playlist | A playlist arranges the order of the slides, and the playlist is scheduled. | Admin, editor |
69
+
| Schedule | A rrule-based schedule attached to a playlist, controlling when the playlist's slides are shown. | Admin, editor |
61
70
| Campaign | A campaign is a playlist, that takes precedence over all other playlists on the screen. If there a multiple campaigns, they are queued. A campaign is either directly attached to a screen, or attached to a group affecting the screens that are members of that group. If a campaign applies to a screen it fills the whole screen, not just a region of the screen. | Admin |
62
71
| Group | A group is a collection of screens. | Admin |
63
72
| Layout | A layout consists of different regions, and each region can have a number of playlists connected. A layout is connected to a screen. | Admin |
64
73
| Screen | A screen is connected to an actual screen, and has a layout with different playlists in. | Admin |
74
+
| Tenant | A content silo. Users, content and resources belong to a tenant; users may be members of several tenants. | Admin |
65
75
66
76
```mermaid
67
77
flowchart LR
@@ -97,10 +107,12 @@ For the versions available, see the
97
107
98
108
## Technologies
99
109
100
-
The API is written in PHP project, built with [Symfony](https://symfony.com/) and
110
+
The API is a PHP project, built with [Symfony](https://symfony.com/) and
101
111
[API Platform](https://api-platform.com/).
102
112
103
113
The Admin and Client are written in javascript and [React](https://react.dev/) and built with [Vite](https://vite.dev/).
114
+
There are three Vite entry points (defined in `vite.config.js`): `admin`, `client` and `template`. Shared code lives
115
+
in `assets/shared/`.
104
116
105
117
## Taskfile
106
118
@@ -116,6 +128,19 @@ For a list of commands, run:
116
128
task --list-all
117
129
```
118
130
131
+
## Prerequisites
132
+
133
+
Local development relies on:
134
+
135
+
-[Docker](https://www.docker.com/) and Docker Compose
136
+
-[Task](https://taskfile.dev/) for running project commands
137
+
- A reverse proxy mapping the local domain to the stack. The default domain is
138
+
`display.local.itkdev.dk` (configurable via `COMPOSE_DOMAIN` in `.env`); itk-dev's
139
+
setup is documented at [itk-dev/devops_itkdev-docker](https://github.com/itk-dev/devops_itkdev-docker).
140
+
141
+
PHP 8.3+ and Node are only required if you build or run scripts directly on the host;
142
+
otherwise the containers provide them.
143
+
119
144
## Development setup
120
145
121
146
Before first installation a JWT Auth keypair should be generated. See [JWT Auth](#jwt-auth).
@@ -145,6 +170,21 @@ The fixtures have an editor user: <editor@example.com> with the password: "apass
145
170
146
171
The fixtures have the image-text template, and two screen layouts: "full screen" and "two boxes".
147
172
173
+
### Frontend dev server
174
+
175
+
The Vite dev server runs automatically inside the `node` container — it is started by `docker compose up` (and
176
+
therefore by `task compose-up` and `task site-install`) via the `command: npm run dev` entry in
177
+
`docker-compose.override.yml`. There is no separate command to run.
178
+
179
+
HMR is served from `node-display.local.itkdev.dk` over WSS on port 443 (host configurable via `COMPOSE_DOMAIN` in
180
+
`.env`; see `vite.config.js`).
181
+
182
+
When entities or API Platform configuration change, regenerate and apply the database schema:
183
+
184
+
```shell
185
+
task db:migrate
186
+
```
187
+
148
188
### Database (MariaDB)
149
189
150
190
Local dev defaults to `mariadb:11.4` (LTS until May 2029). CI also exercises `mariadb:10.11` (LTS until
@@ -163,16 +203,22 @@ MARIADB_IMAGE=mariadb:10.11 MARIADB_VERSION=10.11.13-MariaDB docker compose up -
163
203
164
204
## Production setup
165
205
166
-
A JWT Auth keypair should be generated. See [JWT Auth](#jwt-auth).
167
-
168
-
In `.env.local` set the following values:
206
+
Required runtime configuration (set on the running container — see
207
+
[Changing environment variables for the running images](#changing-environment-variables-for-the-running-images)):
0 commit comments