medcards-ai/PRODUCT_STRATEGY.md
Current State: Individual study tool (MVP) Future State: Network-powered medical education platform with defensible moats
More Students โ More Interactions โ Better AI Predictions โ
Better Learning Outcomes โ More Students โ ...
Implementation:
Every interaction improves the system for ALL users:
// Database additions to existing schema
CREATE TABLE case_difficulty_calibration (
case_id UUID REFERENCES clinical_cases(id),
actual_difficulty_score NUMERIC, -- Calculated from real user performance
expected_vs_actual_delta NUMERIC, -- How off were we?
sample_size INTEGER,
confidence_level NUMERIC,
updated_at TIMESTAMP
);
CREATE TABLE prediction_model_versions (
id UUID PRIMARY KEY,
version TEXT,
training_data_size INTEGER,
accuracy_metrics JSONB,
deployed_at TIMESTAMP,
performance_improvement_vs_previous NUMERIC
);
Value Proposition:
โ Late entrants can never match prediction quality without the data
Phase 1: Curated Contributions
CREATE TABLE community_cases (
id UUID PRIMARY KEY,
created_by_user_id UUID REFERENCES users(id),
case_content JSONB, -- Same structure as clinical_cases
status TEXT CHECK (status IN ('draft', 'submitted', 'under_review', 'approved', 'rejected')),
community_rating NUMERIC,
times_used INTEGER DEFAULT 0,
success_rate NUMERIC,
curator_notes TEXT,
approved_by_user_id UUID REFERENCES users(id),
approved_at TIMESTAMP,
earnings_generated NUMERIC DEFAULT 0 -- For revenue sharing
);
CREATE TABLE case_reviews (
id UUID PRIMARY KEY,
case_id UUID REFERENCES community_cases(id),
reviewer_user_id UUID REFERENCES users(id),
clinical_accuracy_score INTEGER CHECK (1 <= score <= 5),
educational_value_score INTEGER CHECK (1 <= score <= 5),
review_text TEXT,
is_expert_review BOOLEAN DEFAULT false -- Verified doctors/professors
);
Incentive Mechanics:
Network Effect:
โ Library becomes impossible to replicate
CREATE TABLE study_groups (
id UUID PRIMARY KEY,
name TEXT NOT NULL,
description TEXT,
created_by_user_id UUID REFERENCES users(id),
is_public BOOLEAN DEFAULT false,
member_limit INTEGER,
created_at TIMESTAMP,
-- Group configuration
focus_specialties TEXT[],
target_exam TEXT, -- "REVALIDA 2025", "USP Clรญnica Mรฉdica", etc.
study_schedule JSONB, -- When they study together
-- Group stats
total_cases_solved INTEGER DEFAULT 0,
avg_group_success_rate NUMERIC,
active_members_count INTEGER
);
CREATE TABLE study_group_members (
group_id UUID REFERENCES study_groups(id),
user_id UUID REFERENCES users(id),
joined_at TIMESTAMP,
role TEXT CHECK (role IN ('owner', 'admin', 'member')),
contribution_score INTEGER DEFAULT 0, -- Based on activity
PRIMARY KEY (group_id, user_id)
);
CREATE TABLE group_challenges (
id UUID PRIMARY KEY,
group_id UUID REFERENCES study_groups(id),
created_by_user_id UUID REFERENCES users(id),
challenge_type TEXT, -- "speed_run", "accuracy_battle", "specialty_mastery"
case_pool UUID[], -- Array of case IDs for this challenge
start_time TIMESTAMP,
end_time TIMESTAMP,
prize_type TEXT, -- "badges", "credits", "bragging_rights"
status TEXT CHECK (status IN ('upcoming', 'active', 'completed'))
);
CREATE TABLE challenge_leaderboard (
challenge_id UUID REFERENCES group_challenges(id),
user_id UUID REFERENCES users(id),
score INTEGER,
time_completed_seconds INTEGER,
rank INTEGER,
PRIMARY KEY (challenge_id, user_id)
);
CREATE TABLE peer_interactions (
id UUID PRIMARY KEY,
from_user_id UUID REFERENCES users(id),
to_user_id UUID REFERENCES users(id),
interaction_type TEXT, -- "study_together", "case_recommendation", "explanation_request"
context JSONB,
created_at TIMESTAMP
);
Social Features:
Study Groups
Peer Challenges
Collaborative Learning
Network Effect:
โ Social lock-in (WhatsApp effect)
CREATE TABLE premium_content (
id UUID PRIMARY KEY,
creator_user_id UUID REFERENCES users(id),
content_type TEXT, -- "course", "case_pack", "specialty_bundle", "ai_tutor_session"
title TEXT NOT NULL,
description TEXT,
price_credits INTEGER,
price_reais NUMERIC, -- For direct purchase
content_metadata JSONB,
/*
{
"case_count": 50,
"specialty": "cardiologia",
"difficulty_range": [3, 5],
"includes_video_explanations": true,
"creator_credentials": "Cardiologista HC-USP"
}
*/
-- Performance metrics
purchases_count INTEGER DEFAULT 0,
avg_rating NUMERIC,
review_count INTEGER,
revenue_generated NUMERIC,
is_verified BOOLEAN DEFAULT false, -- Verified quality
created_at TIMESTAMP
);
CREATE TABLE content_purchases (
id UUID PRIMARY KEY,
user_id UUID REFERENCES users(id),
content_id UUID REFERENCES premium_content(id),
purchased_at TIMESTAMP,
price_paid_credits INTEGER,
price_paid_reais NUMERIC
);
CREATE TABLE creator_profiles (
user_id UUID PRIMARY KEY REFERENCES users(id),
is_verified_educator BOOLEAN DEFAULT false,
credentials TEXT, -- "Mรฉdico residente R3 Cardiologia USP"
bio TEXT,
-- Creator stats
total_content_created INTEGER DEFAULT 0,
total_revenue_earned NUMERIC DEFAULT 0,
follower_count INTEGER DEFAULT 0,
avg_content_rating NUMERIC,
-- Payout info
payout_method TEXT,
payout_details JSONB
);
CREATE TABLE creator_followers (
follower_user_id UUID REFERENCES users(id),
creator_user_id UUID REFERENCES users(id),
followed_at TIMESTAMP,
PRIMARY KEY (follower_user_id, creator_user_id)
);
Marketplace Mechanics:
For Students:
For Educators:
Network Effect:
โ Two-sided marketplace moat
Free Tier:
Premium ($29/month or R$149/month):
Conversion Strategy:
Target: 10% conversion (industry standard)
Free: 5 cases/day Basic ($19/month): 20 cases/day + groups Pro ($39/month): Unlimited + AI tutor + analytics Elite ($79/month): Everything + marketplace credits + priority support + verified mentor matching
New Revenue Stream: Credits
Target: Medical Schools & Prep Courses
School Plans:
Value Prop for Schools:
Moat: Once a school adopts, students use it โ network effect when they graduate and tell others
API Access:
Enterprise Partnerships:
Vercel Edge Functions โ Supabase PostgreSQL โ Claude API
// Add to schema
CREATE TABLE cache_ai_responses (
cache_key TEXT PRIMARY KEY,
response_data JSONB,
created_at TIMESTAMP,
hit_count INTEGER DEFAULT 0,
ttl INTEGER DEFAULT 3600 -- seconds
);
-- Index for faster lookups
CREATE INDEX idx_cache_ttl ON cache_ai_responses(created_at)
WHERE (EXTRACT(EPOCH FROM (NOW() - created_at)) < ttl);
Caching Strategy:
Database Optimization:
Microservices Split:
โโโ Case Service (Supabase)
โโโ AI Service (Dedicated Claude inference server)
โโโ User Service (Supabase)
โโโ Analytics Service (Separate read DB)
โโโ Marketplace Service (Separate transaction DB)
Infrastructure:
Cost at Scale:
1. Open App โ See streak (don't break it!)
2. Dashboard shows: "Your friend Joรฃo just beat your cardiology score"
3. Do 5 quick cases to regain #1 spot
4. Unlock badge โ Share on WhatsApp
5. Friend sees โ comes back to compete
Daily:
Weekly:
Monthly:
Quarterly:
CREATE TABLE forum_posts (
id UUID PRIMARY KEY,
user_id UUID REFERENCES users(id),
category TEXT, -- "case_discussion", "study_tips", "exam_strategies"
title TEXT NOT NULL,
content TEXT NOT NULL,
related_case_id UUID REFERENCES clinical_cases(id),
upvotes INTEGER DEFAULT 0,
view_count INTEGER DEFAULT 0,
created_at TIMESTAMP
);
CREATE TABLE forum_comments (
id UUID PRIMARY KEY,
post_id UUID REFERENCES forum_posts(id),
user_id UUID REFERENCES users(id),
content TEXT NOT NULL,
upvotes INTEGER DEFAULT 0,
is_expert_answer BOOLEAN DEFAULT false,
created_at TIMESTAMP
);
Use Cases:
Network Effect: More users โ more discussions โ more value โ more users
CREATE TABLE study_preferences (
user_id UUID PRIMARY KEY REFERENCES users(id),
target_exam TEXT,
exam_date DATE,
weak_specialties TEXT[],
preferred_study_times TEXT[], -- "weekday_mornings", "weekend_afternoons"
study_style TEXT, -- "competitive", "collaborative", "solo_with_accountability"
looking_for_buddy BOOLEAN DEFAULT false
);
-- ML-powered matching
CREATE TABLE study_buddy_matches (
id UUID PRIMARY KEY,
user1_id UUID REFERENCES users(id),
user2_id UUID REFERENCES users(id),
match_score NUMERIC, -- Compatibility score
match_reason JSONB,
status TEXT CHECK (status IN ('suggested', 'accepted', 'active', 'ended')),
created_at TIMESTAMP
);
Algorithm:
Tactic: Manual recruitment from specific medical school
Tactic: Win one school completely
Tactic: Replicate to other top schools
Tactic: Paid acquisition + viral loops
Tactic: Become infrastructure
Weekly Active Cases Solved
Acquisition:
Engagement:
Monetization:
Network Effects:
Retention:
Continuous Improvement Loop:
Defensive Tactics:
Year 1-2: Best residency exam prep in Brazil Year 3-5: Platform for all medical education in Brazil (undergrad โ CME) Year 5-7: Expand to Latin America (same market dynamics) Year 7-10: Global platform for medical education
End State:
This is how you build an unassailable position in medical education.
Ready to implement the enhanced schema with network effects?