Project 3 of ~34

๐ŸŽฎ Skill Quests โ€” Architecture

Technical specification for Skill Quests โ€” B2B gamification layer for corporate learning. Integrates with LinkedIn Learning, LMS platforms. Runs on Mac Mini + cloud.

B2B SaaS SvelteKit Supabase Mac-native AI

๐Ÿ—๏ธ Architecture Overview

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ USER INTERFACES โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ Web App โ”‚ โ”‚ Slack Widget โ”‚ โ”‚LinkedIn โ”‚ โ”‚ โ”‚ โ”‚ (SvelteKit) โ”‚ โ”‚ (mini app) โ”‚ โ”‚Integration โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”‚ โ–ผ โ–ผ โ–ผ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ CORE API (Deno / Node.js) โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ Quest Eng. โ”‚ โ”‚ XP/Badge โ”‚ โ”‚Leaderboard โ”‚ โ”‚ โ”‚ โ”‚ Service โ”‚ โ”‚ Engine โ”‚ โ”‚ Service โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ Skill Gap โ”‚ โ”‚ LMS Sync โ”‚ โ”‚Notification โ”‚ โ”‚ โ”‚ โ”‚ Analyzer โ”‚ โ”‚ Service โ”‚ โ”‚ Service โ”‚ โ”‚ โ”‚ โ”‚ (Ollama) โ”‚ โ”‚ โ”‚ โ”‚ (Resend) โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ–ผ โ–ผ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ EXTERNAL APIs โ”‚ โ”‚ DATA STORES โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ LinkedIn โ”‚ โ”‚ โ”‚ โ”‚ Supabase (Postgres) โ”‚ โ”‚ โ”‚ โ”‚ Learning API โ”‚ โ”‚โ—„โ”€โ”€โ”€โ”€โ”‚ โ”‚ Users, Quests, XP, โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”‚ Badges, Leaderboardsโ”‚ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”‚ Cornerstone โ”‚ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ Workday โ”‚ โ”‚ โ”‚ โ”‚ Upstash Redis โ”‚ โ”‚ โ”‚ โ”‚ Moodle โ”‚ โ”‚ โ”‚ โ”‚ Real-time XP, cache โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ› ๏ธ Tech Stack

ComponentTechnologyWhy
FrontendSvelteKitWeb app for employees + managers. SSR for SEO of public quest pages.
BackendDeno 2 + Oak or Node.js + FastifyDeno for Mac Mini deployment; Node.js if using more npm packages for LMS integrations.
DatabaseSupabase (PostgreSQL)User data, XP ledger, badge definitions, quest progress. RLS for data isolation between enterprise clients.
CacheUpstash RedisReal-time XP updates, leaderboard rankings, session cache.
AuthSupabase Auth + SAML (enterprise)Email/password for SMB; SAML/OIDC for enterprise SSO.
AIOllama (Mac Mini) + MiniMax APISkill gap analysis, learning path generation, assessment question generation.
Open BadgesBadgr (open source) or CanopyBadge issuance and verification. Open Badges standard = portable across platforms.
EmailResendWeekly digests, badge earned notifications, manager alerts.
SMS (optional)TwilioSlack alerts for top performers who opt in.
HostingCloudflare Pages (frontend) + Deno Deploy (API)Edge deployment, generous free tier.

๐Ÿ—„๏ธ Data Model

organizations
iduuidPrimary key (tenant)
namevarchar(255)Company name
slugvarchar(100)Subdomain slug
planenum('growth','enterprise')
skill_framework_jsonjsonbCompany's target skills (for gap analysis)
brand_config_jsonjsonbColors, logo, white-label settings
users
iduuidPrimary key
org_iduuid (FK)Ref organizations (tenant)
emailvarchar(255)
namevarchar(255)
departmentvarchar(100)For team leaderboards
xp_totalintegerCumulative XP
levelintegerCalculated from XP thresholds
skills_jsonjsonbCurrent skill profile {skill_name: proficiency}
quests
iduuidPrimary key
org_iduuid (FK)NULL = global; otherwise org-specific
titlevarchar(255)"Help the PM close a $2M deal"
typeenum('course','quiz','project','external')Type of activity
external_idvarchar(255)LinkedIn Learning course ID if external
skills_testedvarchar[]Skills this quest develops
xp_rewardintegerXP awarded on completion
estimated_minutesinteger
content_mdtextChallenge instructions
is_mandatorybooleanCompany-assigned mandatory quest
deadlinetimestampDue date if mandatory
quest_completions
iduuidPrimary key
user_iduuid (FK)Ref users
quest_iduuid (FK)Ref quests
scoreinteger0โ€“100 if assessed
xp_earnedintegerActual XP (can differ from reward)
completed_attimestamp
badges
iduuidPrimary key
slugvarchar(100)Unique identifier
namevarchar(255)Display name
descriptiontextHow to earn
criteria_jsonjsonbRules for earning badge
skill_tagsvarchar[]Linked skills
icon_urlvarchar(500)Badge image
issueruuid (FK)Organization or global
user_badges (junction)
user_iduuid (FK)Ref users
badge_iduuid (FK)Ref badges
earned_attimestamp
badge_urlvarchar(500)Open Badge assertion URL

๐Ÿ”— LMS Integrations

LinkedIn Learning API
OAuth2 connection per organization. Poll for course completions daily via GET /learningActivities. Map course content to Skill Quest skills taxonomy. Award XP on completion. Store completion record.
Cornerstone OnDemand
SCORM/xAPI events from Cornerstone. Use Cornerstone's Open Skills API to map training to skills. Enterprise SSO via SAML.
Workday Learning
Workday Learning API. Similar pattern: OAuth, course completion events, skill mapping.
Moodle (open source)
Webhook plugin for Moodle sends events to Skill Quests. Free alternative for education/nonprofits.
๐Ÿค– AI: Learning Path Generation

Agent takes: employee's current skills, target role/skill framework, available quests. Uses Ollama Mistral 7B on Mac Mini to draft a personalized learning path. Path = ordered sequence of quests with weekly milestones. MiniMax API for final polish and formatting.

โ† Requirements  |  All Projects  |  Presentation โ†’