Homesk: Back Office Rebuilt on the Existing Sign-in
An Angular application at its limits, replaced by a rebuild that keeps the existing Entra ID registration and the established domain interface.
Services Used
The situation
Homesk manages properties from acquisition through to the existing portfolio. The back office in place was an Angular application that had reached its limits. What was needed was a rebuild that keeps the existing sign-in and the established domain interface, so the interface and the foundation would not have to be replaced at the same time.
The solution
I rebuilt the back office with Next.js and React and deliberately kept the existing Entra ID registration. Sign-in runs over OpenID Connect in the authorization code flow with PKCE, as a confidential client. Permissions arrive as app roles in the claims of the ID token and are checked server side. I implemented the silent renewal myself: the access token is checked against its expiry with a 60 second safety margin and renewed through the refresh token. If that fails, a named error state lands in the session instead of the application dropping silently into a signed out state. Internal domain data is fetched on behalf of the signed in user, passing their token along rather than working with a technical service account. Energy certificates are read automatically through document recognition. From market data the application derives a price range, using the 25th and the 75th percentile of the square metre price. If the living area is missing or implausible, the function returns no result rather than an estimate: in a property valuation a missing figure does less damage than a wrong one. When cleaning up orphaned images, the library in use offers no listing, so complete detection is not possible; that is recorded in the code rather than glossed over. Connected portals get a separate public read interface with managed keys, deliberately outside the user sign-in.
The result
Properties, buildings, energy certificates and leads live in one application, spread across 9 tables and 28 interfaces. For the users the switch was a change of interface, not a new sign-in. The client relationship has existed since 2015.