Jemari Sapp

MS Information Systems Candidate

AI For Business Innovation

Back
Trilo - Full-Stack SaaS Platform

Trilo: Full-Stack SaaS for Sports League Automation

RoleFounder & Product Engineer
Core Stack
PythonReactTypeScriptPostgreSQLOpenAI Vision APIStripeDiscord OAuth

Executive Summary

Built a full-stack SaaS product from 0→1: a Discord bot automating fantasy football league management (reducing commissioner workload from 3+ hours/week to under 5 minutes) plus a conversion-optimized marketing site with Stripe payments and Discord OAuth. End-to-end ownership from AI feature development to user acquisition funnels.


The Problem

Running a fantasy football dynasty league on Discord is operationally brutal.

  • Administrative Burden: Commissioners spend 3+ hours weekly creating matchup channels, tracking records, and managing team rosters manually.
  • Commissioner Burnout: High friction causes 40%+ of leagues to fold within two seasons due to organizer fatigue.
  • Fragmented Tools: Existing solutions either require external websites (friction) or charge per-league pricing ($15-35/league), making multi-league management expensive.
  • No AI Integration: Manual schedule entry from game screenshots is tedious and error-prone.

The Solution

I built two interconnected products that form a complete SaaS business:

1. Trilo Bot (Discord)

An intelligent Discord bot that automates league operations through slash commands. Commissioners interact where their community already lives. No external tools required.

2. Trilo Website (React)

A marketing site that handles user acquisition, Discord OAuth authentication, Stripe payments, and license key delivery via Discord DM.


System Architecture

The platform is fully event-driven across both products, with shared state in Supabase.

VisitsOAuthCheckoutWebhookGeneratesDM to UserQueriesVision APICommandsHosted on
Marketing Site (Vercel)
Payments
Discord Bot (Railway)
User(Commissioner)
Trilo WebsiteReact + Vite
Discord OAuthUser Auth
OpenAI VisionGPT-4o-mini
StripeSubscriptions
SupabasePostgreSQL
Trilo BotPython + discord.py
CommissionerDiscord User
License KeyTRILO-XXXX-XXXX
RailwayHosting
Scroll to explore

Data Flow

  1. Acquisition: User visits trilo.gg → authenticates via Discord OAuth
  2. Conversion: Stripe checkout creates subscription → webhook fires
  3. Fulfillment: License key generated → delivered via Discord DM
  4. Activation: User runs /admin activate in Discord → bot validates against Supabase
  5. Usage: Bot handles all league operations, storing data in PostgreSQL

Key Features

AI-Powered Matchup Creation

The flagship feature: upload a schedule screenshot and Trilo extracts team matchups automatically.

COMMAND PREVIEW
D
(C) DucksToday at 11:55 AM
used /matchups create-from-image
category_name: Week 5image1: schedule.JPGgame_status: True+2 more
T
TriloAPP
Today at 11:55 AM
Thinking...
Schedule
Scanning matchups...
TRILO ACTIVATED

Technical Implementation:

  • OpenAI Vision API (gpt-4o-mini) processes images with structured JSON schema enforcement
  • 95% extraction accuracy achieved through prompt engineering
  • Cost-optimized: ~10x cheaper than GPT-4 Vision with comparable results

Discord-Native Operations

Everything happens where the community lives. No external dashboards.

Discord slash commands showing /teams, /matchups, and /attributes commands

Command Groups:

  • /teams - Assign users to teams, view rosters, auto-updating list embeds
  • /matchups - Create game channels, sync records, AI schedule import
  • /attributes - Award points, approve upgrades, track spending
  • /settings - Configure roles, channels, league type (CFB/NFL)

Reaction-Based Game Status

Single-tap interactions for marking games complete.

Matchup channel showing game status reactions - ✅ (played), 🎲 (simmed), 🟥/🟦 (force win)

Conversion-Optimized Website

