Dev.to WebDev πŸ›  Dev πŸ‘ 0 πŸ“– 3 min read

Building an editorial real estate site with Next.js 16, Keystatic and Tailwind 4 (no database)

Most real estate websites look the same: a search bar, a grid of cards, a map. For ESTORA I wanted the opposite: a site for boutique agencies that reads like an architecture magazine, with big imagery, serif headlines an

Most real estate websites look the same: a search bar, a grid of cards, a map. For ESTORA I wanted the opposite: a site for boutique agencies that reads like an architecture magazine, with big imagery, serif headlines and calm motion.

Here are five decisions that shaped the project, with the code behind them.

πŸ‘‰ Live demo: https://estora-bay.vercel.app

1. A CMS without a database: Keystatic

Agencies need to edit listings themselves, but a small site doesn't need a database to host and pay for. Keystatic stores content as JSON files in the repo and gives you an admin UI at /keystatic.

The nice part is that one setting switches between local editing and production editing:

// keystatic.config.ts
const githubRepo = process.env.NEXT_PUBLIC_KEYSTATIC_GITHUB_REPO as `${string}/${string}` | undefined;

export default config({
  storage: githubRepo ? { kind: "github", repo: githubRepo } : { kind: "local" },
  // collections: properties, journal, testimonials…
});
  • Locally, the panel writes straight to /content/*.json.
  • In production, edits become commits to a GitHub repository, and the host redeploys automatically.

No database, no extra server, and the content is version-controlled for free.

2. Filters that live in the URL

On the properties page every filter (destination, type, bedrooms, price, sort…) is stored in the query string. Searches are shareable, the back button works, and a refresh never loses state.

const filters = useMemo(
  () => parseFilters(new URLSearchParams(searchParams.toString())),
  [searchParams],
);

const update = (patch: Partial<PropertyFilters>) => {
  const params = filtersToParams({ ...filters, ...patch }).toString();
  startTransition(() => {
    router.replace(params ? `${pathname}?${params}` : pathname, { scroll: false });
  });
};

Two details that made it feel fast:

  • router.replace (not push), so every click doesn't add a history entry.
  • The keyword box keeps local state and only updates the URL after a short pause, so typing stays instant.

3. Motion that respects the visitor

The site uses Framer Motion for word-by-word headline reveals, image reveals and page transitions. All of it switches off for people who ask their OS to reduce motion, with one line at the root:

<MotionConfig reducedMotion="user">{children}</MotionConfig>

4. Dark mode with "dark surfaces"

The design has dark sections (like the hero) inside the light theme, and light cards inside the dark theme. Instead of dark: variants everywhere, colors are CSS variables that a data-surface attribute can flip locally:

:root[data-theme="dark"] {
  --color-ivory: #131210;
  --color-charcoal: #ece6db;
}
[data-theme="dark"] [data-surface="dark"] {
  --color-ivory: #f4efe6;
  --color-charcoal: #1b1917;
}

Components just use bg-charcoal text-ivory, and they look right on any surface in either theme.

5. Forms that don't trust the browser

Every form (contact, viewing request, newsletter) is validated again on the server, and every endpoint goes through the same small guard:

  • a same-origin check (browsers always send Origin on POST),
  • a rate limit per IP and route,
  • a honeypot field,
  • optional Cloudflare Turnstile.
export function isSameOrigin(request: Request) {
  const origin = request.headers.get("origin");
  if (!origin) return true; // non-browser clients are still rate-limited
  try {
    const host = request.headers.get("x-forwarded-host") ?? request.headers.get("host");
    return new URL(origin).host === host;
  } catch {
    return false; // malformed Origin header
  }
}

Form contents are never written to the server logs. Without a webhook configured, the form honestly tells the visitor the message wasn't sent, instead of silently dropping it.

Stack

Next.js 16 (App Router) Β· React 19 Β· TypeScript Β· Tailwind CSS 4 Β· Framer Motion Β· Keystatic Β· Lucide icons

What I'd love feedback on

  • Does the editorial style work for real estate, or is it too "magazine"?
  • How does it feel on your phone?
  • Anything you'd do differently with Keystatic in production?

Thanks for reading! The demo is here: https://estora-bay.vercel.app.

ESTORA is also available as a template if you build sites for real estate clients: https://falconstudio.gumroad.com/l/uburtj

πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.