Modelling the landlord who isn’t there
Most rental software assumes both sides of a tenancy are on the platform. That assumption fails for many tenants — so Rentra had to represent the relationship before the landlord arrives.
The first version of most rental-management software makes a quiet assumption: the landlord signs up, adds a property, and invites tenants. Every record begins on the landlord’s side. When I started building Rentra in June 2026, I began from that assumption too. The first entities in the repository were users and the passkeys a landlord issues to tenants.
It took about two weeks for the assumption to break. If Rentra only works once a landlord has joined, then a tenant whose landlord never joins gets nothing: no rent history, no reminders, no record of what they have paid. For a product meant to make rental life more orderly, the tenant is often the person who most needs that record.
Two kinds of tenant
Rentra now distinguishes two kinds of tenant. A managed tenant is linked to a real tenancy: a unit, in a building, in a landlord’s portfolio. An independent tenant is someone whose landlord is not on Rentra. They declare their own rental — a name for the property, the rent, how often it is due, and where it is paid — and Rentra keeps the record on their behalf.
In the code, that self-declared rental is its own entity, a ShadowRentalRelationship, rather than a tenancy with some fields left empty. There were three reasons for keeping it separate:
- A managed tenancy has an owner on the other side; a self-declared rental has only the tenant’s word. Mixing them in one table would mean every query about rent, arrears, or occupancy has to ask which kind of record it is looking at, and every authorisation rule has to account for a landlord who might not exist.
- The information is genuinely different. A self-declared rental records where rent is actually paid — an M-Pesa Paybill, a Till number, or a bank — and allows daily, weekly, or monthly billing cycles, because those are the facts a tenant knows. A managed tenancy gets its structure from the landlord’s records instead.
- It keeps uncertainty visible. Each self-declared rental carries a status — unverified, converted, or ended — so nothing about it pretends to be confirmed.
When the landlord arrives
The interesting part is what happens when the absent landlord joins. Rentra’s answer is a passkey: a code the landlord generates for a specific unit. A new tenant can redeem it to register directly as a managed tenant. An independent tenant who already has an account can redeem it to link that account to the real unit.
What is not built yet is the step after that: carrying the self-declared rental’s history across into the managed tenancy. The converted status exists in the schema, but no code path sets it, and payments are not yet linked to self-declared rentals at all. I would rather leave that gap visible than paper over it, because merging two records about the same rental is where the hard questions live. Which rent amount wins if the two disagree? Does a payment the tenant recorded become confirmed once the landlord can see it, or only once the landlord agrees?
Roles are not ownership
The second modelling lesson came later, when I added role-based authorisation. Rentra has three roles — tenant, landlord, and caretaker — and the backend enforces them with guards on its controllers, so a modified mobile client cannot grant itself permissions.
Role checks answer one question: is this kind of user allowed to do this kind of thing? They do not answer the question that matters most for a tenant’s data: is this your record? The tenant role permits viewing a tenancy; it must not permit viewing someone else’s. That second check, ownership scoping, is still being built, and it is a different mechanism, because it depends on the relationship between a specific user and a specific record rather than on a label attached to the user.
Caretakers expose the same gap from the other side. A caretaker acts on a landlord’s behalf — but for which buildings? There is not yet an entity that scopes a caretaker to particular properties, so the role exists without the relationship that would make it safe to grant widely.
Two vocabularies
One smaller decision has held up well. Internally, the backend talks about organisations and rooms; people using the app see a property portfolio and units. The internal names are precise and stable, and the product names are the ones people actually use. Keeping them apart lets the data model be refactored without rewriting the interface, and lets the interface speak plainly without leaking database concepts.
What I took from it
Domain modelling is mostly the work of noticing which real situations your first schema cannot represent. The absent landlord is not an edge case in the markets Rentra is designed for; I suspect it is closer to the norm. Giving it its own entity, with an explicit status and an explicit path to becoming something else, made the system more honest about what it actually knows.
The repository’s README now lists, line by line, which of these pieces exist in code and which do not. That list has been almost as useful to me as the code itself.
Originally published on DEV Community.