Zenith’s notebook
EN
0%

Chapter 3 · Code and security

Integrated portals, direct bookings and PWAs

Go down

Chapter 3 · Code and security

Integrated portals, direct bookings and PWAs

A single portal, the data in your own hands and an app that installs from the browser without going through the app stores. How it works, what it promises and what it does not.

20 minutes of reading 5 drawn plates 4 challenges

In this chapter
  1. A single portal
  2. Direct bookings
  3. Security
  4. What PWAs are
  5. iPhone and Android
  6. The QR in the window
  7. Your ecosystem
  8. Frequently asked questions
  9. Sources

01One portal, one place for the data

Look at how a small business that sees customers by appointment works today: a paper diary or one on the phone, a spreadsheet with the contacts, requests arriving on WhatsApp, by email, by phone and from one or two booking platforms, each with its own panel. Every channel holds a piece of the truth; none of them holds all of it.

A scene you may recognize: it is Saturday morning, a customer walks in smiling for her ten o’clock appointment. Too bad that at ten there is already someone else, booked by a colleague over the phone while the first had written on WhatsApp. Nobody really made a mistake: the two diaries simply did not talk to each other.

The result is familiar: the same slot given to two people, the regular customer who is not recognized, the phone number that exists only on the mobile of whoever answered, the afternoon spent copying data from one place to another. And above all: nobody really knows how many customers the business has, how many come back, where they come from.

An integrated portal turns the pattern around. There is a single archive, on your server, from which the website, the bookings, the customers’ private area, the automatic emails and the links to the management system all start. Every channel writes to the same place, every staff member sees the same situation at the same moment.

BEFORE: SCATTERED DATA diary Excel sheet WhatsApp email phone platforms each holds a piece of the truth, none holds all of it AFTER: A SINGLE PORTAL Portal one archive website bookings client area back office everyone reads and writes in the same place BEFORE: SCATTERED DATA diary Excel sheet WhatsApp email phone platforms nobody holds the whole truth AFTER: A SINGLE PORTAL Portal one archive website bookings client area back office everyone writes in the same place
Plate 3.1 — From fragments to the center. With scattered data each channel knows a piece of the business; with a single portal there is one truth, updated at the same instant for everyone.

What changes, in practice

  • One record per customer: history of visits, preferences, consents, documents, all in the same place.
  • Real availability: if the staff blocks a slot in the management system, the website stops offering it, at the same moment.
  • Less repeated work: confirmations, reminders and receipts go out on their own, because the system knows what happened.
  • Real numbers: how many new customers, how many come back, which services pay best, which channel they come from.

For all this to hold up you need a suitable foundation: a portal with logins, bookings and scheduled jobs needs a server with reserved resources, as I explain in the chapter on professional web infrastructure.

02Direct bookings: no commissions, your own data

The big booking platforms have one real merit: they bring visibility. But the service has a price, and not only in money. Every booking that goes through an intermediary carries three costs.

1. The commission on every customer, even those who were already yours

The intermediary keeps a percentage of every booking, according to the contract you signed. You pay it on the new customer, and that is fine; but you also pay it on the regular customer who already knew you and simply used the app they had on their phone. With a booking system on your own site, a returning customer costs no commission.

2. The relationship with the customer stays with the intermediary

Whoever books on a platform is first and foremost a customer of the platform. The rules on what data you receive, how you can contact them and what you can offer them are decided by whoever runs the service. With direct bookings, the customer leaves their data with you, with their consent, and you can write to them again: for the next season, for something new, to say thank you.

3. Availability you keep chasing

More booking channels mean more calendars to keep aligned. If the alignment is not immediate, the risk of a double booking appears: two people, the same place, the same time. Your own portal is the only true calendar: any external platforms sync with it, not the other way around.

WITH THE INTERMEDIARY Customer Platform keeps the commission Your business data and contacts under its rules DIRECT BOOKING Customer on your website or your PWA Your business no commission customer stays yours WITH THE INTERMEDIARY Customer Platform keeps the commission Your business DIRECT BOOKING Customer site or PWA Your business no commission, the customer stays yours
Plate 3.2 — Two roads to the same booking. In the first there is someone in the middle who keeps a share and dictates the rules on data; in the second the customer comes to you, and stays.

This is not about abandoning the platforms overnight: for many businesses they remain a useful channel for getting known. It is about turning every customer who arrived from outside into a direct customer for the next time, with a system of your own ready to welcome them.

03Security of the portal and the management systems

A portal that collects names, phone numbers, emails, dates of birth, sometimes documents and preferences, holds personal data. The European General Data Protection Regulation (GDPR), in Article 32, requires those who process it to take technical and organizational measures appropriate to the risk, expressly mentioning encryption, the ability to ensure confidentiality and availability and to restore the data after an incident. This is not bureaucracy: it is the description of well-made software.

