Yesterday, we built the smallest version of a real estate site that actually works: one owner, one password, one door. Anyone could browse, only the owner could publish.
Today, we open the doors. Any property owner can create an account and submit their own listings, complete with a photo. But nothing appears on the public site the moment it is submitted. It waits, quietly, until the site owner looks at it and decides.
Yesterday’s whole security model was one sentence: only the owner has the password. That sentence stops working the moment a second person needs to publish something, because now you need a way to let people in without handing them the keys to everything.
The answer is a queue. Anyone can submit a listing, but a submission is not the same thing as a published listing. It sits in between, in a state we call pending, until a human being with the authority to decide looks at it.
This pattern is everywhere once you notice it. Every app store review, every YouTube comment section with moderation, every marketplace where sellers list products, all of them run on the same idea: letting people contribute does not mean letting their contribution appear instantly.
Yesterday there was one account. Today there is a table of accounts, and each one carries a single flag: is this person the site owner, or just one of the property owners? That one flag decides everything about what happens after someone submits a listing.
If the site owner submits a listing, it can go live immediately, because they already have full authority. If anyone else submits one, it lands in the pending pile instead, and stays invisible to regular visitors until it gets approved. The homepage itself never had to get more complicated to make this work. It simply only ever asks the database for listings marked approved, so a pending one is not hidden by some special rule, it just never matches the question being asked.
I ran the whole flow for real before writing any of this: a property owner signs up, logs in, and submits a listing with a photo. It does not appear on the public homepage. The site owner logs in, sees it waiting in a pending list, and approves it. Only then does it appear.
So the flow is:
A property owner or agent can sign up for an account:
And they can add a listing:
The admin of the website can see the listings added by owners/agents and approve them:
Once the website admin approves, the listing shows on the website:
The complete, working code for today’s exact version, all six files including the upload handling, is ready below.

Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.