The website of Rock Fever, the student ASBL that has been running rock (and waltz) dance nights, the soirées, at the Hall Sainte-Barbe in Louvain-la-Neuve since 2015, open to anyone aged 18 to 35. On the site, dancers find the next soirée and sign up for it, propose songs and get the photos; the team runs everything from its admin.
PHP 8.5, Twig 3, PHP-DI 7, Mezzio router, on OVH web hosting. Every push to main goes live.
| Page | For | What it does |
|---|---|---|
/ |
Everyone | Who we are, the next soirée, the coming dates and the staff |
/calendrier |
Everyone | Every soirée of the quadrimestre, to add to a calendar in one click (.ics feed) |
/event |
Dancers | Sign up for the next soirée (3 € instead of 4 € at the door), from a week before |
/photos |
Dancers | The soirées' photo albums, each behind its own password |
/music |
Dancers | Propose a song for the soirées |
/contact |
Everyone | Write to the team |
/admin |
The team | Events and the sign-up list at the door, home page sections, songs, photos, users |
Layout · Run it locally · Calendar · Home page · Statistics · Photos · Facebook posts · Page speed · Search engines and AI agents · Deploy · Package updates · README screenshots
| Path | What it is |
|---|---|
www/ |
Web root (index.php, CSS, JS, images) |
src/ |
Application modules (Main, Events, Photos, Auth, Admin) and the small Framework |
views/ |
Shared Twig layouts |
config/ |
App config. database.php holds the DB credentials and is not in git |
src/*/db/ |
Phinx migrations and seeds |
brew install php composer mariadb
composer install
cp config/database.example.php config/database.php # then fill in a local database
composer migrate
composer seed
composer serve # http://127.0.0.1:8000composer serve runs with ENV=dev, which shows errors with Whoops. Without ENV, the app runs in production mode and caches templates in tmp/.
/calendrier lists the dates of the soirées, with buttons to add one or all of them to a calendar app. The dates are planned in the admin, on Événements > À venir (/admin/events): add the next semester's dates there (no theme needed: a first date, Jusqu'au a last one and Semaine "S1" add the same weekday every week, S1, S2…; dates already planned are skipped), then create each one's event (theme, description, Facebook) from its Créer l'événement button when its sign-up nears. A soirée that won't happen gets Soirée annulée rather than being removed. Passées lists the events that are over. The usual times, place, address, prices and sign-up opening are the page's Réglages des soirées (admins only).
In Instagram and Facebook: their own browser can't hand a .ics file or a webcal: link to the phone's calendar. There, www/js/script.js sends those links and the Google Agenda ones to the real browser instead (x-safari-https: on iOS, an intent: URL on Android; a webcal: link gets the page, whose button then subscribes). If the page is still on screen 1.5 seconds later, views/inAppBrowser.twig explains how to open it by hand.
Settings: Settings lists every setting of the site with its label, type and default; each is a row of the values table. The soirées' are edited on /admin/events, the others (contact address, Facebook and Instagram links, R.O.I. and conditions) on Paramètres > Réglages (/admin/values). A setting never saved has its default, and saving it adds its row, so a new setting needs no SQL. Templates read them with setting('NAME'). The old DEFAULT_WALTZTIME, DEFAULT_ROCKTIME, DEFAULT_PLACE and DEFAULT_PRICE rows are no longer read. The dates are in the soirees table: on OVH, run src/Events/db/create-soirees-table.sql once in phpMyAdmin before deploying. /calendrier.ics serves them all, so calendars that subscribed to it get the new dates on their own.
One source for every soirée: Calendar builds each soirée from its planned date and its event in the admin (same day): the event's title (its theme), description, waltz and rock times and place win when they're set, the settings give the rest (the usual waltz and rock times, so every soirée has both). Before the team publishes it, a soirée's themeNote says when its theme will be announced, so agents read the date, times, place and prices as confirmed rather than guesses. The home page, /calendrier, /event and its form, the .ics files, the schema.org markup, the sitemap and /api/events all read these records, so they can't disagree. Each soirée has its own page, /calendrier/2026-11-11, its canonical URL. Prices are the settings' only: old events keep the "Prix" text they were created with, shown for past soirées that weren't planned dates. The event form asks for the title, date, times and description; the place (empty: the usual one), Facebook event and photos password are optional.
The same dates feed the home page, so nothing there needs editing when a soirée is over:
- Sign-ups open on their own as Réglages des soirées says (by default 7 days before at midnight:
REGISTRATION_DAYS,REGISTRATION_OPEN_TIME) but not before the previous soirée is over, once its event exists in admin > Événements: the team can create it as early as it likes. They close atREGISTRATION_CLOSE_TIME,REGISTRATION_CLOSE_DAYSdays before (empty: when the soirée starts, the default; never after it ends), and/eventthen refuses sign-ups. Every page says when in the same words (registration.until,Calendar::getRegistrationRule()). Only the next soirée can have them open. Each soirée's state isopen,upcoming,pending(opening day reached, no event in the admin yet),closedorcancelled. The lock in the admin still closes them by hand (and reopens them), and the dashboard says whether they're open, closed or when they open. Before the opening,/eventshows the soirée without the form and refuses sign-ups. - Next soirée card under the header of the home page, which follows the sign-ups: "Inscris-toi à la soirée du …" while they're open; before that, "Les inscriptions ne sont pas encore ouvertes, mais voici la prochaine soirée : Mercredi 11 novembre de 20h30 à 01h00", from when the doors open to when they close, with the opening day (to
/eventif the event exists, else/calendrier); once they’re closed, it's laid out the same way: "Rendez-vous à la prochaine soirée :", its name, when, and a big "Voir la soirée" button to/event. On the soirée’s day it says "ce soir" instead of the date ("Rendez-vous à la soirée de ce soir : … Ce soir de 20h30 à 01h00"). Past soirées never show. On/calendrier, the card only appears while sign-ups are open, and the next soirée says when they open. - Date list: a paragraph containing only
[dates]in an "À propos" section (the "Dates de nos soirées" one) is replaced by the coming soirées, grouped by quadrimestre, with the next one marked. When they're all past, it says the next dates are coming. Don't type dates by hand in that section.
The home page shows the sections of the admin's "À propos" in order. The sections after the one titled Le Staff each present a member: they are shown side by side as cards (photo, name, then text), so keep that title, or change it in HomeAction. In a member's text, the first paragraph with a photo becomes the top of the card. Sections with no title and nothing visible (a commented-out video) are skipped.
Text written in the admin (these sections, the events' title and description) goes through the typography Twig filter (TextExtension), so it follows French typography whatever was typed: no-break spaces before : and inside « », narrow ones before ; ! ?, and ’ apostrophes. Use it on any new admin text (|e|typography for plain text).
Emojis: the production tables were created in utf8 (utf8mb3), which saves emojis as ?. src/Main/db/fix-home-copy.sql converts aboutSections and events to utf8mb4, puts [dates] in the dates section and fixes the spelling of the home page. Run it once in phpMyAdmin after deploying; running it again changes nothing.
/admin/statistics counts the dancers of the past soirées, over all time or one season. The sign-ups have no id but the typed name, so DancerNames decides who is who: the same name whatever its case, accents, hyphens or apostrophes is one dancer.
Matching names: corriger les noms, on that page, opens /admin/statistics/names. It lists the pairs that look like one dancer (same letters, first and last name swapped, a typo, a shortened name), surest first. Each answer saves at once: Même personne keeps the name in bold, the one used most, and Deux personnes stops suggesting the pair. Tout regrouper answers at once every pair with the same letters, and every swapped pair where only one of the two names is the first name of other dancers, which is then kept in front: "Madeleine Barbez", not "Barbez Madeleine". "Thomas Martin" and "Martin Thomas" stay to be answered, as both can be first names. A nickname it can't find goes in Rapprocher deux noms. Only the statistics change: the sign-ups and the soirées' lists keep what was typed, and every choice can be undone at the bottom of the page. The choices are in the dancer_matches table: on OVH, run src/Events/db/create-dancer-matches-table.sql once in phpMyAdmin before deploying.
/photos is a gallery of the soirées' photos, each album behind its password, if it has one (the Photos module). It's dark, like a photographer's gallery: /photos lists the albums by collection, and each album (/photos/semaine-5-26-27) has a breadcrumb, its photographer, a button for administrators to download it all as a .zip, tabs, and the photos in columns, uncropped.
-
Albums: one per soirée ("Semaine 5 26-27"), in a collection (the quadrimestre: "Q1-26-27"), with an optional photographer, linked to its event. They're listed by their soirée's date, newest first (albums without a soirée, by when they were made), and albums without photos aren't shown. The cover is the first photo, or the one picked with ☆ on the album's admin page. When uploading, an optional tab ("Photobooth") puts the photos in a tab of the album, next to "Toutes les photos".
-
Passwords: optional, set on each album's admin page (photographers too) and given to its dancers. An album without one is public: everyone sees it. A new album starts with the "Mot de passe des photos" of its event (admin > Événements), which can be changed or removed. Passwords are kept readable so the team can find them again, and typed case-insensitively. Visitors who give one get a cookie for that album for 30 days; changing it locks out everyone who used the old one. The column comes from a migration, which gives existing albums their event's password; on OVH, run
src/Photos/db/add-album-access.sqlin phpMyAdmin before deploying. -
Upload and delete: on
/admin/photos, for everyone logged in: make an album, then drop the photos on its page: the browser makes them smaller (2400px) and sends them one by one, so the server's upload limit isn't a problem. The server keeps 480, 960 and 1600px WebP copies for the grid and the viewer, and saves photos again without their EXIF data (GPS position). -
Cookies: each holds an HMAC of the album's id and password, keyed with
storage/photo-cookies.key, which the site makes the first time it's needed. Nobody can try passwords by making cookies. If the file is lost, a new one is made and visitors give their passwords again. -
Storage:
storage/photos/, outside the web root and not in git, so the files are only sent byPhotoFileActionto visitors with the password.bin/deploy.shnever touches that folder: back it up with the database. -
Photographers: the Photographe login (pick it on
/login) only opens/admin/photos: albums, uploads and deletes. Every other admin page sends it back there, and it never shows the events or the deletion requests: it sets each album's password on the album's page. Logged in, photographers see every album on/photoswithout a password. Give it a password, and change it, in Paramètres > Utilisateurs: until then nobody can log in with it. The role comes from a migration; on OVH, runsrc/Photos/db/add-photographer-role.sqlin phpMyAdmin. -
Descriptions: under each photo on its album's admin page, a sentence saying what it shows: screen readers read it for the photo in the album and in the viewer (the photo's text alternative, WCAG 1.1.1). Each is saved as soon as it's written; Enter goes to the next photo. The column comes from a migration; on OVH, run
src/Photos/db/add-photo-description.sqlin phpMyAdmin before deploying. -
Deletion requests: in the viewer, "Demander la suppression" sends a name, an optional email and a message. The team gets an email at
CONTACT_EMAIL, a card on the dashboard, and the request on/admin/photos, where it can delete the photo or ignore the request. -
Database: the tables (and the events'
photos_passwordcolumn) come from a Phinx migration. With no SSH on OVH, runsrc/Photos/db/create-photos-tables.sqlonce in phpMyAdmin before deploying.
In admin > Événements, pasting the link of the Rock Fever Page's post that announces a soirée (any link Facebook gives: Copier le lien, the post's date, a photo) fills the event's description with the post's text, to read over before saving. The link itself isn't saved. FacebookPosts looks for it among the Page's 50 latest posts with the Graph API.
It has to be a post: Facebook only lets its Marketing Partners read events, so an event's link (facebook.com/events/…) can't fill anything. That one still goes in the "Lien vers l'événement Facebook" field.
Setting it up, once. The site reads the posts with a token of the Page, made by someone who is an admin of the Page:
- On developers.facebook.com, create an app (use case: Other, type: Business). Leave it in development mode: its admins can use it without App Review.
- In the Graph API Explorer, pick that app and Generate Access Token with the permissions
pages_show_list,pages_read_engagementandpages_read_user_content, choosing the Rock Fever Page. - Paste that token into the Access Token Debugger and click Extend Access Token.
- Back in the Explorer, with the extended token, run
GET me/accountsand copy Rock Fever'saccess_token. The debugger should say it never expires. - Over SFTP, add it to the server's
config/database.php:'facebook.page_token' => '…',(the file stays on the server and isn't in git).
The token stops working if its owner leaves the Page's admins, changes their Facebook password, or deletes the app: the form then shows Facebook's reason, and steps 2 to 5 make a new one.
Facebook posts are full of emojis: if they come out as ?, run src/Events/db/events-utf8mb4.sql once in phpMyAdmin.
- No CSS or JavaScript framework.
www/css/base.cssholds the base styles (grid, helpers, colors, cards, buttons, top bar, side menu, forms, tables): the rules of Materialize 1.0 (MIT, its project stopped in 2018) that the public pages and the admin use, kept readable and now ours to change;style.csscomes after it with the site's own design.www/js/script.jsdrives the widgets with plain JavaScript and the classes Materialize's CSS styles: side menu, the admin's dropdown, parallax headers, tooltips, modals (<dialog class="modal">, opened by a.modal-triggerlink to them), collapsibles, card reveals, floating labels and growing text areas. Dates and times use the browser's own pickers (field(…, {type: 'date'})), selects are native.www/js/guests.jsruns the sign-up list at the door. There's no jQuery: write new scripts the same way, without inlineonclick=attributes. views/critical.cssholds the CSS rules the public pages need for their first paint:layout.twiginlines it and loads the full stylesheet in the background. That stylesheet,www/css/site.css, is the part ofbase.cssthe public pages use (plus the classesscript.jsadds) followed bystyle.css, in one file so both apply at once (about 37 KB, against 94 KB for both); the admin loads all ofbase.css. Both files are built bybin/critical-css.phpat every deploy, from this commit's pages on a test database and from the live pages, so they're not in git. Without them (a fresh checkout), the pages load all ofbase.cssandstyle.cssthe usual way. To build them locally:php bin/critical-css.php https://www.rockfever.be http://127.0.0.1:8000. A class ofbase.cssthat no page used when it was made isn't in it: copy the rule from Materialize 1.0.0'smaterialize.cssif a page needs it.script.jsstarts loading once the browser reports the first paint, so on slow connections it doesn't delay it (the menu and forms work a moment later).- CSS and JS URLs carry a version made from the file (
asset()inlayout.twig,AssetExtension), sowww/.htaccesslets browsers keep them for a year: a changed file gets a new URL. www/fonts/material-icons.woff2andwww/fonts/mdi.woff2only contain the Material Icons and Material Design Icons (mdi mdi-…) used in the templates. After using a new icon, runbin/subset-icons.sh(needsbrew install fonttools): it rebuilds both fonts, themdi-…rules at the end ofwww/css/style.css, and the?v=of the font URLs.- The public pages use Inter, self-hosted in
www/fonts/inter.woff2(Latin characters, one variable file for every weight, license ininter-LICENSE.txt).layout.twigpreloads it; if you replace the file, change its?v=there and inwww/css/style.css. - Photos uploaded in the admin are scaled down to 1600px, and smaller WebP copies (320 to 1280px) are saved in
www/images/about/sizes/. ThelazyImagesTwig filter offers them in asrcsetfor images that have awidth. For photos uploaded before that, runphp bin/resize-images.php. An image pasted into the editor rather than uploaded is kept in the text as base64:lazyImagessaves it once inwww/images/about/pasted/(not in git) and points to that file, so it doesn't weigh down every page. - Reading the session doesn't start one (
PHPSession): a visitor's pages come without a session cookie and without PHP'sno-storeheaders, so browsers can show them again instantly from their back/forward cache. A session starts when something is saved in it (a sign-up, a message, a login). - After a sign-up,
/eventopens a popup to add the soirée to a calendar:EventActionqueuessign_upfor the next page withFlashService::event(). Links withdata-close-modalclose it (www/js/script.js).
www/robots.txtlets every crawler in, AI training included (Content-Signal: ai-train=yes), except/adminand/login.www/llms.txtsums up the site and its pages for language models, andwww/AGENTS.mdtells agents what they may do (no form sent without the person's request). Update them when pages change.- Every page answers in Markdown (its
<main>only) when asked withAccept: text/markdown:MarkdownMiddleware. layout.twigmarks up Rock Fever as a schema.orgOrganization. The home and calendar pages list the coming soirées asDanceEvents, and/eventand each soirée's page mark up theirs, all fromCalendar::toSchema(dates with their offset, address, both prices with the sign-up's availability,EventCancelledfor a cancelled one)./api/eventsgives every soirée as JSON, past and to come (Calendar::toApi), withnext,nextSummary(the next soirée in one sentence) andsuggestions(what an assistant can offer next: add it to a calendar, a reminder when its sign-ups open, subscribe to every date;Calendar::toSuggestions), each one'ssummary,themeandthemeNote, sign-up state, opening and closing times, and the fields the form needs./mcpis a Model Context Protocol server, so assistants can read the soirées and sign someone up without opening the site:McpActionspeaks the protocol,McpToolsholds the tools. In ChatGPT, it has to be added first: on chatgpt.com/plugins, Add custom MCP server with the addresshttps://rockfever.be/mcpand no authentication, then@it in a new conversation; after changing the tools, press Refresh there. Browsers can only call it from the sites ofMcpAction::ORIGINS. An assistant without it can still give the link/event#firstname=…&lastname=…, which fills the form (script.js) for the person to send: in the fragment, so the name doesn't reach the server. A sign-up takes two steps,prepare_registration(saves nothing) andconfirm_registration, under the same rules as the form of/event. A sign-up is an ordinary line of the door list: nothing else is kept, so cancelling goes through the team, and the answer doesn't show whether a name was already on the list. There is no login, as on the form, so the protection is a limit per IP address (McpTools::MAX_SIGN_UPS). The site also offers its forms to agents in the visitor's own browser with WebMCP (registerForm.twig): that one needs the visitor on the page,/mcpdoesn't./sitemap.xmlis built bySitemapAction: the public pages and the page of each soirée still to come. Past soirées' pages and/musicarenoindex, so search results (and Google's sitelinks) only show what's coming.www/.htaccesssends the security headers (HSTS, CSP, nosniff…) on every response.
Every push to main runs .github/workflows/deploy.yml. It installs the Composer dependencies, checks PHP syntax, runs PHPStan and bin/smoke-test.sh on a copy of the site with a test database, and only then uploads the project over SFTP to the OVH hosting root: a push that fails a check doesn't go live. It needs the FTP_PASSWORD and FTP_HOST secrets of the production environment. After the upload it checks that the live pages get both Content Security Policies, which only the server can show: php -S ignores www/.htaccess.
Who can change the site: main only takes pull requests whose test check passed (the Protect main ruleset in the repository's settings), and force pushes and deleting it are refused. The production and repo-bot environments only give their secrets to workflows running on main, so one pushed to another branch can't read them. Only a deploy key can skip the ruleset: MAIN_PUSH_KEY, in repo-bot, with which readme-screenshots.yml and update-cjxl.yml commit by themselves (bin/push-main.sh).
The PHP version on OVH is set in OVH's control panel (Hosting > General information > Global configuration), which writes .ovhconfig in the hosting root: that file isn't in the repo, and the deploy never uploads or deletes it. Keep only that one: an .ovhconfig in www/ or an editor backup (.ovhconfig~) next to it took the site down on 2026-11-14. When you change the version there, change config.platform.php in composer.json to match: the checks read it.
Updates install themselves, major versions included, with no one needing to do anything. Every night, Dependabot (.github/dependabot.yml) looks for new versions of the Composer packages (for the PHP version in composer.json's config.platform, the server's) and of the JavaScript libraries: TinyMCE, its French translation, clipboard.js and Masonry, loaded from jsDelivr at the versions in package.json, which cdn() in the templates reads (nothing is installed with npm; the site's own scripts and styles use no library). Minor and patch releases come in one pull request per ecosystem, each major version in its own. A release isn't offered the day it comes out: Dependabot waits a few days first (its cooldown, visible as "Filtered out … due to cooldown" in its "Dependabot Updates" runs in the Actions tab), so a broken or hijacked release is usually withdrawn before it reaches the site.
Every pull request is tested on a copy of the site by .github/workflows/test.yml (bin/test.sh): PHP syntax, PHPStan, every main page answering (bin/smoke-test.sh) and their scripts working in Chrome (bin/browser-test.mjs: the side menu, dropdown, tooltips, collapsibles, modals, the date fields, the list at the door, TinyMCE, the gallery). A Dependabot update that passes is merged and deployed, whatever its version. One that fails stays open with its test output and the site stays on the previous version; .github/workflows/dependabot-retry.yml tests it again merged with main after every change to main and once a day, so it goes live as soon as the code (or the tests) is fixed to work with it, or a newer release replaces it.
The JPEG XL encoder the server uses (cjxl, from libjxl's GitHub releases, which Dependabot can't follow) is pinned in bin/cjxl.version. Every Monday, .github/workflows/update-cjxl.yml raises it to libjxl's newest release, checked against the SHA-256 GitHub gives for the file, and deploys it once bin/fetch-cjxl.sh has tested that it makes JPEG XL copies the way the site does.
To run the same checks locally: composer migrate && composer seed, composer serve, then in another terminal bin/smoke-test.sh, node --experimental-websocket bin/browser-test.mjs (Node 20; plain node from 22) and composer analyse.
The screenshots at the top of this README come from the live site and update themselves: after every deploy, and every Monday for what changes from the admin, .github/workflows/readme-screenshots.yml runs bin/readme-screenshots.mjs, which opens rockfever.be in headless Chrome, takes the home page on a computer (desktop.jpg) and the home page, the calendar and the photos on phones (phones.webp), and commits them when the page looks different. To change which pages the phones show, edit PHONE_PAGES in the script. The banner isn't a screenshot and stays as it is. To take them by hand: node --experimental-websocket bin/readme-screenshots.mjs (plain node from 22).
The code is open source under the Apache License 2.0. The Inter font keeps its own license (www/fonts/inter-LICENSE.txt), and the photos and the Rock Fever name and logo stay Rock Fever's.