The data of customers 1 2 3 4 1 · THE ROAD HTTPS: the connection is encrypted 2 · THE DOOR logins, passwords, two factors 3 · THE CODE parameterized queries, checks 4 · THE ARCHIVE encryption, least privilege, backup The data of customers 1 2 3 4 1 · THE ROAD HTTPS: the connection is encrypted 2 · THE DOOR logins, passwords, two factors 3 · THE CODE parameterized queries, checks 4 · THE ARCHIVE encryption, permissions, backup
Plate 3.3 — Defense in layers. No single measure is enough on its own: whoever wants to reach the data has to get past the encrypted road, the entrance door, the code and the archive, and each layer stops them a little more.

Layer 1 · The road: HTTPS on everything

All traffic between the customer’s phone and the server travels encrypted with the HTTPS protocol (TLS): someone on the same public Wi-Fi network can neither read nor modify what passes through. Today the certificate is obtained and renewed automatically; a site without HTTPS is flagged by browsers as “not secure” and, as we will see, cannot even become a PWA. How domain and certificate work I explain in the chapter on domain, DNS and HTTPS.

Layer 2 · The door: who gets in and how

Customers’ passwords are never stored in readable form: only a fingerprint (a hash) is kept, calculated with algorithms designed for the purpose, from which the password cannot be derived. For the staff, who see everyone’s data, two-factor authentication is added. The complete rules are in the chapter on passwords, two-factor authentication and passkeys.

Layer 3 · The code: no commands slipped into the forms

Every field the customer fills in, from the name to the message, is a point from which someone can try to send instructions to the database: this is SQL injection. The first defense recommended by OWASP is parameterized queries, in which the value typed by the user always remains data and never becomes part of the command. On top of this come the validation of every incoming piece of data, the protection of forms against automated submissions and limits on repeated attempts.

Layer 4 · The archive: less data, fewer permissions, off-site copies

  • Minimization: you collect only the data you really need. What you do not have cannot be stolen from you.
  • Least privilege: the program accesses the database with a user that can do only what is needed, not with the administrator.
  • Encryption of sensitive data even when it is at rest on the disk.
  • Automatic backups that leave the server, tested with a real restore: the method is in the chapter on business backup.

Above all of this come the obligations toward people: a clear privacy notice, separate consents for marketing, the right to request one’s own data or have it deleted. I return to them in the chapter on GDPR and cookies for a small business website.

The words of the chapter

The vocabulary of the portal

Tap a card to flip it.

04PWAs: the app that installs from the browser

For years there was only one road to having “an app”: develop it twice, once for iPhone and once for Android, publish it on the stores, wait for approvals, ask customers to download it. A PWA (Progressive Web App) changes the rules: it is your website, built so that it can be installed on the phone like an app, with its own icon, its own full-screen window and, when needed, the ability to work without a network.

What a site needs to become a PWA

According to Mozilla’s documentation (MDN), to be installable a web app needs two things:

  • a manifest, a small file that declares the name, the icons (at least 192 and 512 pixels for Chromium-based browsers), the start page and the display mode;
  • to be served over HTTPS, that is, over an encrypted connection.

To these is almost always added a service worker: a script that works behind the scenes, keeps a copy of the pages and of useful data, and lets the app open even when there is no network. It is not mandatory for installation, but it is what makes a PWA truly useful in the real world: the customer who opens their booking on the subway, the waiter who checks the menu in a room with no signal.

NATIVE APP DevelopmentiOS + Android Storepaid account Reviewstore timelines Searchcustomer searches Download PWA A single buildyour website A link or a QRopens right away Installon the Home screen instant updates Fewer steps between the customer and your app: fewer customers lost along the way. NATIVE APP DevelopmentiOS + Android Storepaid account Reviewstore timelines Searchcustomer searches Download PWA A single buildyour website Link or QRopens right away Installon the Home screen Fewer steps between the customer and your app: fewer customers lost along the way.
Plate 3.4 — Two roads to the customer’s phone. The native app goes through two builds, the stores and a search; the PWA starts from a link or a QR code and installs from the browser.

PWA and native app compared

AspectNative app from the storesPWA
Developmentusually two versions, iOS and Androidjust one, which is also the website
Publishing costsApple: 99 USD a year · Google Play: 25 USD one-offnone: it is published on your server
Approvalstore review for every versionnone: you decide
Installationsearch in the store and downloadfrom the browser, a link or a QR code
Updatesthe customer has to download themimmediate, the next time it opens
Size on the phoneoften tens of megabytesusually very light
Working offlineyesyes, with a service worker
Notificationsyesyes; on iPhone only if installed (iOS 16.4 and later)
Access to the phonefullbroad but not total, especially on iPhone

