Pular para o conteúdo

Frontend Overview

The frontend of RedeCasas is entirely static HTML generated by the Go site generator. There is no React, Vue, or other client-side framework for the main site — just HTML, CSS, and vanilla JavaScript.

Output Structure

All frontend assets are written to site/public/:

site/public/
├── index.html
├── casas/
├── jardim/
├── condominios/
├── blog/
├── chat/
├── login/
├── register/
├── conta/
├── static/
│ ├── css/
│ ├── js/
│ └── images/
└── sitemap.xml

JavaScript

Auth Helper

site/public/static/js/auth.js provides a simple API for authentication:

<script src="/static/js/auth.js"></script>
<script>
await auth.register({ email, password, name });
await auth.login({ email, password });
const { user } = await auth.getMe();
</script>

Chat Widget

The /chat/ page is a standalone application that loads its own JavaScript bundle for the AI chat interface.

Styling

The site uses Tailwind CSS utility classes. Styles are compiled and copied to site/public/static/css/ during the build process.

Images

Images are stored in:

  • site/public/static/images/ — Site assets (logos, icons, backgrounds)
  • R2 bucket — User-uploaded listing images

Performance

Because pages are static HTML:

  • First Contentful Paint: Near-instant
  • Lighthouse scores: Typically 95+ for performance
  • No hydration cost: No JavaScript frameworks to boot on the client