← All projects
Garden Sporting CenterSports centre · swimming, fitness, classes

Twenty-eight years of archive, visible every five minutes.

A sports centre with an archive that starts in 1998 and a management system on SQL Server on site. We did not replace it: we made it readable, with a cloud copy that updates every five minutes and a panel for management.

Try the dashboard
5 minData refresh
3.7MTurnstile passes synced
11Panel sections
R/ORead-only access to the system

Try the dashboard

The panel, with the data changed.

A navigable replica of Garden’s panel: same menu, same eleven sections, same charts with the comparison against the previous year. Behind the login sits the real panel; here the numbers are anonymised.

Open full screen (opens in a new tab)
panel.club.it

Switch the theme at the top right, filter the expiries, open a customer record. Every five minutes the demo simulates a sync round.

How it is anonymised

  • The monthly series are the real ones since 2016, rescaled by a fixed factor and nudged by a few percentage points: the shape stays, the values do not.
  • People are codes (“Customer 2041”); phone numbers and emails are masked, birth dates and addresses do not appear.
  • Categories, salespeople and turnstiles have generic names. The lists (expiries, certificates, debtors) come from a synthetic population consistent with the totals.
  • The sync rounds and the new sales that appear while you watch are simulated.

The challenge

All the data was there, but it sat inside the management system, on site, built for the front desk rather than for reading a whole year at a glance. Management’s questions are simple: how many members today, who is about to expire, who renewed, how much is coming in compared with last year.

The approach

The same setup already proven at another club: a script on the server reads SQL Server with a read-only user and sends the changes to a cloud database. A light round every five minutes, a heavy one every night. The calculation rules live in SQL, not in the charts, and every page says when the data was last updated. The first load starts in 2016; the archive from 1998 to 2015 is the next dig.

The archive

From 1998 to today, in two layers.

The management system’s archive starts in 1998. The first load into the cloud starts in 2016, with sales that were still valid from before (the oldest date from 2008). The years from 1998 to 2015 stay on site: they are the next dig.

1998 – 2015The system’s archive, on site
2016 – todayArchive + cloud copy
  1. 1998The system’s archive begins
  2. 2008The oldest still-valid sales the cloud holds
  3. 2016First load into the cloud: cash, sales, turnstiles
  4. Nov 2026The sync runs every 5 minutes

Heritage and legacy

The archive is the heritage. The system that keeps it is the legacy.

A decades-old management system is usually seen as a weight to get rid of. We treat it as the record of what the centre has really done: seasons, families, habits, good years and hard ones.

Within those twenty-eight years lies the memory of the place. Throwing it away to “start from scratch” would mean losing what the centre has built.

Innovation here is not changing the system: it is shortening the distance between the archive and whoever decides, without touching what works. The on-site database stays the source; around it grow new tools, a cloud database, SQL functions holding the calculation rules, a dashboard that keeps updating. History feeds the present; it is not replaced by it.

01The system is never touched

We read it with a read-only user. No changes, no risk for the front desk.

02One rule, written once

The definitions of “active”, “renewed”, “collected” live in SQL, not scattered across charts. They change in one place only.

03Every page says since when

Every page shows when the data was last updated, so you know at once how far to trust what you read.

04Every number explains itself

Under every card there is the definition of how it is counted, in plain language, for people who are not technical.

Every five minutes

A light round every five minutes, a heavy one every night.

The SQL database stays on site. A scheduled script on the server reads only what changed and sends it to the cloud. The dashboard reads from the cloud, so it never weighs on the management system and opens from anywhere.

01What gets synchronised

The system’s 37 tables: customer records, memberships and sales, cash and instalments, turnstile passes, medical certificates, CRM, emails, bookings and receipts. The system stays the source; the cloud keeps a readable copy.

02The 5-minute round

It carries what changes: sales, cash, instalments, edits, today’s turnstile passes and the medical certificates. It takes a few seconds.

03The night round

At 02:00 it carries the rest: CRM, emails, bookings, receipts, the historical turnstile archive. It stops by itself after 50 minutes and the next day picks up where it left off.

Twenty-eight years of history.

Updated every five minutes.

Behind the login

Garden Sporting Center

What you only see from inside — the CRM, the member app — rebuilt and animated with anonymised sample data.

01

From the on-site server to the dashboard

A scheduled script on the server reads SQL Server read-only and sends only the changes to the cloud: every five minutes, with the heavy load every night. It can be re-run any time without side effects.

01SQL ServerWindows server on site
02Scheduled scriptEvery 5 minutes · read-only
03Cloud databaseCalculation rules in SQL
04PanelEleven sections for management

0 turnstile passes synced

02

The archive, in the cloud

The system’s tables copied into a database of our own: records, sales, cash, turnstiles, CRM. Every page of the panel reads from there in an instant instead of querying the on-site system.

0rows in the main tables37 tables · refreshed every 5 minutes
Turnstile passes0
Sales actions (CRM)0
Cash movements0
Membership sales0
Customer records0

What we built

  • 01Sync from Info4U (SQL Server on site) to the cloud, idempotent: a 5-minute round and a night round
  • 02An eleven-section panel: overview, memberships, expiries and renewals, certificates, contacts, finance, debtors, analysis, sales team, access, users
  • 03Calculation rules written in SQL: what an active member, a renewal, a net-of-refunds collection is
  • 04Turnstile access synced: visits per person and day
  • 05Medical certificates, unpaid instalments and debtors, renewals by salesperson
  • 06Sign-in with personal email and password, time-limited invitations and roles
  • 07Installable as an app on phone and tablet

Technology

SQL ServerPowerShellSupabasePostgresNext.jsTailwindVercel

How it’s built

Under the hood.

A management system that stays where it is, a cloud copy that updates every five minutes and a Next.js panel on top. The calculation rules live in the database, not in the charts: every page reads the same definitions.

The architecture, layer by layer

01
Interfaces
Management panel · Next.js + ReactSign-in with personal email and passwordInstallable as an app
02
Logic
SQL functions for the numbersCache for heavy calculationsScheduled sync · PowerShell
03
Data
Postgres on Supabase37 tables, a copy of the systemRow Level Security
04
External systems
Info4U · SQL Server on site

The pieces, one by one

01

The sync script

The bridge between site and cloud

A scheduled task on the Windows server reads the system with a read-only user and sends only the changes. The 5-minute round takes a few seconds; the night round carries the heavy data and stops by itself after 50 minutes. Every call has a time limit and can be re-run without side effects.

02

Rules in the database

Numbers that don’t depend on who looks

What an active member, a renewal, a net-of-refunds collection is: defined once in SQL functions, written in the comment at the top of the migration.

03

Next.js + Tailwind

The panel

Pages composed on the server with the data already inside; the service key never leaves the server. Every page shows when the data was last updated and warns if the sync has been stopped for more than six hours.

04

The charts

The comparison with last year

Columns and lines in d3 and motion, copied into the project and adapted: columns in cascade, tooltips with the difference from last year, the current month dashed. They follow light and dark themes on their own.

05

Access and invitations

Everyone with their own password

Roles and users in a table, passwords in Supabase Auth. An administrator invites someone with a personal link valid for 7 days; whoever is deactivated is out within ten minutes.

In numbers

21Database migrations
37Tables kept in sync
11Panel sections
5 minData refresh