For the vast majority of the services of a small or medium business (booking, checking a menu, seeing one’s appointments, receiving a reminder, showing a loyalty card) a PWA does everything that is needed, at a fraction of the cost and with far fewer steps. A native app remains the right choice when deep access to the hardware is needed or when being in the store is itself a goal.

Quiz

PWA or native app?

Choose one answer for each question: the explanation appears right away.

  1. What is needed, at a minimum, for a site to be installable as a PWA?

    According to MDN you need the manifest, with name, icons and start page, and the site served over HTTPS. The service worker is recommended for offline use.

  2. How much does it cost to publish a PWA?

    99 USD a year is Apple’s developer program, 25 USD one-off the Google Play registration: costs of apps in the stores, not of PWAs.

  3. When does a PWA update reach the customer?

    The PWA updates from your server: no approval, no download to ask of the customer.

05The truth about iPhone and Android

Honesty is needed here, because many presentations of PWAs skip it: the experience is not identical on the two systems, and a serious project takes this into account from day one.

On Android: the browser offers it by itself

On Chromium-based browsers, such as Chrome and Samsung Internet, when a site meets the requirements of a PWA the browser can offer installation with a prompt or with the “Install app” item in the menu. With Chrome the installed app appears among the phone’s other apps, with its own icon. The site can also show its own “Install” button at the right moment, for example after the first booking.

On iPhone and iPad: it is added by hand

On iOS and iPadOS there is no automatic installation prompt. The customer has to do it themselves, in four gestures:

1

Open the site

In Safari, by tapping the link or scanning the QR code with the camera.

2

Tap Share

The button with the square and the arrow pointing up.

3

Add to Home

Choose “Add to Home Screen” from the list.

4

Confirm

Check the name and tap “Add”: the icon appears among the apps.

This is why a well-made PWA recognizes the iPhone and shows, at the right moment, a small box with these steps illustrated. It is a design detail that makes the difference between a PWA nobody installs and one that ends up on the screens of many customers.

Notifications on iPhone: only after installation

Since version 16.4 of iOS and iPadOS web apps can also receive push notifications, but under two precise conditions, described by Apple itself on the WebKit blog:

  • the web app must have been added to the Home Screen: from an ordinary Safari tab notifications cannot be turned on;
  • permission is requested only after a user gesture, for example a tap on a “Notify me” button.

A practical rule follows: notifications are a reward for those who install, not the reason to install. The service must be useful even without them.

True or false?

Common myths about PWAs

For each statement choose true or false.

  • On iPhone, Safari offers to install the PWA by itself, like Chrome on Android.

    False: on iOS and iPadOS there is no automatic prompt. You install from Share, then “Add to Home Screen”.

  • A PWA on iPhone can receive push notifications.

    True, since iOS 16.4: provided it has been added to the Home Screen and the user grants permission after a gesture of their own.

  • Publishing a PWA requires App Store approval.

    False: the PWA lives on your server and installs from the browser, with no reviews and no developer account.

  • A site without HTTPS cannot become an installable PWA.

    True: the encrypted connection is a requirement, with the sole exception of local development environments.

  • A PWA cannot work without a connection.

    False: with a service worker it keeps pages and useful data and opens even without a network.

06The QR in the window: from the sidewalk to the customer’s phone

And here we come to the strategy that joins the physical world to the digital one, and costs very little: a QR code displayed in the window of the shop, the studio or the restaurant, which takes passers-by straight into your PWA. It is the shortest bridge there is between someone walking past your door and a customer who finds you again every time they open their phone.

It works because today phone cameras read QR codes on their own, with no app to download: you point, the link appears, you tap. It works even when you are closed: the window is at work at ten in the evening and on Sunday morning.

shop window Scan with the phone camera Page a clear offer and the button Install the icon on the Home screen Comes back books, orders, gets the alerts every later visit starts from the phone, not from the street The window the QR code on show Scan with the phone camera Page a clear offer and the button Install the icon on the Home screen Comes back books, orders, gets the alerts every later visit starts from the phone, not from the street
Plate 3.5 — From the street to the screen. The QR in the window is the start of a five-stage path: the goal is not the scan, it is the customer who comes back from their Home screen.

Step 1 · The QR leads to an address of your own that will not change

The QR code is printed: once it is in the window, you will not change it again. This is why it must contain an address on your own domain, designed to last, such as yoursite.com/window, which the server then redirects to the right page. If tomorrow you change your offer, you change the destination on the server, not the sticker. Never a QR that points to a third-party service that may shut down or ask for a subscription to keep working. Why the domain must be registered in your name I explain in the chapter on who really owns your website.

Step 2 · A reason to scan it

Nobody scans a little black square out of curiosity. Next to the QR you need a sentence that says what you get, right away: “Book your table even when we are closed”, “Today’s menu on your phone”, “Book your next visit in ten seconds”, “Your loyalty card always with you”. One concrete promise, just one.

