🎮 Guess What! Famous.AI Deployment Checklist
Step-by-step guide to deploy on Famous.AI
Phase 1: Database Tables
Create guess_what_scores table
CREATE TABLE guess_what_scores (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
created_at TIMESTAMPTZ DEFAULT NOW(),
user_email TEXT NOT NULL,
user_name TEXT NOT NULL,
final_score INTEGER NOT NULL,
games_played INTEGER NOT NULL,
hints_used INTEGER NOT NULL,
streak INTEGER NOT NULL,
idioms_guessed TEXT[] DEFAULT '{}'
);
CREATE INDEX idx_guess_what_user ON guess_what_scores(user_email);
CREATE INDEX idx_guess_what_score ON guess_what_scores(final_score DESC);Verify pearl infrastructure exists
Confirm these tables exist (they should from Scrabble):
- •pearl_balances
- •pearl_rewards
- •pearl_stash
- •leaderboard
Create guess_what_hints table (optional)
CREATE TABLE guess_what_hints (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
created_at TIMESTAMPTZ DEFAULT NOW(),
user_email TEXT NOT NULL,
idiom_id TEXT NOT NULL,
hints_revealed TEXT[] DEFAULT '{}',
final_guess TEXT,
was_correct BOOLEAN
);Phase 2: Edge Functions
Create guess-what-complete function
// /functions/v1/guess-what-complete
export async function handler(event) {
const { user_email, score, games_played, hints_used, streak } = JSON.parse(event.body);
// Save to database
await supabase.from('guess_what_scores').insert({
user_email,
user_name: 'Player', // Get from JWT
final_score: score,
games_played,
hints_used,
streak
});
// Award pearls (10 base + bonuses)
const pearls = 10 + (streak > 5 ? 5 : 0);
// Update pearl_balances via existing platform-api
return { statusCode: 200, body: JSON.stringify({ pearls }) };
}Update platform-api to recognize guess_what_01
Add game_id 'guess_what_01' to the switch statement in platform-api function
Create guess-what-leaderboard function
// /functions/v1/guess-what-leaderboard
export async function handler(event) {
const { data } = await supabase
.from('guess_what_scores')
.select('*')
.order('final_score', { ascending: false })
.limit(50);
return { statusCode: 200, body: JSON.stringify(data) };
}Test with Postman/curl
Verify each function returns 200 OK with valid test data
Phase 3: Game Configuration
Set environment variables
- •GATEWAY_API_KEY (reuse from Scrabble)
- •DATABASE_URL (Famous.AI Supabase)
- •JWT_SECRET (for token validation)
Configure CORS in Famous.AI dashboard
Allow play.snappyidioms.com origin
Update GuessWhat.jsx with Famous.AI endpoints
const FAMOUS_AI_CONFIG = {
gameId: 'guess_what_01',
apiEndpoint: 'https://your-project.famous.ai/functions/v1/platform-api',
leaderboardEndpoint: 'https://your-project.famous.ai/functions/v1/guess-what-leaderboard'
};Sync idioms to Famous.AI database
Use idiom-sync function to copy approved idioms from Snappy Idioms
Phase 4: Deploy & Test
Deploy game files to Famous.AI
- •GuessWhat.jsx (main game)
- •FamousAIAuthGate.jsx
- •FamousAIPearlTracker.jsx
- •ShareScoreModal.jsx
- •ProgressMigrationModal.jsx
Pin project to White Label
In Famous.AI dashboard: Settings → White Label → Pin this project
Test complete flow
- •✅ Guest mode works
- •✅ JWT authentication works
- •✅ Game completion awards pearls
- •✅ Email receipt sent
- •✅ Leaderboard displays
- •✅ Guest migration works
Update GamesHub on Snappy Idioms
{
name: "Guess What?",
ipa: "/ɡes wɒt/",
description: "Charades-style idiom guessing game",
icon: HelpCircle,
externalUrl: "https://play.snappyidioms.com/guess-what"
}Keep in SLEEP MODE initially
Wake up once testing complete to start billing
Monitor logs for 24 hours
Check Famous.AI Function Logs for errors/performance issues
📋 Quick Reference
Game ID
guess_what_01Base Pearl Reward
10 + bonusesDatabase Entity
guess_what_scoresEstimated Deploy Time
45-60 minutes💡 Remember: Keep in sleep mode ($0) until validated. When live, will add ~$197/month to first-tier costs.