A standalone web application for generating creative engagement messages for Gen Z teens using Claude AI.
- 🎨 Theme selection (8 different themes + random)
- 📱 Mobile-friendly shadcn/ui interface
- 🚀 Fast generation with Claude Sonnet 4.5
- 📋 One-click copy to clipboard
- 💰 Cost-optimized deployment (auto-stop on Fly.io)
- Frontend: Next.js 16 with App Router, shadcn/ui, Tailwind CSS
- Backend: FastAPI (Python 3.11)
- AI: Anthropic Claude Sonnet 4.5
- Deployment: Docker + Fly.io
- Python 3.11+
- Node.js 20+
- npm
-
Clone and navigate to the project:
cd engage -
Set up environment variables:
cp .env.example .env # Edit .env and add your CLAUDE_API_KEY -
Install backend dependencies:
pip install -r backend/requirements.txt
-
Install frontend dependencies:
cd frontend npm install cd ..
-
Run backend (in one terminal):
uvicorn backend.main:app --reload --port 8080
-
Run frontend (in another terminal):
cd frontend npm run dev -
Open browser:
- Development: http://localhost:3000
- Backend API docs: http://localhost:8080/docs
cd frontend
npm run build
cd ..uvicorn backend.main:app --host 0.0.0.0 --port 8080docker build -t engage .docker run -p 8080:8080 -e CLAUDE_API_KEY=your_key_here engagefly launch
# Follow prompts (use existing fly.toml)fly secrets set CLAUDE_API_KEY=your_claude_api_key_herefly deployfly status
fly logsGET /health- Health check endpointPOST /api/generate- Generate message- Request body:
{"theme": "random" | "meme/internet culture" | ...} - Response:
{"content": "...", "theme_used": "..."}
- Request body:
The app is configured for minimal costs on Fly.io:
min_machines_running = 0- Machines stop when idleauto_start_machines = true- Start on request (~1-2s cold start)- Shared CPU instance (smallest size)
- Static frontend served directly from backend
Expected cost: < $5/month with light usage
engage/
├── backend/
│ ├── main.py # FastAPI app
│ ├── services/
│ │ └── message_generator.py # Claude integration
│ └── requirements.txt
├── frontend/
│ ├── app/ # Next.js pages
│ ├── components/ # React components
│ └── package.json
├── Dockerfile # Multi-stage build
├── fly.toml # Fly.io config
└── docs/
└── plans/
└── 2025-11-12-message-generator-design.md
Private project