Skip to content
reaatech

Files · Listing Copy Multiplier for Residential Brokers

71 (1 binary, 654.1 kB total)attempt 1

README.md·4057 B·markdown
markdown
# Listing Copy Multiplier for Residential Brokers
 
> Generate MLS, Zillow, social, and brochure copy from one draft in seconds.
 
Listing agents waste hours rewriting property descriptions for each platform — MLS, Zillow, Instagram, Facebook, and printed brochures all want a different tone, length, and emphasis. This recipe solves that by taking a single markdown property draft and generating platform-optimized copy for every channel at once.
 
## Architecture
 
- **Fastify backend** powers the MCP server for tool-based interaction
- **Next.js API routes** provide REST endpoints for browser-based workflows
- **MCP server** exposes copy generation as composable tools for AI agents
- **Document-pipeline archetype** — ingest a draft, transform it per platform, validate and deliver
- **Provider-agnostic LLM** — uses `fetch` to call any OpenAI-compatible API (no vendor lock-in)
 
## REAA packages
 
| Package | Role |
|---|---|
| `@reaatech/agents-markdown` | Markdown parsing and rendering for property drafts |
| `@reaatech/agents-markdown-parser` | Structured extraction of property data from markdown |
| `@reaatech/agents-markdown-validator` | Schema validation for property markdown documents |
| `@reaatech/agents-markdown-mcp-server` | MCP tool definitions for markdown operations |
| `@reaatech/llm-router-core` | Model routing abstractions and request schemas |
| `@reaatech/llm-router-strategies` | Cost-optimized and fallback routing strategies |
 
## API endpoints
 
| Method | Path | Description |
|---|---|---|
| POST | `/api/copy/generate` | Generate copy for one or more platforms |
| GET | `/api/copy/platforms` | List supported platforms and their constraints |
| POST | `/api/copy/validate` | Validate generated copy against platform rules |
 
## MCP tools
 
| Tool | Description |
|---|---|
| `generate_copy` | Generate copy for one or more platforms from a property draft |
| `validate_copy` | Validate generated copy against platform constraints |
| `list_platforms` | List all supported platforms with tone and length rules |
| `regenerate_copy` | Regenerate copy for a specific platform with new instructions |
 
## Environment variables
 
| Variable | Description |
|---|---|
| `LLM_API_KEY` | API key for the LLM provider |
| `LLM_BASE_URL` | Base URL of the OpenAI-compatible API |
| `LLM_MODEL_ID` | Model identifier (e.g. `gpt-4o`, `claude-sonnet-4`) |
| `PORT` | Fastify server port (default `3001`) |
| `MCP_TRANSPORT` | MCP transport mode: `stdio` or `streamable-http` |
 
## Getting started
 
```bash
pnpm install
pnpm dev
```
 
### Example request
 
```bash
curl -X POST http://localhost:3001/api/copy/generate \
  -H "Content-Type: application/json" \
  -d '{
    "property": {
      "address": { "street": "123 Main St", "city": "Austin", "state": "TX", "zip": "78701" },
      "listPrice": 750000,
      "bedrooms": 4,
      "bathrooms": 3,
      "sqft": 2800,
      "yearBuilt": 2020,
      "features": { "bedrooms": 4, "bathrooms": 3, "sqft": 2800, "pool": true, "views": "downtown skyline" },
      "description": "Stunning 4-bedroom home in the heart of Austin with panoramic downtown views..."
    },
    "targetPlatforms": ["mls", "zillow", "social-media", "brochure"]
  }'
```
 
### Example property draft
 
```markdown
# 123 Main St, Austin, TX 78701
 
**Price:** $750,000
**Bedrooms:** 4 | **Bathrooms:** 3 | **Sq Ft:** 2,800
**Year Built:** 2020
 
## Features
- Saltwater pool with waterfall feature
- Chef's kitchen with quartz countertops and stainless steel appliances
- Primary suite with walk-in closet and spa-like bathroom
- Hardwood floors throughout
- Smart home system with security cameras and thermostat
 
## Description
Stunning 4-bedroom, 3-bathroom home in the heart of Austin,
offering panoramic downtown skyline views. This 2,800 sq ft
open-concept layout features a gourmet kitchen, luxurious
primary suite, and a resort-style backyard perfect for
entertaining. Located in a quiet cul-de-sac just minutes
from South Congress dining and shopping.
```
 
## License
 
MIT — see [LICENSE](./LICENSE).