Skip to content

Commit c2afab1

Browse files
add documentation and architecture image from wiki
1 parent 573924f commit c2afab1

File tree

3 files changed

+264
-2
lines changed

3 files changed

+264
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: eurofurence-registration-system
3-
version: 0.0.33
3+
version: 0.0.34
44
description: A helm chart that can deploy the Eurofurence Registration System.
55
type: application
66
home: https://github.com/eurofurence/reg-helm-chart

charts/eurofurence-registration-system/README.md

Lines changed: 263 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@ which is also Open Source software (Apache 2.0).
2828

2929
## Configuration
3030

31-
TODO add documentation here.
31+
See [values.yaml](values.yaml) for pre-configured defaults.
32+
33+
See [values-example.yaml](values-example.yaml) for a starting point of what you would put in your `values.yaml`
34+
when using this helm chart.
35+
36+
All fields of the configuration have descriptions in the [JSON schema](values.schema.json), so you can
37+
use a smart editor to get help with the configuration.
3238

3339
## Manual secret configuration
3440

@@ -59,3 +65,259 @@ data:
5965
```
6066

6167
The values can be base64 encoded using `echo -n 'some secret value' | base64`.
68+
69+
## Documentation
70+
71+
### Architecture Overview
72+
73+
![architecture diagram](reg-architecture-2025-03-01.png)
74+
75+
### Business Architecture
76+
77+
#### Identity Provider
78+
79+
Provided by our IT department as a service to registration, this OpenID Connect compliant OAuth2 provider is
80+
the single source of truth for authentication ("who am I") as far as registration is concerned. It
81+
provides standard JWT tokens that are verified by every registration software component, and handles account
82+
creation, login/logout, password forgotten, email verification.
83+
84+
While some additional information related to authorization are collected and provided as part of the token,
85+
such as "is staff" or "is a director", registration handles authorization internally.
86+
87+
#### Processes supported by manual exports
88+
89+
* Badge printing uses excel exports and a standalone software solution called Bartender that handles the graphical design
90+
* various other departments use csv / excel exports
91+
92+
#### onsite frontends
93+
94+
The **registration desk** allows onsite reg helpers to log in and out, search for attendees by badge number, nickname or
95+
name, and to process their check in, provided there are no outstanding dues. It is a static Nuxt web application
96+
optimized for ease of use when working through the registration queue with many agents in parallel. It is mostly used on
97+
mobile devices or laptops.
98+
99+
Login is provided by the IDP, all other backend functions are provided by the attendee service.
100+
101+
The **sponsor desk** allows onsite shop helpers to log in and out, search for sponsors and supersponsors by badge
102+
number, nickname or name, and to mark that they have received their sponsor gifts. It is a static web application
103+
optimized for ease of use when working through the sponsors queue with multiple agents in parallel. It is mostly used on
104+
mobile devices or laptops.
105+
106+
Login is provided by the IDP, all other backend functions are provided by the attendee service.
107+
108+
#### regsys classic
109+
110+
Regsys classic is now just the Admin UI. Based on the original version of the registration system before the move
111+
to the new service architecture, it no longer has a database, just acts as a UI for all staff / admin functions,
112+
accessing the backend services. Authentication is done using the IDP. As described
113+
in the other sections, all external interfaces and exports are to be relegated to the services backend.
114+
115+
If all functionality is ever migrated into the new world, this component can be removed. It is however likely that this
116+
will take a long time, if it ever happens. For admins / staff, visual beauty is not so much a concern, and we can even
117+
live with some usability limitations. Also, it is not a concern that the regsys classic is single-language (English and
118+
German supported via global feature toggle). Besides, the large amount of extra fields and functionality may well be
119+
unsuitable for a mobile-first designed UI.
120+
121+
Until the export service will be added, regsys classic also provides a compatibility layer for some existing bespoke
122+
interfaces.
123+
124+
#### auth service
125+
126+
Not all users of the registration system will have an OIDC identity provider at their disposal, especially during local
127+
development.
128+
129+
If an OIDC Provider is available, this service provides a backend component running under the domain of the registration
130+
system that is involved in oidc compliant login/logout flows and back-channel logout notifications. It holds the client
131+
id and client secrets and can set cookies for the registration system domain(s).
132+
133+
Admin functionality in regsys classic will query this service for the detailed admin permissions, when this is done it
134+
will query the IDP id endpoint to ensure a current session is available and the staff role has not been revoked in the
135+
meantime.
136+
137+
#### attendee processes
138+
139+
This front-to-back column provides everything related to attendee management:
140+
141+
* creating and editing registrations
142+
* adding and removing packages incl. calculating total due amount (but not current dues)
143+
* searching and listing registrations
144+
* registration status progression (received - unconfirmed - new - accepted/approved - partially paid - paid - arrived -
145+
checked in - waiting - cancelled - deleted)
146+
* ban detection
147+
* transferring registrations when re-sold
148+
149+
Initially the frontend will concentrate on **end user functionality**, while all staff functionality is provided by
150+
regsys classic acting as a legacy frontend to the backend services. This means that the available interface nicely
151+
reduces to operations on a single registration.
152+
153+
* initial reg
154+
* self-service viewing and editing registration data
155+
* self-service changing packages
156+
* (potentially self-service) transferring registration
157+
* (potentially self-service) cancelling a registration
158+
159+
[reg-attendee-service OpenApi v3 Spec](https://github.com/eurofurence/reg-attendee-service/blob/main/api/openapi-spec/openapi.yaml)
160+
161+
#### payment processes
162+
163+
This front-to-back column provides everything related to payments and accounting.
164+
165+
* Calculate current dues
166+
* Register receivables and payments
167+
* Payment status management (pre-pending - pending - valid - deleted)
168+
* Payment processor(s) backend / state handling
169+
* Money transfer info
170+
* Accounting reports
171+
* Note that status transitions are handled by the attendee service to keep this functionality in a single place
172+
173+
Initially the frontend will concentrate on **end user functionality**, while all staff functionality is provided by
174+
regsys classic acting as a legacy frontend to the backend services. This means that the available interface nicely
175+
reduces to operations on a single registration.
176+
177+
* view my payment history
178+
* view my dues history
179+
* perform payment using a credit card / girovend processor for the current due amount
180+
* obtain money transfer information (e.g. for MMC)
181+
182+
#### venue booking
183+
184+
(under development)
185+
186+
The registration system aims to support 4 modes of operation where hotel/room booking is concerned:
187+
188+
* Self booking: Attendees book a room directly but receive some assistance from our system,
189+
e.g. a secret code word and/or help with formulating an e-mail.
190+
* Reseller model: The convention acts as a reseller for hotel rooms.
191+
* Youth Hostel model (currently used by MMC): Registration includes a bed in the hostel, the system limits the
192+
amount of registrations that can be accepted to the number of available beds, although there can be packages for
193+
non-residential attendance. There is self-service functionality in the registration system for forming room groups,
194+
inviting other attendees into a group, kicking someone from a group, handing over group leadership. For admins there
195+
is functionality to create and manage rooms and assign attendees to them. This assignment is a manual process in the
196+
registration system, done by an admin.
197+
* No Hotel model: There is an optional information page, and even that can be turned off. Intended for day events
198+
or small events.
199+
200+
While the backend service will support all this functionality, the frontend can currently focus on
201+
the Youth Hostel model only, since EF needs no hotel booking and MMC uses this model.
202+
203+
#### mailings
204+
205+
The registration system sends some standardized mails, rendered from templates:
206+
207+
* confirm your email address (likely to move to the IDP)
208+
* confirm your changed email address (likely to move to the IDP)
209+
* your login information (likely to move to the IDP)
210+
* password reset email (likely to move to the IDP)
211+
* an admin has force reset your password (likely to move to the IDP)
212+
* please pay
213+
* please pay - partially paid version
214+
* please pay - overdue version with cancel warning
215+
* thank you for paying
216+
* you have been cancelled
217+
* you have been granted guest status
218+
* you have been placed on the waiting list
219+
* ... some mails related to room groups
220+
221+
All these mails are currently available in 2 languages, so the backend service supports supplying templates in
222+
multiple languages.
223+
224+
Staff with the proper rights may also save their own templates and send announcements to a filtered selection of
225+
attendees. Again, the backend service supports supplying templates in multiple languages, so we can stop doing
226+
the "DEUTSCHE ÜBERSETZUNG s.u." / "See below for English" nonsense.
227+
228+
All emails, custom or standard, can include/use the following values:
229+
230+
* badge number
231+
* nickname
232+
* total dues
233+
* remaining dues
234+
* due date
235+
* confirm link (likely to no longer be needed)
236+
* initial password (likely to no longer be needed)
237+
* new email address to confirm (likely to no longer be needed)
238+
* sender email
239+
* target email
240+
* reply-to email
241+
242+
Attendee data is provided by the attendee service, which calls the mailing service, providing the
243+
template fields in a standard data structure.
244+
245+
It would also be good to include email logging and possibly bounce mail handling, so EF doesn't get put on black lists
246+
anymore.
247+
248+
Another area of active development is support for more modern templates and attachments.
249+
250+
For now, all mailing functionality uses regsys classic as its frontend, except for mails triggered by status
251+
transitions from the attendee service directly.
252+
253+
### Software Architecture
254+
255+
Our code is MIT licensed Open Source software hosted on our GitHub account, using a modern architecture clearly
256+
separated into multiple areas of front-to-back responsibilities, each supported by a small number of services in the
257+
backend.
258+
259+
#### Backend Services
260+
261+
Our backend services are written in [golang](https://golang.org/) using the [chi](https://github.com/go-chi/chi)
262+
web framework.
263+
264+
Our backend services shall
265+
266+
* **document** their API and local setup
267+
* expose openapi docs through an endpoint, but do not serve swagger ui to keep things lightweight
268+
* have a readme that gives clear instructions on every step needed to set up the local development environment
269+
(must work on Windows, Mac, Linux)
270+
* have roughly **similar code structure**
271+
* be designed for **running standalone** and **in Kubernetes**
272+
* SSL termination is out of scope for our services, local communication is http
273+
* read //configuration from yaml files// in the file system (each service includes a config template)
274+
* log to stdout using a //simple human readable log format// (but future proof: Elastic Common Schema json logging
275+
option)
276+
* request logging for every incoming request with at least a single line, the path, the response status,
277+
duration in ms
278+
* request logging for every outgoing request with path (no params/anchors! security!), duration in ms, response
279+
status
280+
* support //distributed tracing//, with request ids being 8 digit hex [a-f0-9], but it's enough to just log these
281+
* returned with every response in header X-Request-Id (was: X-B3-TraceId, but we no longer need
282+
Zipkin compatibility)
283+
* passed on with every request in header X-Request-Id
284+
* logged in every line that relates to the request across backend services
285+
* offer a health endpoint that is publicly available but does not expose any internal information
286+
* all calls that can block should be wrapped with circuit breakers
287+
* all incoming calls have a timeout
288+
* easily **work on developer machines** that may not have a database and may be Windows/Mac/Linux
289+
* use go modules for dependency management
290+
* persist using our mysql database accessed using [gorm](https://github.com/jinzhu/gorm)
291+
* always offer an alternative in-memory db for ease of local testing, switched to using a configuration
292+
parameter
293+
* historize every change to relevant fields
294+
* have sufficient **test coverage** to be safe to deploy
295+
* unit tests for any significant logic
296+
* BDD-style acceptance tests for all available requests, but we do not need a report, it's totally sufficient if the
297+
tests just log the given/when/then phrases and are readable in the code
298+
* security acceptance tests for no token, valid token, invalid token, expired token, revoked token, and role(s) as
299+
applicable (details see below)
300+
* consumer driven contract tests for any downstream calls using [pact-go](https://github.com/pact-foundation/pact-go)
301+
Note: now discontinued because pact-go now requires a C compiler since they rewrote in Rust. That hampers Windows
302+
development too much.
303+
* end to end tests using the frontends
304+
Note: not currently available
305+
* be **secure**
306+
* authentication is handled using [JWTs](https://jwt.io) coming from our idp, which are checked using a middleware
307+
with fixed asymmetric signature algorithm
308+
* authorization for unprivileged requests is sometimes cached locally
309+
* internal requests between our services may be authenticated using a shared-secret string instead
310+
* all requests that can expose personal information shall be covered by security acceptance tests that ward against undue access or data exposure
311+
312+
#### Static Frontends
313+
314+
Our end user frontends shall
315+
316+
* be internationalised
317+
* be multilingual (we'll start with English and German)
318+
* be designed to be statically hosted on our servers (and on Kubernetes) with no cross-site dependencies
319+
* support current browsers on both mobile devices and regular computers (we don't care about Internet Explorer, but
320+
Chrome, Firefox, Edge, Safari, Android and iOS are a must)
321+
* have sufficient test coverage (both unit tests and end to end tests)
322+
323+
Note that some of this only applies to end user frontends!
47.3 KB
Loading

0 commit comments

Comments
 (0)