From e6de14719769a153fccddc0f515a58d4c194ad09 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 14 Apr 2026 19:36:15 +0000
Subject: [PATCH 1/4] Initial plan
From 8322733f28b35b3c5393b011990dd5cd4f9f1607 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 14 Apr 2026 19:49:29 +0000
Subject: [PATCH 2/4] Add SEO landing pages, FAQ schema, meta tags, and
whitepaper page
- Update homepage with meta description, keywords, and canonical URL
- Add JSON-LD FAQ structured data to homepage
- Add visible FAQ section to homepage
- Create /student-union-cashless landing page with FAQ schema
- Create /indie-festival-payments landing page with FAQ schema
- Create /hacker-camp-nfc landing page with FAQ schema
- Create /whitepaper page rendering the security whitepaper as HTML
- Add routes for all new pages in routes/web.php
- Add English translations for meta tags and FAQ content
Agent-Logs-Url: https://github.com/CatLabInteractive/catlab-drinks/sessions/44091289-1fe9-4e4e-9416-a93a55acfb4d
Co-authored-by: daedeloth <1168599+daedeloth@users.noreply.github.com>
---
resources/lang/en/welcome.php | 15 +
.../views/landing/hacker-camp-nfc.blade.php | 245 +++++++++++++++
.../landing/indie-festival-payments.blade.php | 204 ++++++++++++
.../landing/student-union-cashless.blade.php | 200 ++++++++++++
resources/views/welcome.blade.php | 85 +++++
resources/views/whitepaper.blade.php | 292 ++++++++++++++++++
routes/web.php | 4 +
7 files changed, 1045 insertions(+)
create mode 100644 resources/views/landing/hacker-camp-nfc.blade.php
create mode 100644 resources/views/landing/indie-festival-payments.blade.php
create mode 100644 resources/views/landing/student-union-cashless.blade.php
create mode 100644 resources/views/whitepaper.blade.php
diff --git a/resources/lang/en/welcome.php b/resources/lang/en/welcome.php
index 078a6e6..de9d116 100644
--- a/resources/lang/en/welcome.php
+++ b/resources/lang/en/welcome.php
@@ -53,4 +53,19 @@
'license_warranty' => 'THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.',
'language' => 'Language',
+
+ 'meta_description' => 'CatLab Drinks is an open-source, hardware-agnostic cashless payment system for events and festivals. Use budget NFC tags, self-host on your own server, and run a complete DIY festival payment infrastructure.',
+ 'meta_keywords' => 'hardware-agnostic cashless payment system, budget NFC top-up system for festivals, DIY festival payment infrastructure, open-source POS, NFC payment, cashless event, festival payment, self-hosted bar automation',
+
+ 'faq_title' => 'Frequently Asked Questions',
+ 'faq_1_q' => 'Can I use standard NFC tags for a festival payment system?',
+ 'faq_1_a' => 'Yes. CatLab Drinks works with standard NTAG213 NFC tags that cost as little as €0.10 each. There is no need for expensive proprietary wristbands or vendor-locked hardware.',
+ 'faq_2_q' => 'What hardware do I need to run a cashless event?',
+ 'faq_2_a' => 'Any Android phone or tablet with NFC can serve as a POS terminal. For desktop setups, a USB NFC reader such as the ACR122U works with our companion service. The system is fully hardware-agnostic.',
+ 'faq_3_q' => 'Is CatLab Drinks suitable for small events on a tight budget?',
+ 'faq_3_a' => 'Absolutely. The software is free and open-source, NFC tags are extremely cheap, and you can use existing Android devices as terminals. This makes it ideal for student unions, community events, and small festivals.',
+ 'faq_4_q' => 'How does the NFC card security work?',
+ 'faq_4_a' => 'Each POS terminal has its own ECDSA cryptographic key pair. Card data is signed with the terminal private key and verified using approved public keys. The card hardware UID is included in the signature to prevent cloning.',
+ 'faq_5_q' => 'Does the system work offline?',
+ 'faq_5_a' => 'Yes. Because the balance is stored directly on the NFC card, transactions can be processed even without an internet connection. Data syncs automatically when connectivity is restored.',
];
diff --git a/resources/views/landing/hacker-camp-nfc.blade.php b/resources/views/landing/hacker-camp-nfc.blade.php
new file mode 100644
index 0000000..34533b2
--- /dev/null
+++ b/resources/views/landing/hacker-camp-nfc.blade.php
@@ -0,0 +1,245 @@
+
+
+
Open architecture. Open source. Bring your own hardware.
+
+ Hacker camps and tech events demand transparency and control. CatLab Drinks is a
+ GPL-licensed cashless payment system you can deploy, inspect, and modify. Source your
+ own NTAG213 tags in bulk, run the server on your own metal, and integrate with your
+ existing infrastructure via a documented REST API.
+
+ No black boxes. The cryptographic model, card data format, and API surface are fully
+ documented and open for audit. Here's what's under the hood.
+
+
+
+
+
+
+
🔑 Per-Device ECDSA Keys
+
+ Each POS terminal generates its own P-192 key pair. Signatures fit within NTAG213's
+ 144-byte memory. Public keys require explicit admin approval — no trust-on-first-use.
+
+
+
+
🛠️ Raw Hardware Sourcing
+
+ Use any NTAG213 NFC tags from any supplier. ACR122U or compatible USB readers for
+ desktop setups. Android NFC for mobile terminals. No proprietary hardware required.
+
+
+
+
📡 Socket.IO NFC Bridge
+
+ The companion nfc-socketio
+ service bridges USB NFC readers to the browser POS via socket.io. Run it on a Raspberry
+ Pi or any Linux box.
+
+
+
+
📄 Full REST API
+
+ Both the management and device APIs are documented with Swagger. Integrate with your
+ own dashboards, ticketing systems, or data pipelines.
+
+
+
+
🐳 Docker-Ready
+
+ Deploy with Docker, Docker Compose, Heroku buildpacks, or bare-metal PHP+Apache. The
+ Dockerfile and Procfile are included in the repository.
+
+
+
+
🔓 GPL v3 Licensed
+
+ Free as in freedom. Fork it, patch it, redistribute it. The full source — backend,
+ frontend, NFC logic, and crypto — is on GitHub.
+
+
+
+
+
+
+
+
+
Technical Details
+
+
+
+
+
+
Card Data Format (V1)
+
+ Each NFC card stores 85 bytes of signed data in an NDEF external record:
+
+
+
+
+
Field
+
Size
+
Description
+
+
+
+
Version
1 byte
Format version (0x01)
+
Device ID
3 bytes
Signing terminal identifier
+
Balance
4 bytes
Signed 32-bit integer (cents)
+
Transaction count
4 bytes
Unsigned 32-bit monotonic counter
+
Timestamp
4 bytes
Unsigned 32-bit Unix timestamp
+
Previous transactions
20 bytes
5 × signed 32-bit amounts
+
Discount
1 byte
Discount flag
+
ECDSA signature
48 bytes
P-192 signature (24 r + 24 s)
+
+
+
+ The signature covers version + deviceId + payload + cardHardwareUid.
+ Including the hardware UID (read from the NFC chip, not stored in the data) prevents
+ cross-card replay attacks.
+
+
+
+
+
+
+
+
+
Frequently Asked Questions
+
+
+
+
+
+
+
Can I audit the full source code of the payment system?
+
Yes. CatLab Drinks is released under the GNU GPL v3 license. The entire codebase — backend, POS frontend, NFC card logic, and cryptographic signing — is publicly available on GitHub for inspection, modification, and redistribution.
+
+
+
What cryptography does the NFC card system use?
+
Each POS terminal generates an ECDSA P-192 key pair. Card data (balance, transaction count, timestamps, and the hardware UID) is signed with the terminal's private key. Other terminals verify signatures using approved public keys distributed by the server. P-192 was chosen to fit signatures within the 144-byte NTAG213 memory constraint.
+
+
+
Can I source my own NFC hardware?
+
Absolutely. The system uses standard NTAG213 tags available from any electronics supplier. For readers, any NFC-capable Android device or ACR122U-compatible USB reader works. There is zero vendor lock-in on hardware.
+
+
+
How do I integrate CatLab Drinks with my own infrastructure?
+
The system exposes a full REST API documented with Swagger. Deploy via Docker, Heroku, or any PHP-capable server. The NFC companion service for USB readers communicates over socket.io. All protocols are documented and open.
Own your payment infrastructure. No vendor lock-in, no per-transaction fees, no mandatory hardware bundles.
+
+ Indie festivals shouldn't have to hand over a slice of every drink sale just to go cashless.
+ CatLab Drinks is an open-source, hardware-agnostic payment system that lets you build your
+ own DIY festival payment infrastructure using off-the-shelf NFC tags that cost cents — not euros.
+
+ Traditional cashless vendors lock you into their hardware, their software, and their pricing.
+ CatLab Drinks takes the opposite approach: everything is open, standard, and under your control.
+
+
+
+
+
+
+
🏷️ €0.10 NFC Tags
+
+ Use standard NTAG213 NFC tags or stickers sourced from any supplier. No proprietary
+ wristbands or vendor-specific chips required. Budget a fraction of what traditional
+ systems charge per attendee.
+
+
+
+
📱 Your Own Devices
+
+ Any Android phone or tablet with NFC becomes a POS terminal. Use what you already have
+ or buy affordable second-hand devices. Desktop setups use any USB NFC reader.
+
+
+
+
🖥️ Self-Hosted
+
+ Deploy on your own server, a VPS, or a free-tier cloud platform. Your attendee data
+ and transaction history stay on infrastructure you control. No third-party data sharing.
+
+
+
+
📊 Full Sales Visibility
+
+ Real-time dashboards show revenue per bar, top-selling items, and transaction volumes.
+ Make informed decisions during the festival and generate post-event reports instantly.
+
+
+
+
📡 Reliable Offline Mode
+
+ Field conditions are unpredictable. The POS system continues processing transactions
+ offline because balances live on the cards. Data syncs seamlessly when the connection
+ is restored.
+
+
+
+
🔐 Bank-Grade Signing
+
+ Every card transaction is signed with per-device ECDSA cryptographic keys. No shared
+ secrets, no single points of failure. An admin must approve every terminal key before
+ it can write to cards.
+
+
+
+
+
+
+
+
+
Frequently Asked Questions
+
+
+
+
+
+
+
Can I run a cashless festival without expensive vendor contracts?
+
Yes. CatLab Drinks is free, open-source software. You deploy it on your own server and use standard NTAG213 NFC tags that cost as little as €0.10 each. There are no licensing fees, no per-transaction charges, and no mandatory hardware bundles.
+
+
+
What NFC tags work with this system?
+
Any standard NTAG213 NFC tag or sticker works. You can source them from any electronics supplier worldwide. There is no requirement for proprietary wristbands or vendor-specific chips.
+
+
+
How many POS terminals can I run simultaneously?
+
There is no hard limit. Each Android device or USB NFC reader setup acts as an independent terminal. Add as many bars and terminals as your event needs.
+
+
+
What happens if the internet goes down during the festival?
+
The POS keeps working. Balances are stored on the NFC cards themselves, so transactions process locally. When connectivity returns, everything syncs automatically to the server.
Run a professional cashless bar at your next campus event — without the professional price tag.
+
+ Student unions run on tight budgets and volunteer power. CatLab Drinks is a free, open-source bar
+ automation system that turns cheap NFC tags and the Android phones you already have into a
+ fully-featured cashless payment infrastructure. No vendor contracts, no recurring fees, no
+ hardware lock-in.
+
+ The software is completely free. NFC tags cost as little as €0.10 each — a fraction of the
+ price of proprietary wristbands. Use the Android devices your team already owns as POS
+ terminals.
+
+
+
+
🙋 Volunteer-Friendly
+
+ The POS interface is simple enough for anyone to use after a two-minute walkthrough. Pair a
+ new device by scanning a QR code. No training sessions or technical knowledge required.
+
+
+
+
🔓 Zero Lock-In
+
+ Self-host on your own server or use a free-tier cloud service. Standard NFC tags, standard
+ Android devices, open-source code. Move to a different solution any time — your data is
+ always yours.
+
+
+
+
📊 Real-Time Sales Reports
+
+ Treasurers get instant visibility into revenue, top-selling items, and per-bar breakdowns.
+ Export data for your financial reporting with no extra tools needed.
+
+
+
+
📡 Works Offline
+
+ Spotty campus WiFi? No problem. The POS system processes transactions offline and syncs
+ when the connection returns. Balances are stored directly on the NFC cards.
+
+
+
+
🔐 Cryptographic Security
+
+ Each terminal signs card data with its own ECDSA key pair. Signatures are verified
+ organisation-wide, preventing forgery and ensuring every transaction is tamper-proof.
+
+
+
+
+
+
+
+
+
Frequently Asked Questions
+
+
+
+
+
+
+
How much does it cost to set up a cashless system for a student event?
+
CatLab Drinks is free and open-source software. The only cost is the NFC tags themselves, which start at around €0.10 each. You can use any Android phone or tablet you already own as a POS terminal.
+
+
+
Can volunteers run the system without technical training?
+
Yes. The POS interface is designed to be simple — volunteers tap menu items, confirm the order, and optionally scan an NFC card. Pairing a device takes under two minutes with the QR code flow.
+
+
+
Do we need to buy specialised hardware?
+
No. CatLab Drinks is hardware-agnostic. Any NFC-enabled Android device works as a terminal. For desktop setups, any compatible USB NFC reader can be used. Standard NTAG213 tags work as payment cards.
+
+
+
Can we self-host the system on our own server?
+
Absolutely. CatLab Drinks is designed for self-hosting. Deploy with Docker, Heroku, or any PHP-capable server. Your data stays under your control at all times.
How to Securely Process Festival Payments Using Standard €0.10 NFC Tags
+
+
+
+
1. Executive Summary
+
+ CatLab Drinks is a cashless point-of-sale (POS) system designed for events, festivals, and bars. It uses
+ NFC-enabled cards (NTAG213) as physical payment tokens that store a digital balance. Multiple POS terminals
+ operate concurrently, with support for offline operation when internet connectivity is unreliable.
+
+
+ This whitepaper describes the security architecture and measures taken to protect the integrity of the
+ cashless payment ecosystem against fraud, replay attacks, and unauthorized modifications.
+
+
+
+
+
2. Threat Model
+
+
2.1 Primary Threats
+
+
+
Threat
Description
Risk Level
+
+
+
Balance forgery
An attacker writes arbitrary credit to their NFC card
Critical
+
Replay attack
Copying signed data from one card to another
High
+
Key interception
An authenticated user extracts the signing key from the browser
High
+
Rogue terminal
An unauthorized device enters the ecosystem and signs cards
High
+
Offline tampering
Exploiting offline POS terminals to manipulate balances
Medium
+
Write interruption
Power loss during NFC write corrupts card data
Medium
+
+
+
+
2.2 Previous Vulnerability (Version 0)
+
+ The original system used a single shared symmetric HMAC-SHA256 key across all POS terminals. This key
+ was loaded client-side whenever any user logged into the management website, creating a critical vulnerability:
+ any authenticated user could intercept the key and forge card balances.
+
+
+
+
+
3. Cryptographic Architecture (Version 1)
+
+
3.1 Asymmetric Key Model
+
+ Version 1 replaces the shared symmetric key with per-device ECDSA P-192 key pairs:
+
+
+
Each POS terminal generates and stores its own unique private key
+
Public keys are managed centrally at the organisation (tenant) level
+
Terminals sign card data with their private key
+
Other terminals verify signatures using approved public keys downloaded from the server
+
+
+ This eliminates the shared-secret vulnerability: no single key compromise affects the entire system.
+
+
+
3.2 Why ECDSA P-192?
+
+
+
Criteria
ECDSA P-192
ECDSA P-256
HMAC-SHA256
+
+
+
Signature size
48 bytes
64 bytes
32 bytes
+
Security level
96-bit
128-bit
256-bit
+
Key type
Asymmetric
Asymmetric
Symmetric
+
Client-side exposure
Private key per-device
Private key per-device
Shared secret
+
+
+
+ P-192 was chosen over P-256 to minimize signature size (48 vs 64 bytes), which is important given
+ NTAG213's 144-byte memory constraint. The 96-bit security level is more than adequate for a drinks
+ credit system where the economic incentive for attacks is low.
+
+
+
3.3 Key Storage
+
+ The private key is AES-encrypted using the device secret (provided by the server via the
+ GET /pos-api/v1/devices/current API call) and stored in the browser's localStorage. This means:
+
+
+
The private key can only be decrypted after successful device authentication
+
The device secret never leaves the server unencrypted in the management API
+
If localStorage is cleared, the key pair is lost and a new one must be generated and approved
+
When a new public key is submitted, the server automatically resets the approval status — an administrator must re-approve the new key
+
On approval, the device's own public key is registered in its local verification map so it can immediately read cards it signs
card_hardware_uid (variable): The card's unique hardware identifier
+
+
+
4.2 Replay Attack Prevention
+
+ The card hardware UID is included in the signed data but not stored on the card (it's read from
+ the NFC hardware). This prevents an attacker from copying signed data from a high-balance card to a
+ low-balance card — the signature verification will fail because the hardware UIDs differ.
+
+
+
4.3 Version Detection
+
Card data version is determined by the first byte of the payload:
+
+
0x01 → Version 1 (ECDSA asymmetric)
+
Any other value → Version 0 (legacy HMAC-SHA256)
+
+
+
+
+
5. Key Management & Admin Workflow
+
+
5.1 Key Generation
+
+ Key generation is an explicit manual action — it is never automatic. The POS terminal shows a modal
+ requiring the user to press "Generate Credentials". This ensures operators are aware that a new key pair will
+ be created and requires administrator approval.
+
+
+
5.2 Key Approval Flow
+
+
POS terminal generates key pair locally
+
Public key is uploaded to the server
+
Key enters "Pending" state — card operations blocked
+
Administrator approves the key via the admin dashboard
+
Terminal downloads approved keys — card operations now allowed
+
+
+
5.3 Key Revocation
+
+ Administrators can instantly revoke a key if a terminal is compromised. The admin dashboard warns
+ that revocation is a destructive action because all cards last signed by that device will fail signature verification
+ and must be re-scanned at an approved terminal.
+
+
+
5.4 Device Soft-Delete
+
+ Deleting a POS device soft-deletes it, preserving the public key record and signed card tracking. This ensures
+ cards signed by the deleted device can still be verified, and the admin can still manage the device's key.
+
+
+
+
+
6. Offline Operation
+
+
6.1 Transaction Splitting
+
+ Cards store the last 5 previous transaction amounts. When a POS terminal goes offline, these stored
+ transactions allow the system to reconstruct missing transaction history when connectivity is restored.
+
+
+
6.2 Transaction Merger
+
+ The TransactionMerger handles reconciliation of transactions received from different terminals
+ in potentially different order. It uses database-level locking to prevent race conditions and maintains an
+ "overflow" transaction to absorb balance discrepancies.
+
+
+
+
+
7. Physical Security
+
+
7.1 NFC Write Protection
+
+ The nfc-socketio service applies a write password
+ to the NFC tags, derived from the organisation secret and card UID. While NTAG213's 4-byte password is
+ insufficient for cryptographic security, it prevents accidental overwrites.
+
+
+
7.2 NTAG213 Memory Layout
+
+
+
Component
Size
+
+
+
NTAG213 user memory
144 bytes
+
TLV overhead
3 bytes
+
Max NDEF message
141 bytes
+
URI record (topup URL)
~37 bytes
+
External record (v1 data)
~104 bytes
+
+
+
+
+
+
8. Defence in Depth
+
+ The system employs multiple layers of security that must all be defeated for a successful attack:
+