SoloQ Journal is a SvelteKit app for reviewing League match history and getting AI coaching based on real match stats plus recent historical trends.
- Multi-region summoner search (EUNE, EUW, NA, KR, JP, BR, OCE, RU, TR, LAN, LAS, SA)
- Saved profiles sidebar with quick re-open and delete
- Match history grouped by day with daily W/L badges
- Champion filter for match history
- Load-more pagination for older matches
- Detailed match cards with KDA, CS/min, KP, items, and summoner spells
- AI coaching review per match (streamed response)
- Coaching prompt tuned for one-off vs recurring patterns using historical counters
- Data confidence signal for coaching quality based on sample size + available stats
- Reflection modal for journaling match notes
- Reflection and saved profiles persisted in localStorage
- Tilt warning banner on active losing streak
- SvelteKit 5 + Svelte 5 runes
- TypeScript
- Tailwind CSS v4
- Lucide Svelte icons
- Riot Games API (match data)
- Gemini API via
@google/genai(AI coaching)
src/
lib/
components/
CoachingPanel.svelte
MatchCard.svelte
server/
riot.service.ts
gemini.service.ts
utils/
coaching.ts
ddragon.ts
profile.svelte.ts
types.ts
routes/
+page.svelte
+page.server.ts
api/
summoner/+server.ts
coaching/+server.ts
- Node.js 18+
- npm
- Riot API key
- Gemini API key
npm installCreate a .env file in the project root:
RIOT_API_KEY=your_riot_api_key
GEMINI_API_KEY=your_gemini_api_keynpm run devnpm run dev- start dev servernpm run build- production buildnpm run preview- preview production buildnpm run check- Svelte + TypeScript checksnpm run check:watch- watch mode checks
GET /api/summoner- Fetches summoner profile + matches
- Supports
offsetfor pagination
POST /api/coaching- Accepts structured coaching payload
- Streams plain-text coaching response
- Includes app-level request throttling
- Works on Vercel with current SvelteKit config (
adapter-auto) - Add
RIOT_API_KEYandGEMINI_API_KEYin hosting env vars - For small friend-only testing, current setup is sufficient
- For public launch, use proper Riot key type and stronger shared rate limiting
- Development keys are temporary and expire frequently
- Keep keys server-side only (never expose in client code)
- Follow Riot policy before opening app publicly
- Privacy policy route:
/privacy - Terms of use route:
/terms - Support route:
/support - Support contact:
support@soloqjournal.dev - Riot legal disclaimer is shown in the global footer
- Analytics only starts after explicit consent
- AI coaching requires explicit consent (
soloq:ai-consent-v1) before data is sent to the coaching endpoint - Users can export and clear local browser data from the saved profiles sidebar
- Register the product in Riot Developer Portal and submit for audit/approval.
- Use one production key per product as required by Riot policy.
- Provide reviewer screenshots for:
- Footer disclaimer and legal links
- Privacy page (
/privacy) - Terms page (
/terms) - AI consent gating before coaching
- Local data export and clear actions
- Confirm support contact and response channel are active (
support@soloqjournal.dev).
Educational project. Follow Riot and Google API terms when deploying.