Developing an Extranet as TYPO3 Page App

Kabarakh1 139 views 43 slides Jul 30, 2024
Slide 1
Slide 1 of 119
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68
Slide 69
69
Slide 70
70
Slide 71
71
Slide 72
72
Slide 73
73
Slide 74
74
Slide 75
75
Slide 76
76
Slide 77
77
Slide 78
78
Slide 79
79
Slide 80
80
Slide 81
81
Slide 82
82
Slide 83
83
Slide 84
84
Slide 85
85
Slide 86
86
Slide 87
87
Slide 88
88
Slide 89
89
Slide 90
90
Slide 91
91
Slide 92
92
Slide 93
93
Slide 94
94
Slide 95
95
Slide 96
96
Slide 97
97
Slide 98
98
Slide 99
99
Slide 100
100
Slide 101
101
Slide 102
102
Slide 103
103
Slide 104
104
Slide 105
105
Slide 106
106
Slide 107
107
Slide 108
108
Slide 109
109
Slide 110
110
Slide 111
111
Slide 112
112
Slide 113
113
Slide 114
114
Slide 115
115
Slide 116
116
Slide 117
117
Slide 118
118
Slide 119
119

About This Presentation

From V0 to V2: This Talk is about a real customer project- an extranet! We will talk about our technical thoughts on how to work with React and TYPO3 for a SinglePageApp and Authorization management. Our use of standard TYPO3 Elements will be explained. We will also add in some project management th...


Slide Content

Managing and Developing an Extranet
as a TPA - A TYPO3 Page App
by Herbie Keuerleber
and Rebecca Düker

Herbie Keuerleber Rebecca Düker
DEVELOPER FE PRODUCT OWNER

Agenda

Agenda
Project overview

Agenda
RoutingProject overview

AgendaRouting
React, Components and DTOsProject overview

AgendaRouting React, Components and DTOs Project overview
Requirements management

AgendaRouting React, Components and DTOs Project overview Requirements management
Communication and transparency

AgendaRouting React, Components and DTOs Project overview Requirements management Communication and transparency
Access

AgendaRouting React, Components and DTOs Project overview Requirements management Communication and transparency Access
CLI and scheduler

AgendaRouting React, Components and DTOs Project overview Requirements management Communication and transparency Access CLI and scheduler
Interfaces to other systems

AgendaRouting React, Components and DTOs Project overview Requirements management Communication and transparency Access CLI and scheduler Interfaces to other systems
Tests

Project
Overview

Fegime - our Project Partner
•Market community of middle class
electrical wholesalers with 45
shareholders
•Headquarter in Nurembourg
•Shareholders employ 3.500 people in 160
locations
•Revenue in 2023 was 2,4 billion €
•Goal: create value
5

The Project: Extranet
•We got:
•15 years of a grown Extranet
•Overgrown functionalities
•Oldfashioned UI build for tube monitors
•User Opinion:
•Hard to use
•Confusing and not clearly arranged
•Only use it when there is no other chance
•Don’t use it
6

The Project: Extranet
•We want:
•Central information management
•Efficient communication
•Clear communication of core values
•Structured document management
•Reduced work expense
•Scaling
•Easier processes
•New, modern look
7

Face the Challenges
8
Lead to
15 years of growth
and a lot of functionalities
Bad arrangement and
no overview

Goal Extranet 2.0
Save time in using
and onboarding
New possibilities
for data usage
Modern „look and feel“
& User Experience
Efficient usage
of the network
Participation in
continuous optimization
Quick adjustment
of the software

Goal Extranet 2.0
Save time in using
and onboarding
New possibilities
for data usage
Modern „look and feel“
& User Experience
Efficient usage
of the network
Participation in
continuous optimization
Quick adjustment
of the software

Goal Extranet 2.0
Save time in using
and onboarding
New possibilities
for data usage
Modern „look and feel“
& User Experience
Efficient usage
of the network
Participation in
continuous optimization
Quick adjustment
of the software

Goal Extranet 2.0
Save time in using
and onboarding
New possibilities
for data usage
Modern „look and feel“
& User Experience
Efficient usage
of the network
Participation in
continuous optimization
Quick adjustment
of the software

Goal Extranet 2.0
Save time in using
and onboarding
New possibilities
for data usage
Modern „look and feel“
& User Experience
Efficient usage
of the network
Participation in
continuous optimization
Quick adjustment
of the software

Goal Extranet 2.0
Save time in using
and onboarding
New possibilities
for data usage
Modern „look and feel“
& User Experience
Efficient usage
of the network
Participation in
continuous optimization
Quick adjustment
of the software

Goal Extranet 2.0
Save time in using
and onboarding
New possibilities
for data usage
Modern „look and feel“
& User Experience
Efficient usage
of the network
Participation in
continuous optimization
Quick adjustment
of the software

