Simulated functionality and production dependencies
The demo runs as a static site with a simulated backend in the browser (src/client/mock-server.js, state in localStorage). The simulation follows the production rules on purpose, and tests/unit/mock-server.test.mjs checks them. Nothing below is live: no money moves, no messages are sent and no access codes exist.
What is simulated
| Area | In the demo | Needed in production |
|---|---|---|
| Unit inventory and availability | Fictional units, floors and occupancy relative to today (demoInventory in src/shared/data.js) | The unit register and bookings from the facility's storage-management system or the booking service's database, as the single source of truth |
| Temporary holds | 30 min (2 min in demo settings), stored in localStorage | Server-side holds with expiry, created in a transaction. One hold per unit and customer draft; extended while a payment session is open; released or expired by a job |
| Double-booking protection | Overlap check on date ranges | A database constraint on (unit, date range), e.g. a PostgreSQL EXCLUDE USING gist, plus hold-ownership checks inside the same transaction |
| Price calculation | Shared pricing.js; the simulated server recalculates and refuses a mismatching total | Price table on the server; quote identified by price version; total re-checked when the payment session is created; VAT treatment confirmed by the accountant |
| Payment | A provider page with outcome buttons; no credentials or card fields | A provider-hosted or tokenised payment page (for example Paytrail, Stripe Checkout, Nets or Klarna). No card data touches Holvi's servers (PCI DSS SAQ A). The available methods (Finnish online banks, cards, MobilePay, Apple/Google Pay) depend on the provider and the merchant agreement |
| Duplicate-charge protection | Idempotency key per attempt; a new attempt supersedes the open session; a pending or paid session blocks new attempts | The same logic, stored in the database, passing idempotency keys to the provider API and cancelling superseded sessions at the provider |
| Payment confirmation | A signed, de-duplicated "webhook" event; the return URL is never trusted | Verified provider notifications: HMAC signature, timestamp tolerance, event-ID de-duplication table, idempotent handlers, retries. For pending or unknown states, a server-to-server status query before any new payment prompt |
| Payment after the hold expired | Booking status needs_resolution; the customer chooses a same-size unit or a full refund | The same state machine, plus staff notification, a refund through the provider API, a refund-time policy and reconciliation reports |
| Later rent (every four weeks) | Shown as "lasku Holvin tilille" and flagged | Decide the collection method: email or e-invoice from the accounting system, or card-on-file with explicit consent and strong customer authentication. Reminder fees require the price list referred to in terms §12 |
| Contract | Acceptance checkbox after a plain-language summary and the full terms | Store the accepted terms version, time and identity. Terms §11 speaks of signature by both parties, so confirm whether electronic acceptance is enough. Terms §17 allows credit checks; if used, they need identification and a legal basis |
| Access provisioning | accessState pending or active; a demo button activates it | Integration with the access-control system: create the code or fob for the unit, activate it on the start date or after payment (to be decided), send it by SMS, rotate or revoke on changes and at the end, and link the unit alarm |
| Email and SMS | Previews on the confirmation page | An EU-hosted transactional email and SMS provider with templates, delivery logs and bounce handling |
| Oma varasto sign-in | Code 123456, plus a quick-login button | Passwordless one-time codes (email or SMS) or strong electronic identification. Rate limiting, session expiry and server-side authorisation of every rental and action. Codes and full access credentials are never shown in the page |
| Size change and notice | Stored as requests or a notice with a confirmation number | Staff workflow and notifications. Notice must produce a written confirmation (terms §9). Final invoice or refund and fob-deposit refund through accounting |
| Booking requests (full sizes) | Stored locally | Waitlist with consent and retention rules; staff follow-up |
| Supplies | Added to the rental booking and "delivered into the unit" | Stock levels. A supplies-only order for pickup is not in the demo (the current shop allows it); decide whether to keep it |
| Customer data | localStorage on the device, expires after 7 days, "Nollaa demo" clears it | Server-side storage with retention periods, an updated privacy policy (CCTV, access logs, payment and SMS processors) and data-processing agreements |
| Photos and fonts | Hotlinked from the live media library; Google Fonts | Migrate media keeping /wp-content/uploads/ paths, add alt texts, serve AVIF/WebP. Self-host the fonts |
| Hosting, redirects and SEO | server.mjs applies the rules in src/data/urls.js | The same rules on the production host or CDN (deploy/nginx-redirects.conf and deploy/netlify-_redirects are generated). Fix the http://www two-hop chain. Submit the sitemap. Monitor 404s in Search Console |
| Analytics and cookies | None | Only with consent, following Traficom guidance; the current site has a consent banner and Google Tag Manager |
Decisions and information needed from Holvi before production
- Resolve the price and terms conflicts in
docs/audit.md: the lowest price, key fob deposit or sale, padlock price, refunds on ending, the rent deposit, the open-ended first payment, when the contract binds, and household VAT. - Unit dimensions and floor per unit, and the container's details.
- The arrival guide: parking, loading, entrance, lift, alarm procedure, false-alarm costs, when the access code is sent, and holiday hours.
- Cancellation before the start date, and a legal check of consumer withdrawal rights for distance contracts.
- The payment provider and methods, the invoicing method for later periods, and who handles refunds.
- Whether online stock should be live. On 24.9.2026 every size showed "Varasto loppu".
- The AI-enhanced photos (exterior, unit doors, customer, reception, packing supplies):
- Check each one against the real site: signs, door numbers and the surroundings of the building.
- Get consent from the people shown to publish an AI-edited picture of them.
- Decide how to disclose the editing. The demo writes "Kuvaa on muokattu tekoälyllä" under each image; the EU AI Act transparency rules for manipulated images of real people and places should be checked with a lawyer.
- Confirm that the products in the packing-supplies picture, such as the printed moving boxes and gloves, are sold, or keep it on the tips page only.
Suggested production architecture
Keep a CMS the business can edit for content. Staying on WordPress preserves the /tuote/ and /product-category/ URLs natively, with templates rebuilt to this design. Replace the WooCommerce rental "product" with a booking application backed by either a self-storage management system with an API or a small dedicated service with a relational database. Keep public pages static or server-rendered and crawlable. Only the booking and account routes need JavaScript, and they need a phone fallback (already in the demo). Generate redirect rules from one source file, as the demo does, and test them in CI with tests/url-check.mjs.
