SMS-based AI receptionist for medical spas with deposit collection via Square.
Tech Stack: Go 1.24, PostgreSQL, Redis, AWS (Bedrock for Claude, SQS, ECS) Messaging: Telnyx (primary), Twilio (fallback) Payments: Square OAuth + checkout links
See docs/MVP_STATUS.md for full details. Key gaps:
- Client portal authentication + onboarding
- Operational playbooks/runbooks
- Production clinic knowledge content
Stop working only when ALL acceptance tests pass:
go test -v ./tests/...If any test fails, fix it and continue working.
- Fix any failing tests first
- Complete features from MVP_STATUS.md gaps
- Write tests for new code
- Update documentation
# Quick unit tests
make test
# Full test suite with coverage
make cover
# MVP acceptance tests (THE stopping condition)
go test -v ./tests/...
# E2E tests (requires running API)
python scripts/e2e_full_flow.py# Build all
go build -v ./...
# Build API binary
go build -v -o bin/medspa-api ./cmd/api
# Docker
docker compose up --build- Use standard Go formatting:
gofmt -s -w . - Run
go vet ./...before committing - Table-driven tests preferred
- Error wrapping with
fmt.Errorf("context: %w", err)
cmd/ # Entry points (api, workers)
internal/ # Private packages
http/handlers/ # HTTP handlers
conversation/ # AI conversation engine
payments/ # Square integration
messaging/ # SMS (Telnyx/Twilio)
leads/ # Lead capture
clinic/ # Clinic config
pkg/ # Public packages
scripts/ # Operational scripts
tests/ # Acceptance tests
migrations/ # Database migrations
- New features require tests
- Handlers need request/response tests
- Services need unit tests with mocks
- Use
testify/assertandtestify/require
internal/conversation/service.go- Main conversation orchestrationinternal/conversation/llm_service.go- Claude/Bedrock integrationinternal/conversation/deposit_sender.go- Square checkout links
internal/http/handlers/telnyx_webhooks.go- Telnyx webhook handlinginternal/messaging/handler.go- SMS processinginternal/messaging/twilioclient/- Twilio client
internal/payments/square_checkout.go- Checkout link generationinternal/payments/handler.go- Payment webhooksinternal/payments/oauth.go- Square OAuth
DATABASE_URL=postgresql://medspa:medspa@localhost:5432/medspa?sslmode=disable
REDIS_URL=redis://localhost:6379
SMS_PROVIDER=twilio # or telnyxAWS_REGION=us-east-1
BEDROCK_MODEL_ID=anthropic.claude-3-haiku-20240307-v1:0
TELNYX_API_KEY=...
TWILIO_ACCOUNT_SID=...
TWILIO_AUTH_TOKEN=...
SQUARE_APP_ID=...
SQUARE_APP_SECRET=...- Client portal authentication (Cognito)
- Clinic profile management UI
- Square OAuth connect in portal
- Telnyx 10DLC registration in portal
- Remove TWILIO_SKIP_SIGNATURE for production
- E2E test documentation update
- Webhook tunnel runbook
When running autonomously:
- Run
go test -v ./tests/...to check current status - Fix any failing tests
- Check
docs/MVP_STATUS.mdfor next work item - Implement feature with tests
- Run full test suite
- Update MVP_STATUS.md with progress
- Repeat until all acceptance tests pass
# Development
make run-api # Start API server
make run-worker # Start messaging worker
docker compose up -d # Start all services
# Database
make migrate # Run migrations
psql $DATABASE_URL # Connect to DB
# Testing
make test # Unit tests
make cover # With coverage
go test -v ./tests/... # Acceptance tests
# Linting
make fmt # Format code
make vet # Static analysis
make lint # Full lint check- Always read the file before editing
- Run tests after each significant change
- Prefer small, focused commits
- Don't add features beyond MVP scope
- Keep solutions simple - avoid over-engineering
- Update MVP_STATUS.md when completing items