StoicBuilder

HandbookI the LudusObjects

Ithe Ludus, Read code

Objects

1 min readUpdated 28 November

In plain words

An object groups related values under named keys, like a QuickBite order with a restaurant, items and a total, so one thing travels as one piece.

Where you see it

Curly braces with name: value pairs inside. A Guildhall member is an object with a name, an email and a role, and each row from your Supabase table arrives as one object.

src/lib/members.tsbrowser
const member = { name: "Ana Ruiz", email: "ana@example.com", role: "moderator",}; member.role; // "moderator"member["email"]; // "ana@example.com"
Each key names a value. A dot or square brackets both read it.

What goes wrong

  1. A typo in a key name

    member.Role or member.roles returns undefined instead of an error, so the page shows nothing and gives no hint why.

  2. Keys that don't match the database columns

    Supabase columns are often written like created_at, while the code reads createdAt. One side has to match the other exactly.

  3. Putting a whole object on screen

    Drop an object into text and you get [object Object]. In React it crashes with "Objects are not valid as a React child", so pick the field you meant, like order.total.

What to tell your agent

Copy this into Lovable, Bolt, Cursor or any agent
Show me the shape of the main object on this page, with every key and an example value, and check each key against the column names in my Supabase table. Fix any mismatch, such as createdAt versus created_at.

Quick check

Sign in to earn +10 XP for it

A Guildhall profile shows the member's name but the role is blank. The code reads member.Role. What's the problem?

Got a prompt that touches objects?

Paste it. You get a better prompt first, then the cards that explain it.

Check your own prompt

Free, no sign-up.