Step 3 · The QR must actually be readable

  • At eye level, where the gaze naturally falls, not down low among the credit card stickers.
  • Large enough to be scanned from the sidewalk: before printing it, try it yourself with two different phones from the distance at which passers-by will stand.
  • Sharp contrast: dark on light, with a white margin around it, away from reflections and dirty glass.
  • Lit in the evening too, when the window works on its own.

Step 4 · The landing page does one thing only

Whoever scans the QR is standing on the sidewalk, with little patience. The page that opens must load in an instant and keep the window’s promise, with a single main button. Right below, the box for installing the app: with the “Install” button on Android and the illustrated instructions on iPhone, recognized automatically.

Step 5 · The reason to keep it

Installing the app is a small commitment, and people make it only if it is worth it. The reasons that work are practical: booking without phoning, seeing one’s appointments, getting a reminder the day before, collecting points, being the first to hear about what is new. The more useful the PWA is, the longer it stays on the phone.

Step 6 · Measure, without profiling anyone

Add a parameter to the QR’s address that indicates where the visit comes from, for example ?from=window. That way you know how many visits come from the street compared with the website or social media, without collecting personal data. If you use analytics tools that set cookies, the rules in the chapter on GDPR and cookies apply.

The savings compared with a traditional app

  • No publishing costs in the stores and no review to wait for.
  • A single build, which is also your website and your booking page.
  • No search in the store: the customer does not have to find your app among a thousand with similar names.
  • A sticker instead of an advertising campaign: the cheapest channel there is for a business with a door on the street.

The QR in the window works even better together with the other tools of neighborhood retail, such as the flyer in the local area: I bring them together in the chapter on how to move from online to a physical shop.

07Website, portal and PWA: an ecosystem that belongs to you

Let us put the pieces together. A website that gets found, a portal that keeps customers and bookings in one place, a PWA that sits on customers’ Home screens, a QR in the window that brings passers-by inside. Each piece strengthens the others, and they all belong to your business: domain, data, relationship with customers, rules.

This is a substantial difference from what happens on platforms and social media, where visibility, contacts and even the existence of the page depend on decisions made elsewhere. This is why this owned ecosystem, website plus PWA, is the only real digital asset for finding customers without depending on social media: social media remain useful for getting noticed, but home is somewhere else. I talk about it in the next chapter: your website as an asset and social media as a megaphone.

Test yourself

Does your business have an ecosystem of its own?

Frequently asked questions

What is the difference between a PWA and an app from the store?

The PWA is your website, built to install on the phone from the browser: a single build, no store, immediate updates. A store app is usually developed twice, is published with a paid account and goes through a review for every version.

Does a PWA work on iPhone?

Yes. It is installed from Safari with Share and then “Add to Home Screen”, because iOS has no automatic prompt. Since iOS and iPadOS 16.4 it can receive notifications, provided it has been added to the Home Screen.

Can I keep the external booking platforms too?

Yes: they can remain a channel for getting known. What matters is that the true calendar is yours and that every customer who arrived from outside finds, the next time, a way to book directly with you.

What should the QR code in the window contain?

An address on your own domain designed to last, which the server redirects to the right page. That way you can change your offer without reprinting the sticker, and the QR does not depend on third-party services.

Is a portal with customer data GDPR-compliant on its own?

The software must provide the right technical measures, such as encryption, protected logins and backups, but compliance also includes the privacy notice, consents and organization. They are two halves of the same job.

Does the PWA work without a connection?

Yes, if it has a service worker that keeps the pages and useful data. Operations that require the server, such as a new booking, are completed as soon as the network returns.

Sources

  1. MDN Web Docs, “Making PWAs installable”: manifest, icons, HTTPS and the role of the service worker.
  2. web.dev (Google), “Learn PWA: Installation”: installation on Android and manual adding on iOS and iPadOS.
  3. WebKit (Apple), “Web Push for Web Apps on iOS and iPadOS”: push notifications from iOS 16.4 for web apps added to the Home Screen.
  4. Apple Developer, “What’s included”: the developer program at 99 USD per membership year.
  5. Play Console Help, developer account registration (in Italian): the 25 USD registration fee.
  6. OWASP, “SQL Injection Prevention Cheat Sheet”: parameterized queries as the first defense.
  7. Regulation (EU) 2016/679 (GDPR), Article 32 (in Italian): security of processing, encryption and restoring data.

Chapter updated October 2026. The features of PWAs depend on the browser and the operating system version and may change: the information on iPhone and Android comes from the official documentation of Apple, Google and Mozilla listed above.

Shall we talk?

If what you have read touches your business, tell me where you are starting from: I will answer you myself, with a concrete plan and no obligation.

Message me on WhatsAppDiscover Zenith Develop