# RateRight Growth Engine

Standalone growth automation system for RateRight.

## Features

- Lead management (import from Google Sheets)
- SMS campaigns via Twilio
- Automated follow-up sequences
- Real-time metrics dashboard
- Admin UI for team

## Tech Stack

- **Runtime:** Node.js 18+
- **Framework:** Express
- **Database:** Supabase (PostgreSQL)
- **Hosting:** Railway
- **SMS:** Twilio

## Quick Start

```bash
# Install dependencies
npm install

# Copy environment variables
cp .env.example .env
# Edit .env with your credentials

# Run development server
npm run dev
```

## API Endpoints

| Endpoint | Method | Description |
|----------|--------|-------------|
| `/` | GET | Service info |
| `/health` | GET | System health status |
| `/health/ping` | GET | Simple ping for load balancers |

## Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `PORT` | No | Server port (default: 3000) |
| `SUPABASE_URL` | Yes | Supabase project URL |
| `SUPABASE_ANON_KEY` | Yes | Supabase anonymous key |
| `TWILIO_ACCOUNT_SID` | Yes | Twilio account SID |
| `TWILIO_AUTH_TOKEN` | Yes | Twilio auth token |
| `TWILIO_PHONE_NUMBER` | Yes | Twilio phone number |

## Deployment

Deployed on Railway. Push to `main` triggers automatic deployment.

## Development

```bash
# Run with auto-reload
npm run dev

# Run tests
npm test
```

---

*Part of the RateRight ecosystem*