How to start

MVP
Minimum Viable Product
Define the most
important functions
-> Purchase
Testphase for collaborationStart with the first step
Verify the understanding of requirements
Understand complexity
Build a base and get
us on the right route

Routing

Routes?

/admin/user

/admin/user
Sending links to other people
Bookmarks
Login and be redirected

Three types of routes:
Routes

Three types of routes:
Routes
Existing files (e.g. images or downloads)

Three types of routes:
Routes
App routes (e.g. /login)
Existing files (e.g. images or downloads)

Three types of routes:
Routes
API routes (e.g. /api/login/forgot-password)
App routes (e.g. /login)
Existing files (e.g. images or downloads)

Three types of routes:
Routes
API routes (e.g. /api/login/forgot-password)
App routes (e.g. /login)
Existing files (e.g. images or downloads)

16
App Routes
Using React Router
Mapping Route -> React „page“
Security is important - user should only see the routes
they are allowed to

17
App Routes

Three types of routes:
Routes
API routes (e.g. /api/login/forgot-password)
App routes (e.g. /login)
Existing files (e.g. images or downloads)

Three types of routes:
Routes
API routes (e.g. /api/login/forgot-password)
App routes (e.g. /login)
Existing files (e.g. images or downloads)

19
API Routes
TYPO3 Site Config
Using b13/slimphp
Clean HTTP verbs
(GET, POST, DELETE)
JSON Responses 

with HTTP codes

19
API Routes
TYPO3 Site Config
Using b13/slimphp
Clean HTTP verbs
(GET, POST, DELETE)
(No PATCH sadly)
JSON Responses 

with HTTP codes

19
API Routes
TYPO3 Site Config
Using b13/slimphp
Clean HTTP verbs
(GET, POST, DELETE)
(No PATCH sadly)
JSON Responses 

with HTTP codes
Spoiler!

Three types of routes:
Routes
API routes (e.g. /api/login/forgot-password)
App routes (e.g. /login)
Existing files (e.g. images or downloads)

Three types of routes:
Routes
API routes (e.g. /api/login/forgot-password)
App routes (e.g. /login)
Existing files (e.g. images or downloads)

React -
Components
& DTOs

Route to page
+ + =

React pages
<RootPage>
</RootPage>

React pages
<RootPage>
</RootPage>
•Checks for login
•Shows loading indicator
•Displays the page components

defined by menu/TYPO3

React pages
<RootPage>
<MainPage>
</MainPage>
</RootPage>

React pages
<RootPage>
<MainPage>
</MainPage>
</RootPage>
•Loads API data needed for the page
•Handles „global“ changes (delete, edit, new)

with API data

React pages
<RootPage>
<ContentArea />
<Calendar />
<ActivityFeed />
<MainPage>
</MainPage>
</RootPage>

React pages
<RootPage>
<ContentArea />
<Calendar />
<ActivityFeed />
<MainPage>
</MainPage>
</RootPage>
•Displays data
•Reusable components (buttons, lists, 

collapsibles, …)
•Local state (filters, user input)

React pages
<RootPage>
<ContentArea />
<Calendar />
<ActivityFeed />
<MainPage>
</MainPage>
</RootPage>
•Using RecoilJS to sync state

between multiple components or

between page loads (e.g. loading indicator)
•Many modals for confirmations, single 

views or edit/creation forms
•Sometimes they get API data themselves

DTOs
List view data

DTOs(Data transfer objects)
List view data

DTOs(Data transfer objects)
Single view data

DTOs(Some fun tricks)

DTOs(Some fun tricks)
•Always add time to „current day“
timestamps (e.g. noon of current day)
•Send long texts and big objects from BE to
FE, send IDs from FE to BE
•Use as many HTTP/REST standards as
you can (IDs in URL, clean status codes)

Requirements
Management

Plan -> Walk ->Goal

Plan -> Walk ->Goal

Plan -> Walk ->Goal

Plan -> Walk ->Goal

Plan -> Walk ->Goal

Plan -> Walk ->Goal

Plan -> Walk ->Goal

Plan -> Walk ->GoalX

Plan -> Walk ->GoalX X

Plan -> Walk ->GoalX X
Sprint

30
The original plan
does no longer fit
Better understanding of the Complexity
Better understanding of what is really needed
New ideas
New requirements
Increase in creativity
Feedback
Seeing the potential
Building up the vision

Let’s swap the PO!
Intern decision (punkt.de)
Challenge: Knowledge transfer
Attend all meetings
Read everything
(still understand nothing)
Click through the prototype
?
Challenge Accepted !
So called „Fegime information Days“
Show and explain the new extranet with it’s
current functionalities and future steps
to the endusers
!

