Growth Features
This document provides comprehensive coverage of Kulcare's growth features, designed to help healthcare providers expand their online presence, manage their reputation, and reach more patients through digital marketing tools.
Overview
The Kulcare growth feature suite provides clinics and healthcare providers with comprehensive digital marketing and online presence management tools:
- Website Hosting: Custom clinic websites with theme selection and domain management
- Reputation Management: Review management for both Kulcare and Google My Business (GMB)
- Google My Business Integration: Questions, reviews, posts, and action links management
- Digital Marketing: Landing pages, ad campaigns, and lead generation
- SEO Optimization: Search engine optimization tools and analytics
- Domain Management: Custom domain hosting and SSL certificate management
Key Features
- Multi-theme website customization
- Google My Business integration and management
- Review response automation and management
- Custom domain hosting with SSL
- SEO optimization for better search visibility
- Ad campaign lead capture and management
- Analytics and reporting dashboard
Architecture
The growth feature follows a multi-repository architecture:
Growth Architecture:
├── kulcare-api-backend/parts/growth/ # Backend API and business logic
├── kulcare-growth/ # Frontend growth dashboard
└── growth_website/ # Public clinic websites (Rails)Parts-Based Structure
parts/growth/
├── controllers/ # API endpoints for growth features
├── interactors/ # Business logic using interactor pattern
├── models/ # Data models for websites, domains, GMB
├── services/ # External integrations (Google, domain providers)
├── policies/ # Authorization policies
├── serializers/ # JSON response formatters
└── routes.rb # Growth feature routesTechnology Stack
- Backend: Ruby on Rails 7.1.3.4 with parts-based architecture
- Frontend: React.js (separate kulcare-growth repository)
- Public Websites: Ruby on Rails (growth_website repository)
- Database: PostgreSQL shared across all components
- External APIs: Google My Business API, Domain registrar APIs
- Storage: AWS S3 for images and assets
Core Data Models
Website Management
ClinicWebsite
Core model for clinic website management.
# Table: clinic_websites
class ClinicWebsite < ApplicationRecord
belongs_to :clinic
has_many :clinic_domain_requests
has_many :clinic_domains
has_many :clinic_website_seos
# Key columns:
# clinic_id: integer - Associated clinic
# status: string - Website status (draft, published)
# wordpress_url: string - WordPress site URL
# current_step: integer - Setup completion step
# has_unpublished_data: boolean - Pending changes flag
# published_at: datetime - Last publication timestamp
def default_domain
clinic_domains.where(domain_type: 'DEFAULT').first&.domain_name
end
def custom_domain
clinic_domains.where(
domain_type: 'CUSTOM',
status: 'ACTIVE'
).first&.domain_name
end
def seos
# Returns SEO configurations for different page types
basic_seo_types = %w[homepage about_us gallery doctors services packages reviews]
# ... SEO management logic
end
endWebsiteTheme
Available themes for clinic websites.
# Table: website_themes
class WebsiteTheme < ApplicationRecord
has_many :clinic_website_themes
has_many :website_theme_variations
has_many :theme_fonts
has_many :theme_color_schemes
# Key columns:
# name: string - Theme name
# description: text - Theme description
# url: string - Theme demo URL
# thumbnail_url: string - Theme preview image
# active: boolean - Theme availability
endClinicWebsiteTheme
Applied theme configuration for a clinic website.
# Table: clinic_website_themes
class ClinicWebsiteTheme < ApplicationRecord
belongs_to :clinic_website
belongs_to :website_theme
belongs_to :theme_color_scheme
belongs_to :theme_font
# Key columns:
# current: boolean - Currently active theme
# published_at: datetime - Theme publication timestamp
# custom_settings: jsonb - Theme customization data
endDomain Management
ClinicDomain
Custom domains associated with clinic websites.
# Table: clinic_domains
class ClinicDomain < ApplicationRecord
belongs_to :clinic_website
has_many :clinic_domain_requests
# Key columns:
# domain_name: string - Domain name (e.g., "myclinic.com")
# domain_type: string - 'DEFAULT' or 'CUSTOM'
# status: string - Domain status (active, inactive)
# ssl_enabled: boolean - SSL certificate status
# created_at: datetime - Domain creation timestamp
endClinicDomainRequest
Domain operation requests (create, verify, delete).
# Table: clinic_domain_requests
class ClinicDomainRequest < ApplicationRecord
belongs_to :clinic_domain
belongs_to :clinic
# Key columns:
# request_type: string - 'CREATE', 'VERIFY', 'DELETE'
# status: string - Request status
# request_data: jsonb - Request parameters
# response_data: jsonb - Response from domain provider
# failed_at: datetime - Failure timestamp
enum request_type: {
create: 'CREATE',
verify: 'VERIFY',
delete: 'DELETE'
}
enum status: {
pending: 'PENDING',
in_progress: 'IN_PROGRESS',
completed: 'COMPLETED',
failed: 'FAILED'
}
endGoogle My Business Integration
GmbAccount
Google My Business account connection.
# Table: gmb_accounts
class GmbAccount < ApplicationRecord
belongs_to :clinic, foreign_key: 'profile_id', optional: true
has_many :gmb_account_locations
# Key columns:
# profile_id: integer - Associated clinic ID
# account_name: string - GMB account name
# account_id: string - Google account identifier
# access_token: string - OAuth access token
# refresh_token: string - OAuth refresh token
# expires_at: datetime - Token expiration
endGmbAccountLocation
Individual GMB locations (for multi-location clinics).
# Table: gmb_account_locations
class GmbAccountLocation < ApplicationRecord
belongs_to :gmb_account
has_many :gmb_location_questions
has_many :gmb_location_posts
# Key columns:
# location_name: string - Business location name
# location_id: string - Google location identifier
# place_id: string - Google Places API ID
# address: string - Business address
# phone_number: string - Contact number
# website_url: string - Business website
# place_action_links: jsonb - Google action links data
# qanda_enabled: boolean - Q&A feature status
endGoogleReview
Google My Business reviews.
# Table: google_reviews
class GoogleReview < ApplicationRecord
belongs_to :gmb_account_location
# Key columns:
# review_id: string - Google review identifier
# reviewer_name: string - Reviewer name
# rating: integer - Star rating (1-5)
# review_text: text - Review content
# review_time: datetime - Review timestamp
# reply_text: text - Business reply content
# reply_time: datetime - Reply timestamp
endSEO Management
ClinicWebsiteSeo
SEO configurations for different website pages.
# Table: clinic_website_seos
class ClinicWebsiteSeo < ApplicationRecord
belongs_to :clinic_website
# Key columns:
# seo_type: string - Page type (homepage, about_us, etc.)
# title: string - SEO page title
# description: text - Meta description
# keywords: text - SEO keywords
# og_title: string - Open Graph title
# og_description: text - Open Graph description
# og_image_url: string - Open Graph image
endAd Campaign Management
AdCampaignLeadsWebhook
Webhook handling for ad campaign lead capture.
# Table: ad_campaign_leads_webhooks
class AdCampaignLeadsWebhook < ApplicationRecord
has_many :ad_campaign_leads
# Key columns:
# webhook_data: jsonb - Complete webhook payload
# source: string - Lead source (facebook, google)
# processed: boolean - Processing status
# error_message: text - Error details if failed
endAPI Endpoints
Growth Profile Management
Profile Operations
GET /clinics/:clinic_id/growth_profile # Get profile data
GET /clinics/:clinic_id/growth_profile/dashboard # Growth dashboard
GET /clinics/:clinic_id/growth_profile/reports # Growth reports
GET /clinics/:clinic_id/growth_profile/setup_status # Setup completion
POST /clinics/:clinic_id/growth_profile/save_photo_tag # Save photo tagsDashboard Response:
{
"success": true,
"data": {
"clinic": {
"id": 123,
"name": "Heart Care Clinic",
"total_appointments": 456,
"website_visits": 789,
"google_reviews_count": 23,
"average_rating": 4.8
},
"website": {
"status": "published",
"domain": "heartcareclinic.com",
"ssl_enabled": true,
"last_published": "2024-01-15T10:30:00Z"
},
"google_business": {
"connected": true,
"locations_count": 2,
"pending_questions": 3,
"recent_reviews": 5
}
}
}Website Management
Website Operations
POST /clinics/:clinic_id/clinic_website # Create website
GET /clinics/:clinic_id/clinic_website # Get website details
POST /clinics/:clinic_id/clinic_website/initialize_request # Initialize setup
POST /clinics/:clinic_id/clinic_website/current_step # Update setup step
POST /clinics/:clinic_id/clinic_website/publish # Publish websiteTheme Management
GET /clinics/:clinic_id/clinic_website_theme # List themes
POST /clinics/:clinic_id/clinic_website_theme # Apply theme
GET /clinics/:clinic_id/clinic_website_theme/:id # Get theme detailsTheme Application Example:
{
"clinic_website_theme": {
"website_theme_id": 5,
"theme_color_scheme_id": 12,
"theme_font_id": 8,
"custom_settings": {
"primary_color": "#2E8B57",
"secondary_color": "#F0F8FF",
"logo_url": "https://example.com/logo.png",
"hero_text": "Welcome to Heart Care Clinic"
}
}
}Domain Management
Domain Operations
GET /clinics/:clinic_id/clinic_domains # List domains
POST /clinics/:clinic_id/clinic_domain_requests # Request domain
PUT /clinics/:clinic_id/clinic_domain_requests/:id # Update request
POST /clinics/:clinic_id/clinic_domain_requests/:id/verify # Verify domain
DELETE /clinics/:clinic_id/clinic_domain_requests/:id # Delete requestDomain Creation Request:
{
"clinic_domain_request": {
"domain_name": "myclinic.com",
"request_type": "CREATE",
"request_data": {
"registrar": "godaddy",
"nameservers": ["ns1.kulcare.com", "ns2.kulcare.com"]
}
}
}Google My Business Integration
GMB Connection
POST /clinics/:clinic_id/google_my_business # Connect GMB account
GET /clinics/:clinic_id/google_my_business/connection # Check connection statusLocation Management
GET /clinics/:clinic_id/growth_profile/google_locations # List GMB locations
POST /clinics/:clinic_id/growth_profile/google_locations # Update locationReview Management
GET /clinics/:clinic_id/growth_profile/google_reviews # List reviews
POST /clinics/:clinic_id/growth_profile/google_reviews/:review_id/review_reply # Reply to review
POST /clinics/:clinic_id/growth_profile/google_reviews/:review_id/review_reply/delete # Delete replyPosts & Questions
GET /clinics/:clinic_id/growth_profile/google_posts # List posts
POST /clinics/:clinic_id/growth_profile/google_posts # Create post
PUT /clinics/:clinic_id/growth_profile/google_posts/:id # Update post
DELETE /clinics/:clinic_id/growth_profile/google_posts/:id # Delete post
GET /clinics/:clinic_id/growth_profile/google_posts/:id/insights # Post insights
GET /clinics/:clinic_id/growth_profile/google_questions # List Q&A
POST /clinics/:clinic_id/growth_profile/google_questions # Create question
POST /clinics/:clinic_id/growth_profile/google_questions/:id/answer # Answer question
POST /clinics/:clinic_id/growth_profile/google_questions/create_multiple # Bulk createServices & Packages
Service Management
GET /clinics/:clinic_id/growth_profile/services # List services
PUT /clinics/:clinic_id/growth_profile/services/:id # Update service
DELETE /clinics/:clinic_id/growth_profile/services/:id # Delete service
POST /clinics/:clinic_id/growth_profile/services/copy # Copy servicesPackage Management
GET /clinics/:clinic_id/growth_profile/packages # List packages
PUT /clinics/:clinic_id/growth_profile/packages/:id # Update package
DELETE /clinics/:clinic_id/growth_profile/packages/:id # Delete package
POST /clinics/:clinic_id/growth_profile/packages/copy # Copy packagesSEO & Analytics
SEO Management
GET /clinics/:clinic_id/growth_profile_seo # Get SEO settings
POST /clinics/:clinic_id/growth_profile_seo # Update SEO settingsAnalytics
GET /clinics/:clinic_id/growth_profile_analytics # Get analytics
POST /clinics/:clinic_id/growth_profile_analytics # Update analytics settingsReports & Insights
Growth Reports
GET /clinics/:clinic_id/growth_profile/reports/ad_campaigns # Ad campaign reports
GET /clinics/:clinic_id/growth_profile/reports/email_campaigns # Email campaign reports
GET /clinics/:clinic_id/growth_profile/reports/credits # Credit usage reports
GET /clinics/:clinic_id/growth_profile/reports/messaging # Messaging reportsAd Campaign Webhooks
Lead Capture
POST /ad_campaign_leads/webhook # Webhook endpoint for leadsBusiness Logic (Interactors)
Website Management
Website Creation Flow
# parts/growth/interactors/clinic_website_management/create.rb
class ClinicWebsiteManagement::Create
include Interactor
def call
# 1. Validate clinic eligibility
# 2. Create website record
# 3. Set up default theme
# 4. Initialize SEO settings
# 5. Create default domain
# 6. Send creation notifications
end
endPublishing Process
# parts/growth/interactors/clinic_website_management/publish.rb
class ClinicWebsiteManagement::Publish
include Interactor
def call
# 1. Validate website completeness
# 2. Generate static website files
# 3. Deploy to hosting infrastructure
# 4. Update DNS records
# 5. Enable SSL certificates
# 6. Update publication timestamp
end
endDomain Management
Custom Domain Setup
# parts/growth/interactors/domains/verify_and_host.rb
class Domains::VerifyAndHost
include Interactor
def call
# 1. Verify domain ownership
# 2. Configure DNS settings
# 3. Set up SSL certificate
# 4. Update hosting configuration
# 5. Test domain accessibility
# 6. Activate domain
end
endGoogle My Business Integration
GMB Connection
# parts/growth/interactors/gmb_management/add_connection.rb
class GmbManagement::AddConnection
include Interactor
def call
# 1. Validate OAuth tokens
# 2. Fetch GMB account details
# 3. Import business locations
# 4. Sync existing reviews
# 5. Enable webhooks for updates
# 6. Store connection details
end
endReview Reply Management
# parts/growth/interactors/gmb_review_reply/create.rb
class GmbReviewReply::Create
include Interactor
def call
# 1. Validate review exists
# 2. Check reply permissions
# 3. Post reply to Google
# 4. Store reply locally
# 5. Update review status
# 6. Track reply analytics
end
endExternal Service Integration
Google My Business Services
Profile Synchronization
# parts/growth/services/sync_google_profile.rb
class SyncGoogleProfile
def self.call(gmb_account_location)
# Sync business profile data from Google
# Update local records with latest information
# Handle API rate limiting
# Log sync activities
end
endPost Management
# parts/growth/services/create_google_post.rb
class CreateGooglePost
def self.call(location, post_data)
# Create post on Google My Business
# Handle different post types (update, offer, event)
# Upload media if present
# Return post details
end
endDomain Management Services
Automatic Domain Mapping
# parts/growth/services/auto_map_domain_https.rb
class AutoMapDomainHttps
def self.call(clinic_domain)
# Configure SSL certificate
# Update load balancer settings
# Set up HTTPS redirects
# Verify SSL configuration
end
endSSL Certificate Management
# parts/growth/services/auto_remove_domain.rb
class AutoRemoveDomain
def self.call(clinic_domain)
# Remove domain from hosting
# Revoke SSL certificates
# Clean up DNS records
# Update database records
end
endGrowth Profile Features
Setup Wizard
The growth profile includes a step-by-step setup wizard:
- Basic Information: Clinic details, contact information
- Services Setup: Configure services and packages
- Photo Management: Upload and tag photos
- Theme Selection: Choose and customize website theme
- SEO Configuration: Set up meta tags and descriptions
- Domain Setup: Configure custom domain (optional)
- Google Integration: Connect Google My Business
- Review Settings: Configure review management
Dashboard Analytics
Key Metrics Tracked
- Website visitor count and sources
- Google My Business profile views
- Review ratings and response rates
- Appointment bookings from online sources
- Search engine ranking positions
- Click-through rates on Google posts
Reporting Features
# Example dashboard data structure
{
overview: {
total_visits: 1250,
new_patients: 45,
google_profile_views: 890,
average_rating: 4.7,
total_reviews: 123
},
trends: {
visits_trend: "↑ 23% from last month",
reviews_trend: "↑ 12% from last month",
ratings_trend: "→ Stable"
},
top_sources: [
{ source: "Google Search", visits: 456, percentage: 36.5 },
{ source: "Direct", visits: 234, percentage: 18.7 },
{ source: "Social Media", visits: 178, percentage: 14.2 }
]
}Advanced Features
Campaign Management
Lead Capture System
The growth features include a sophisticated lead capture system:
- Landing Pages: Custom landing pages for marketing campaigns
- Form Builder: Drag-and-drop form creation
- Lead Scoring: Automatic lead qualification
- CRM Integration: Direct integration with clinic patient management
- Follow-up Automation: Automated email sequences
Marketing Automation
# Example campaign workflow
{
campaign: {
name: "New Patient Special",
target_audience: "Local residents aged 25-45",
channels: ["google_ads", "facebook_ads"],
budget: 5000,
duration: "30 days"
},
landing_page: {
theme: "medical_professional",
headline: "Get Your Health Check-up Today",
offer: "50% off first consultation",
form_fields: ["name", "phone", "email", "preferred_time"]
},
automation: {
immediate_response: "Thank you email with clinic details",
follow_up_sequence: [
{ delay: "1 hour", action: "appointment_reminder_sms" },
{ delay: "1 day", action: "clinic_information_email" },
{ delay: "3 days", action: "special_offer_reminder" }
]
}
}Reputation Management
Review Response Templates
# Automated review response suggestions
{
positive_templates: [
"Thank you for your wonderful review! We're thrilled that you had such a positive experience.",
"We appreciate your kind words and are glad we could provide excellent care.",
"Your feedback means the world to us. Thank you for choosing our clinic!"
],
negative_templates: [
"We sincerely apologize for your experience. Please contact us directly so we can make this right.",
"Thank you for bringing this to our attention. We'd like to discuss this further to improve our service.",
"We take all feedback seriously and would appreciate the opportunity to address your concerns."
]
}Review Monitoring
- Real-time Alerts: Immediate notifications for new reviews
- Sentiment Analysis: Automatic categorization of review sentiment
- Response Tracking: Monitor response times and rates
- Competitive Analysis: Compare ratings with nearby clinics
Security & Privacy
Data Protection
- Patient Privacy: No patient data included in public websites
- Secure Authentication: OAuth 2.0 for Google integrations
- SSL Encryption: All websites secured with SSL certificates
- Access Controls: Role-based permissions for growth features
Compliance
- HIPAA Compliance: No PHI in marketing materials
- GDPR Compliance: Data retention and deletion policies
- Medical Advertising: Compliance with healthcare advertising regulations
- Platform Policies: Adherence to Google and Facebook policies
Best Practices
Website Optimization
- Mobile-First Design: All themes are mobile-responsive
- Fast Loading: Optimized images and caching
- SEO-Friendly: Clean URLs and structured data
- Accessibility: WCAG compliance for all themes
- Local SEO: Location-based optimization
Review Management
- Prompt Responses: Reply to reviews within 24 hours
- Professional Tone: Maintain clinical professionalism
- Address Concerns: Take negative feedback seriously
- Encourage Reviews: Systematic patient review requests
- Monitor Competitors: Track competitor review strategies
Marketing Campaign Success
- Clear Value Propositions: Highlight unique clinic benefits
- Local Targeting: Focus on geographic service area
- Seasonal Campaigns: Align with health awareness months
- A/B Testing: Test different messaging and offers
- Track Conversions: Measure appointment bookings from campaigns
Error Handling & Monitoring
Common Issues
- Domain Verification Failures: DNS configuration problems
- SSL Certificate Issues: Certificate renewal and validation
- Google API Limits: Rate limiting and quota management
- Website Publishing Failures: Deployment and hosting issues
Monitoring & Alerting
# Growth features health check
def growth_health_check
{
websites_published: ClinicWebsite.where(status: 'published').count,
domains_active: ClinicDomain.where(status: 'ACTIVE').count,
ssl_expiring_soon: ClinicDomain.where('ssl_expires_at < ?', 30.days.from_now).count,
gmb_connections_active: GmbAccount.where('expires_at > ?', Time.current).count,
pending_domain_requests: ClinicDomainRequest.where(status: 'PENDING').count
}
endIntegration Guidelines
For Frontend Development
- Progressive Enhancement: Build for all device types
- Real-time Updates: WebSocket integration for live data
- Offline Capability: Cache essential data for offline access
- User Feedback: Clear progress indicators for long operations
- Error Recovery: Graceful handling of API failures
For Marketing Integration
- Campaign Tracking: UTM parameter integration
- Lead Attribution: Source tracking for all conversions
- Pixel Installation: Facebook and Google tracking pixels
- Conversion Events: Track appointment bookings and calls
- ROI Measurement: Cost per acquisition tracking
Related Documentation
- Authentication System - User roles and permissions
- API Reference - Clinic APIs - Clinic management endpoints
- Billing System - Growth feature subscription management
- Deployment Guide - Growth website hosting setup