Marty
AI chatbot for Dungeon Books. Recommends books and chats with customers via SMS and Discord.
Full docs in marty/docs/ and marty/README.md.
Character
Martinus Trismegistus — immortal wizard, former software engineer, burnt-out tech worker who now works at the bookstore. Lowercase, casual texting style (u, ur, bc, tbh). 1–3 sentences per message. Confident recommendations without overselling.
Architecture
SMS (Sinch) → FastAPI → Claude API → response
Discord → ↕
Hardcover API (book data)
PostgreSQL (conversations, customers)
Redis (rate limiting, caching)
Key Integrations
| Service | Purpose |
|---|---|
| Claude API | Conversation and recommendation engine |
| Hardcover API | Book search and metadata (GraphQL) |
| Sinch | SMS sending/receiving via webhooks |
| Discord.py | Discord bot with thread management |
| Bookshop.org | Affiliate links for recommended books |
Status
Core infrastructure complete. SMS fully functional. Discord bot implemented, needs token setup for production.
Future: Square API integration for in-chat purchases, analytics.
Dev Commands
just dev # Dev server with hot reload
just test # Run tests
just test-all # Full integration tests (Docker)
just chat # Interactive chat testing