Open
communication
and
transparency

33
Grants access to
your full potential
Trust as basis
Needs to be earned
Project team:
„We are all sitting in the same boat“
Talk, Talk, Talk
Say NO!
Talk early

Access

Access - TCA + Restrictions
35

Middlewares use the
same restrictions

37
Access - FE user management

37
Access - FE user management
Accesses, will be 

checked by restrictions

37
Access - FE user management
Accesses, will be 

checked by restrictions
Is saved to be displayed,

prefills access

Access - advantages and thoughts
•Flexibility is great!
•Frontend can check for access to routes to enable/disable buttons
•Even if user fakes frontend access, middlewares block data fetching
•Client wants access for everything, e.g.
•Download of specific file types
•Read/write for different functions
•…
•Performance!
38

TYPO3 CLI

(and scheduler)
39

Just import it once

TYPO3 CLI

TYPO3 CLI
•Clear interface for input, output, error handling

TYPO3 CLI
•Clear interface for input, output, error handling
•Existing logging, models and repositories can be easily
used

TYPO3 CLI
•Clear interface for input, output, error handling
•Existing logging, models and repositories can be easily
used
•Scheduler task out of the box

TYPO3 CLI
•Clear interface for input, output, error handling
•Existing logging, models and repositories can be easily
used
•Scheduler task out of the box
•Running CLI directly for tests, scheduler for not longer
one time imports

Interfaces to 

other systems

Getting data is easy

Getting data is easy
Right?

Client’s oracle DB
Confidental files
Extranet

Client’s oracle DB
Confidental files
Extranet
SMB?

Client’s oracle DB
Confidental files
Extranet
ODBC?
SMB?

Client’s oracle DB
Confidental files
Extranet

Client’s oracle DB
Confidental files
Extranet
Middleware

Client’s oracle DB
Confidental files
Extranet
Middleware
SMB
ODBC

Client’s oracle DB
Confidental files
Extranet
Middleware
SMB
ODBC
Preparation

Client’s oracle DB
Confidental files
Extranet
Middleware
SFTP
SMB
ODBC
Preparation

Sending data is easy

?
Sending data is easy
Right

Sending data is easy
Right!

Data fetch API
47

•Client’s IT needs current data from the extranet
Data fetch API
47

•Client’s IT needs current data from the extranet
•Idea: „We can build API routes, no problem“
Data fetch API
47

•Client’s IT needs current data from the extranet
•Idea: „We can build API routes, no problem“
Data fetch API
•We have to mind access and authentication (no „real“ user, going past login)
•Usage of typings and the usual modals and methods
47

•Client’s IT needs current data from the extranet
•Idea: „We can build API routes, no problem“
Data fetch API
•We have to mind access and authentication (no „real“ user, going past login)
•Usage of typings and the usual modals and methods
47
Currently ongoing ;)

Tests and 

quality control

Just a GitLab CI workflow
49

Just a GitLab CI workflow
49

Just a GitLab CI workflow
49

Codeception (with Gherkin syntax)
50
•Tests API calls with Guzzle
•Tests CLI
•Test error codes, JSON results
•Verify results in database after POST
or imports
•Test access on data level
•Tests the app with a browser
•Test displayed error messages
•Test display of data
•Test access in app level
BackendOnly FullStack

Playwright
51
•Monitoring
•Runs nightly on production
•Runs after each deployment on the target system
•Mark tests as failing for specific systems
•Production tests in main but not deployed will fail
•Playwright warns us the moment the test doesn’t fail anymore

52
Auditing of installed packages
On every push and during CI pipelines
only check deployed packages, not dev-tools

Dependency Check
53
Exporting SBOM on deployment, keeping track of currently used versions

Performance „monitoring“
•NGINX logs contain the page generation time
•Idea: monitor those, compare those to older deployments
54

One second please, I
got a question!

punkt.de GmbH
Sophienstraße 187
76185 Karlsruhe
punkt.de GmbH
Kurfürstenstraße 18
60486 Frankfurt am Main
Telefon +49 (0)721 9109-0
Telefax +49 (0)721 9109-100
Mail [email protected]
Daniel Lienert

Fabian Stein
FRANKFURT AM MAINKARLSRUHEKONTAKT GESCHÄFTSFÜHRER:
Thank you all!

punkt.de GmbH
Sophienstraße 187
76185 Karlsruhe
punkt.de GmbH
Kurfürstenstraße 18
60486 Frankfurt am Main
Telefon +49 (0)721 9109-0
Telefax +49 (0)721 9109-100
Mail [email protected]
Daniel Lienert

Fabian Stein
FRANKFURT AM MAINKARLSRUHEKONTAKT GESCHÄFTSFÜHRER: