How tanvi-vasoya/tripconsensus works
TripConsensus coordinates group trip planning from trip creation and participant preference collection to AI destination suggestions and a group vote. Participants can submit preferences through a web form or an SMS survey; the README notes that the inbound SMS webhook is not yet connected to survey processing. The graph highlights the service-owned workflow, persistence, AI gateway, and ranked-choice stage. Connections for unsampled routes and services rely on README descriptions rather than inspected implementations.
Main entry points: repositories Repositories · recommendation_service.py Recommendation orchestration · main.py FastAPI app · survey_service.py SMS survey service
Components 25
Application entry
- FastAPI app
app/main.py - Trip routes
app/api/trips.py - Web survey routes
app/api/survey.py - SMS webhook
app/api/sms_webhook.py - Recommendation routes
app/api/recommendations.py - Vote routes
app/api/votes.py
Trip and preferences
- Trip orchestration
app/services/trip_service.py - SMS survey service
app/services/survey_service.py - Web survey service
app/services/web_survey_service.py - Survey engine
app/survey/engine.py - SMS messaging
app/services/sms_service.py
AI recommendations
- Recommendation orchestration
app/services/recommendation_service.py - Prompt renderer
app/prompts/renderer.py - AI gateway
app/gateway/gateway.py - Ollama provider
app/gateway/providers/ollama_provider.py - Recommendation parser
app/ai/recommendation_parser.py
Voting
- Voting orchestration
app/services/voting_service.py - Ranked-choice algorithm
app/algorithms/ranked_choice.py
Persistence and integrations
- Twilio client
app/sms/twilio_client.py - Repositories
app/repositories - Database sessions
app/database.py
Other components
- Trip planner
- Twilio SMS
- LLM service
- PostgreSQL
Connections 30
- Trip planner → Trip routes: creates trip
- FastAPI app → Trip routes: registers
app/main.py - FastAPI app → Web survey routes: registers
app/main.py - FastAPI app → SMS webhook: registers
app/main.py - FastAPI app → Recommendation routes: registers
app/main.py - FastAPI app → Vote routes: registers
app/main.py - Trip routes → Trip orchestration: delegates to
- Web survey routes → Web survey service: submits answers
- SMS webhook → SMS survey service: pending wiring
- Trip orchestration → Repositories: persists trip
app/services/trip_service.py - Trip orchestration → SMS messaging: sends invitations
app/services/trip_service.py - SMS survey service → Survey engine: validates answers
app/services/survey_service.py - SMS survey service → Repositories: saves responses
app/services/survey_service.py - SMS survey service → SMS messaging: sends questions
app/services/survey_service.py - Web survey service → Repositories: saves responses
- SMS messaging → Twilio client: uses client
app/services/sms_service.py - Twilio client → Twilio SMS: sends SMS
app/sms/twilio_client.py - Recommendation routes → Recommendation orchestration: delegates to
- Recommendation orchestration → Repositories: loads trip and surveys
app/services/recommendation_service.py - Recommendation orchestration → Prompt renderer: renders prompt
app/services/recommendation_service.py - Recommendation orchestration → AI gateway: requests generation
app/services/recommendation_service.py - AI gateway → Ollama provider: dispatches to
app/gateway/gateway.py - Ollama provider → LLM service: sends inference request
app/gateway/providers/ollama_provider.py - Recommendation orchestration → Recommendation parser: parses response
app/services/recommendation_service.py - Recommendation orchestration → Repositories: replaces recommendations
app/services/recommendation_service.py - Vote routes → Voting orchestration: delegates to
app/api/votes.py - Voting orchestration → Repositories: reads and writes votes
app/services/voting_service.py - Voting orchestration → Ranked-choice algorithm: runs election
app/services/voting_service.py - Repositories → Database sessions: queries session
- Database sessions → PostgreSQL: connects to
app/database.py