← All work
Application SaaS Energy NDA · architecture only

EPIQR Renovation Platform

A web platform for planning building renovations: diagnose each element of a building, model interventions as scenarios, compare energy savings and costs, and export the report.

Role
Full stack developer
Year
2023
Stack
MySQL · PHP · React · Stripe · Symfony
Links
Architecture — a building, its scenarios, the report
Browser
Client · React React + Redux app
Web Workers Building loader
Output react-pdf report
Symfony API
Auth LexikJWT
Service · core REST controllers
Domain Services · validators
Data
ORM Doctrine · events
Database MySQL
Third party
Payments Stripe
Email SMTP mailer
Architecture — a building, its scenarios, the report: 1. spa → auth: login → JWT; 2. spa → workers: open building; 3. workers → ctrl: GET building; 4. ctrl → services: validate · compute; 5. services → orm: entities; 6. orm → db: SQL; 7. ctrl → workers: scenarios; 8. workers → pdf: scenario data; ctrl → stripe: checkout · portal; ctrl → mail: reset mail
01 — Problem

A heavy model in a browser tab

One building carries dozens of elements, diagnoses, interventions and scenarios in three languages. Loading and recalculating that froze the page, and every report had to come out as a printable PDF.

02 — Role & team
  • React / Redux front end: building, diagnosis, scenario and report screens
  • Web Workers for loading and updating building structures
  • Symfony 5 REST controllers, services and validators
  • Stripe checkout and customer portal
  • Vagrant dev environment and onboarding docs
03 — Stack
Front end
React Redux Material UI Chart.js

Many forms and tables per building, shared state across screens.

Reports
react-pdf react-intl

PDF reports built in the browser, in English, French or Spanish.

API
Symfony 5.4 PHP 8 LexikJWT

REST controllers over a large Doctrine model; stateless JWT auth.

Data · billing
Doctrine ORM MySQL Stripe

About fifty entities with translation tables; subscriptions through Stripe.

04 — Key decisions
D-01 Web Workers for the building model
Why

Fetching and rebuilding a building's structure runs off the main thread and can be aborted when the user switches building.

Trade-off

Message passing and a worker loader in the webpack build.

D-02 PDF in the browser
Why

Reports are rendered with react-pdf from the data already on screen, so the server needs no PDF stack.

Trade-off

A bigger bundle and client CPU on long reports.

D-03 Rules in Doctrine events
Why

An event subscriber keeps one reference scenario per building, whatever screen or endpoint saves it.

Trade-off

Side effects hidden from the controller that triggered them.