Skip to Content

System Design

Detailed system design documentation for HealthTalk.

Service Architecture

HealthTalk uses a microservices architecture with the following core services:

Message Service

Handles all messaging operations:

  • Message composition and validation
  • Template rendering
  • Queue management
  • Delivery tracking

Patient Service

Manages patient data:

  • Patient profiles
  • Communication preferences
  • Consent management
  • Contact information

Appointment Service

Scheduling and reminders:

  • Calendar integration
  • Reminder scheduling
  • Confirmation handling
  • Follow-up automation

Template Service

Message template management:

  • Template CRUD operations
  • Version control
  • Approval workflow
  • Variable substitution

Notification Service

Internal notifications:

  • Staff alerts
  • System notifications
  • Webhook delivery
  • Event broadcasting

Database Design

Primary Database (PostgreSQL)

Core relational data:

  • Organizations and tenants
  • Users and permissions
  • Patients and contacts
  • Messages and templates
  • Audit logs

Cache Layer (Redis)

Performance optimization:

  • Session data
  • Rate limiting counters
  • Template cache
  • API response cache

Message Queue

Asynchronous processing:

  • Message delivery queue
  • Webhook delivery queue
  • Notification queue
  • Background job queue

Scalability

  • Horizontal scaling via containerization
  • Database read replicas
  • CDN for static assets
  • Auto-scaling based on load

Monitoring

  • Application performance monitoring
  • Error tracking and alerting
  • Infrastructure monitoring
  • Security event monitoring
Last updated on