UX Decisions:

  • Discord OAuth pre-checkout reduces friction
  • License key delivered via Discord DM (arrives where they'll use it)
  • Interactive setup guide with progress tracking

Technical Stack

LayerTechnologyPurpose
Discord BotPython 3.11 + discord.pyAsync-first bot framework with slash command support.
OpenAI Vision API (GPT-4o-mini)AI-powered schedule screenshot extraction.
PostgreSQL (Supabase)Production database with connection pooling.
SQLite (aiosqlite)Local development database.
RailwayHosting with auto-deploy from main branch.
Marketing SiteReact 19 + TypeScriptType-safe frontend with latest React features.
ViteFast build tooling and HMR.
Tailwind CSS + Framer MotionStyling and animations.
Vercel Serverless FunctionsAPI endpoints for OAuth and webhooks.
Payments & AuthStripeSubscription billing and checkout sessions.
Discord OAuth2User authentication and license key delivery via DM.
License Key SystemCustom TRILO-XXXX-XXXX-XXXX format with 3-server activation.

Key Product Decisions

This table represents the core PM thinking behind the product. It weighs trade-offs and makes defensible choices.

AreaDecisionRationale
AI & AutomationGPT-4o-mini for Vision95% accuracy at ~10x lower cost than GPT-4. Acceptable error rate for human review.
Structured prompt engineeringStrict JSON schema enforcement eliminates parsing failures without fine-tuning costs.
Database ArchitectureDual-mode abstraction layerSQLite for frictionless local dev; PostgreSQL for production. Abstraction auto-converts query syntax.
Connection pooling (2-10)Balanced pool prevents connection exhaustion while staying within Supabase free tier.
MonetizationFlat $69.99/year for 3 serversCompetitive moat vs NeonSportz ($14.99-$34.99/league). Simpler mental model for users.
License keys via Discord DMZero friction: key arrives where users will activate it. No email verification needed.
User ExperienceDiscord-native (no external dashboard)Commissioners don't want another tool. Everything happens where the community already is.
Emoji reactions for game statusSingle-tap interaction. Visual status at a glance. Familiar Discord pattern.
InfrastructureRailway for bot, Vercel for siteRight tool for each job. Railway handles long-running Python; Vercel handles serverless API routes.
Stripe webhooks for fulfillmentEvent-driven ensures no missed payments. Automatic license key generation on successful charge.

Database Architecture

A critical technical decision: supporting both SQLite (local dev) and PostgreSQL (production) through a unified abstraction layer.

Why This Matters:

  • Local dev: Zero setup friction with SQLite. Just run python -m src.bot
  • Production: PostgreSQL with connection pooling (2-10 connections) for concurrent Discord servers
  • Abstraction: Auto-converts ? placeholders to $1, $2 for PostgreSQL

Schema Design

server_settings      Per-guild configuration
cfb_teams/nfl_teams  Team assignments (user_id, team_name, server_id)
cfb_matchups         Matchup data with game status tracking
attribute_points     User balances (available, total_earned)
attribute_requests   Pending upgrades with approval workflow
server_subscriptions  Subscription status, expiration, license keys
command_usage        Analytics (timestamp, execution_time, success/failure)

User Journey & Conversion Funnel

Funnel Stages:

  1. Awareness: User lands on trilo.gg via Discord community referral
  2. Consideration: Explores features page, interactive setup guide
  3. Conversion: Connects Discord, completes Stripe checkout ($69.99/year)
  4. Fulfillment: Webhook generates license key → DM'd to user
  5. Activation: /admin activate TRILO-XXXX-XXXX-XXXX in their server
  6. Retention: Daily bot usage for league operations

Impact & Metrics

95%
Time Saved
95%
AI Accuracy
3
Servers/License
~60%
vs Competitor
MetricBeforeAfterImpact
Weekly admin time reduction3+ hours< 5 minutes95% reduction
Matchup channel creation45-60 minutes< 1 minute98% faster
AI schedule extraction accuracyN/A (manual)95%Enabled automation
Discord response latencyN/A< 3 secondsMeets Discord API requirement
Servers per licenseIndustry: 13 serversCompetitive advantage
Annual pricing vs competitor$14.99-34.99/league$69.99 flat~60% savings for multi-league users

Competitive Analysis

Factor
Trilo
NeonSportz
ManualSheets + Discord
Pricing
$69.99/year (3 servers)
$14.99-34.99/league
Free (time cost)
AI Features
Vision API
None
None
Discord-Native
100%
Partial (web dashboard)
N/A
Setup Time
< 5 minutes
15-30 minutes
Hours
Multi-League Cost
Same price
Multiplied
Same

Positioning: Only solution combining AI automation with flat-rate multi-league pricing.


Challenges & Learnings

Challenge 1: SQLite → PostgreSQL Migration

  • Problem: Started with SQLite; needed production-grade database
  • Solution: Built abstraction layer that auto-converts query syntax
  • Learning: Would start with PostgreSQL from day one in future projects

Challenge 2: Discord's 3-Second Interaction Timeout

  • Problem: AI operations exceed Discord's response window
  • Solution: interaction.response.defer() for long operations, then followup.send()
  • Learning: Always design for async-first in chatbot architectures

Challenge 3: License Key Delivery UX

  • Problem: Email delivery adds friction; users might not check email
  • Solution: Discord OAuth + DM delivery-key arrives where they'll use it
  • Learning: Deliver value in the channel where users already are

Challenge 4: Pricing Strategy

  • Problem: Per-league pricing is industry standard but punishes power users
  • Solution: Flat rate for 3 servers-competitive moat for multi-league commissioners
  • Learning: Understand user behavior (2-3 leagues typical) before pricing

What I'd Do Differently

  • Start with PostgreSQL: Avoid migration complexity
  • Add analytics earlier: No conversion tracking currently. I would add GA/Mixpanel from day one
  • User interviews before building: More upfront research on pricing sensitivity
  • Build webhook monitoring: Dashboard for Stripe webhook failures

Skills Demonstrated

Technical Product Management

Defined requirements, prioritized features, made trade-off decisions

Full-Stack Development

Python bot + React site + serverless APIs

Database Architecture

Dual-mode abstraction, connection pooling, schema design

AI/ML Integration

OpenAI Vision API, prompt engineering, structured outputs

Payments & Billing

Stripe integration, webhooks, license key system

User Experience

Discord-native design, OAuth flow, conversion optimization

Go-to-Market

Competitive analysis, pricing strategy, value positioning


Links