# Prompt: your own UI from the JSON

Source: https://help.ruuster.com/idx/prompt-own-ui

> Your own listing card and page markup from the API's JSON, with a test that proves every board's display rules are met.

This prompt builds your own markup from the JSON, following [rendering JSON yourself](https://help.ruuster.com/idx/guide-render-json-yourself), with `assertDisplayable` tests.

## The prompt

```text
Read RUUSTER_IDX.md first and follow its MUST and NEVER rules. Ask me if it doesn't cover something.

Build my own listing card and listing page markup from the API's JSON instead of the recipe components, following <https://help.ruuster.com/idx/guide-render-json-yourself> and <https://help.ruuster.com/idx/recipe-components>. Before you write markup, read GET /v1/meta compliance and meta.mls on every answer, and meet every required element for each board and placement. That means the attribution line on every card where the board requires it, the attribution and courtesy lines on every listing page, and every board's disclaimer and logo and the "Data last updated" line on every page that shows listings. Use assertDisplayable from @ruuster/idx in a test for every card and page you build. Show only the address, photos and pins the API returned: a hidden address has no street and no pin.

Use these environment variables: IDX_SECRET_KEY (server only), SITE_ORIGIN and SITE_NAME. Never paste a secret key into a chat, and never put IDX_SECRET_KEY in browser code, a URL or a log. No key goes in any page: my pages call my own /api/idx route, made with createListingsRoute from @ruuster/idx/route, which adds my secret key on the server (on a site with no server, the widgets call the API with no key from my approved website address).

Fair housing: describe homes, places and amenities only. Never describe the people who live in an area or who a home or area suits, and never rank schools as a reason to buy.

When you are done, show me the test that proves every card and page passes assertDisplayable.
```

## What it builds

- your own card and listing page components, reading `meta.mls` and each listing's compliance
- a test that runs `assertDisplayable` over every card and page

## How to check it

1. Run the test the assistant shows you: it passes for every board in your account.
2. View a card from each of your boards and find its attribution line, and the disclaimers and update line under the results.

## Before you paste it

Follow the setup on [Build it with your AI coding assistant](https://help.ruuster.com/idx/build-with-ai) once: `RUUSTER_IDX.md` at the root of your project, the two lines in `CLAUDE.md` or `AGENTS.md`, and your keys in `.env.local`. Never paste a secret key into a chat. Replace the text in square brackets with your own before you send the prompt.
