Getting Started
RedeCasas is a Brazilian real estate platform that generates tens of thousands of SEO-optimized static pages and provides interactive services through Cloudflare Workers.
Project Structure
The repository is organized into several top-level directories:
| Directory | Purpose |
|---|---|
site/ | Go-based static site generator and templates |
auth-worker/ | Email/password authentication worker |
billing-worker/ | Stripe subscription management worker |
listings-worker/ | Property listings CRUD and image upload worker |
chat-worker/ | AI chat, search, and WebSocket worker |
shared/ | Common TypeScript utilities (CORS, auth types) |
db/ | SQLite/D1 schema, migrations, and seeder |
qa/ | Playwright end-to-end testing suite |
scripts/ | Dev orchestration, daily build, deployment helpers |
requests/ | Bruno API request collections |
Prerequisites
- Go (for the site generator)
- Node.js and npm (for workers, QA, and docs)
- SQLite3 (for local database)
- rclone (for deployments to R2)
Quick Start
1. Start the Development Environment
The unified dev environment starts the static site and all 4 Workers behind a proxy:
node scripts/dev.js- Site: http://localhost:3000
- API (via proxy): http://localhost:3000/api/auth/register
- Chat Worker: http://localhost:8787
- Auth Worker: http://localhost:8788
- Billing Worker: http://localhost:8789
- Listings Worker: http://localhost:8790
2. Build the Site
cd sitego run . build-pages3. Run the QA Suite
cd qanpm installnpx playwright install chromiumnpm run test:critical4. Start the Docs Site
cd docsnpm installnpm run devDocs will be available at http://localhost:4321.