KANA CARDS

Account

Username

Letters, digits, underscore (_) and hyphen (-) only. Names that look like staff or the league (admin, Kanaliiga, support…) are not available.

Password

Changing your password logs out your other devices. To end every session now, including this one:

Signed-in devices
Signed inLast active

Dota 2 Player

If you play in the league, link your OpenDota account ID. Tags an admin has given you then appear as stickers on your cards and next to your name on the leaderboard.

Your Tags

Twitch

Kana Cards never asks for your Twitch or website password inside Twitch.

My Roster

This week: — pts Season: — pts

Draw

Chance per draw

Common
—
Rare
—
Epic
—
Legendary
—
1 token for a random player, or 3 for a player from a team you pick. You get players you don't own yet first.

Promo code

Season Standings

RankUserSeason pts
—

Weekly Standings

RankUserWeek pts
—

Players

Player Team Matches Avg pts Total pts MVPs
—

Player average performance

#PlayerMAvg
—

Single match performance

RankPlayerFantasy pts
—

MVP leaderboard

RankPlayerMVPs
—

Teams

TeamMatchesPlayers
—

Season Schedule

Getting Started

Kana Cards is a fan-made card game built on the Finnish Dota 2 league. Draw player cards, put up to 5 on your roster, and score points from how those players perform in real league matches each week.

A short walk through drawing, your roster, points and the Weekly Report on My Team.

Cards & Drawing

  • Each card is a real league player in one of four rarities: Common, Rare, Epic, Legendary.
  • Draw a card for 1 token. You get players you don't own yet first; duplicates only appear once you own a card of every available player.
  • A team draw costs 3 tokens and gives one card from a team you pick. Rarity uses the same odds as a normal draw, and you get a player from that team you don't own yet, until you own them all. Fully collected teams are greyed out in the team picker.
  • Rarer cards add a percentage bonus to their score (see Rarity Bonus below) and can carry stat modifiers that boost specific stats.

Roster & Weekly Lock

  • Put up to 5 cards on your active roster. Cards on the bench don't score unless subbed in.
  • Change your roster freely until the week locks automatically. After that, it is fixed for the rest of the week.
  • Locked cards earn points from every league match played that week.
  • Bench substitution: after the week ends, a roster card whose player didn't play is swapped for your first bench card whose player did. Bench order matters: the leftmost bench card comes in first.

Earning Tokens

  • +1 token at the start of each new week.
  • Token drops on Twitch: viewers who joined in the Kana Cards panel can win one each time the streamer confirms a match MVP.
  • Promo codes from admins give bonus tokens.

Watching on Twitch

Play in the panel

  1. On the league's Twitch stream, open the Kana Cards panel. The Live tab shows MVPs, top performers and the next match to everyone.
  2. Logged in to Twitch, press Join Kana Cards. It uses your Twitch login, with no sign-up or password.
  3. Draw cards, build your collection and set your weekly roster in the panel's Cards and Roster tabs.

Panel players keep their own collection, separate from website accounts, and do not appear on the leaderboards. Keeping the panel open makes you eligible for a token drop whenever the streamer confirms a match MVP. Already have a website account? Connect Twitch on your Profile (you sign in on Twitch), and the panel then plays with that account; a collection you started in the panel can be added to it once.

Looking to broadcast instead of watch? See the Streamers subtab above.

Scoring & Modifiers

Each match, a player's in-game stats are multiplied by the weights below and added up. Deaths work the other way: each game starts with a survival bonus that shrinks with every death, never below zero.

Stat Weights

StatPoints per unit
—

Rarity Bonus

Percentage added to a card's total score.

RarityBonus
—

Card Modifiers

Assigned when the card is drawn. Each one boosts one stat's points.

RarityModifiers
—

The match MVP confirmed by the streamer (see the Streamers subtab) gets an extra bonus for that match. It is added after the fact and shows in every leaderboard and roster total. Current MVP bonus: —.

Points are shown to one decimal. Totals are rounded from exact points, so card values may differ by 0.1 in sum.

Admins set these values and may change them between seasons. The tables always show the current values.

Linking Your Dota 2 Profile

You don't need a Fantasy account for your match performance to count: every card of you scores for whoever holds it, from your in-game stats each week. Linking your Dota 2 profile is optional and only changes how your own tags are shown.

How to link

  1. Register or log in to a Fantasy account, then open the Profile tab.
  2. Enter your Dota 2 (OpenDota) player ID in the linking field and save.

You can change or remove the ID at any time from the Profile tab.

What linking unlocks

  • Tags admins have given you (for example a caster or player-of-note tag) appear as sticker badges on your cards and as chips next to your name on the leaderboard.
  • Without linking, your tags still exist but aren't shown on your cards or leaderboard entry.
  • The Your Tags section in Profile lists your tags and reminds you if you have tags but haven't linked your ID.

Applying & Installing

Getting access

  • Kana Cards is still in Twitch testing (Local Test), so your channel must be added as a tester first. Ask a Kana Cards developer for a test install link.
  • Once the extension is publicly released, anyone can install it from the Twitch Extension Manager.

Installing

  1. Add the Kana Cards extension to your channel from the Twitch Extension Manager, or with the test install link.
  2. No URL configuration is needed. A Quick Actions panel appears in your Stream Manager's Live Config view.

Selecting a Match MVP

Using Quick Actions

  1. After a match, open Quick Actions in Twitch Stream Manager and click Select match MVP.
  2. Pick the series (team vs team), then the match (Match 1, Match 2…), then the player, and confirm.

Matches appear as soon as they start, so you can pick the MVP right after the game. Until the full match data arrives, the match is marked Live or Stats pending, and the MVP bonus is added once it does.

Only matches from the 5 most recent series are listed. Your channel needs the league's approval before it can confirm MVPs; until then the MVP tool says it is waiting for approval.

What confirming does

  • Viewers who joined in the Kana Cards panel and are watching your stream get a one-time token drop (the chat names the MVP and how many viewers received a token). Changing the MVP for the same match later doesn't drop tokens again.
  • The MVP gets a fantasy score bonus for that match, which shows in every leaderboard and roster total.

Design Overview

Kana Cards is one Python web service with a plain JavaScript front end and a single SQLite database. This page explains how the pieces fit together and why they were built this way. Code-level detail, setup and configuration live in the README and feature docs on GitHub, linked at the bottom.

How it fits together

  • Backend: a FastAPI application, split into routers by area (accounts, cards and roster, leaderboards, schedule, admin tools, Twitch). It runs as one uvicorn process in one Docker container behind an HTTPS reverse proxy.
  • Data: SQLite through SQLAlchemy, stored as one file on a mounted volume.
  • Front end: static HTML and vanilla JavaScript files served by the same application, with Alpine.js for small pieces of UI state. There is no build step.
  • Background work: four threads inside the same process poll for new league matches, lock weeks and grant weekly tokens, enrich player profiles, and take database backups.
  • Match data: pulled from a public Dota 2 match statistics API for each monitored league. Polling speeds up while a league game is live, and matches are fetched again once their replay has been fully parsed.
  • Twitch: the extension (a viewer panel and broadcaster controls) talks to the same backend. Its requests are signed by Twitch and checked on the server. MVP picks are announced through Twitch chat and extension messages.
  • Other integrations: result sync to Toornament, SMTP for password-reset email, Pillow for card images, and an optional AI model for player bios.

Design decisions

  • Cards generated at draw time — each draw rolls a rarity from configurable weights and picks a player you don't own yet, instead of taking cards from a shared pre-built pool. There is no deck to seed or rebalance when players join mid-season, and admins tune drop rates by changing weights.
  • SQLite with safety nets — one small league and one server process don't need a database server, and a single file keeps hosting simple. To protect it, numbered migrations run at startup, automatic backups are taken daily and kept for 14 days, admins can take a backup on demand, and a backup script runs before every deploy. The trade-off is a single process: rate limits are kept in memory and the app does not scale across machines.
  • Seasons run by admins — league seasons don't follow fixed dates, so admins create the weeks, end a season and archive its standings from the admin panel. Weeks lock automatically when they start. Earlier versions used environment-variable season dates, which needed a redeploy for every change.
  • Demo Mode — with DEMO_MODE=true, an admin clock override and disposable demo accounts show the whole pre-lock → lock → scored cycle on demand, without waiting for a real week. Match polling is off in this mode, and without it the demo endpoints don't exist.
  • Tags separate from profile linking — admin-granted tags (card stickers, leaderboard chips) are their own feature, not part of profile linking. A new tag needs only a database row and an image, and a tag exists even before its player links a profile.
  • Safe by default — the app refuses to start with unsafe settings, such as a missing secret key or HTTPS turned off in production. State-changing requests from other sites are rejected, and logins and other sensitive actions are rate-limited.

Read more

User Management

UserTagsTokensActions
—
Twitch collection merges

Merges of a Twitch panel collection into a website account in the last 30 days. Reverse recreates the Twitch viewer account and moves its cards, tokens and locked-week rosters back. Showing or reversing merges needs your password.

Twitch status

This server's Twitch settings and the panel traffic it has seen since the last restart. Fix every Problem row first; the Twitch console block lists what only the developer console can show.

Approved streamers

Twitch channels that may set match MVPs, which also moves fantasy points and drops tokens. A channel appears under Waiting for approval when its broadcaster opens the MVP tool. Approve, Reject and Remove need your password.

Superseded player id claims

Accounts whose self-reported player id was cleared because a Steam-verified account has that id.

Cleared onVerified accountPlayer idWhen
—

Week Management

LabelStartEndLockedRosters
—

Player Management

NameTeamOpenDota IDActive CardsStatus
—

Audit Log

TimeActorActionDetail
—

League Management

IDNameMatchesMonitoredActions

Tag Definitions

Define tag types. Grant them to users via User Management above.

KeyLabel
—

Promo Codes

CodeTokensUsesLimits
—

Scoring Weights

StatWeight
—

Notifications

Broadcast a one-time message to all logged-in players during the active window.

MessageStartEndSeen
—

Token Grant Events

All logged-in players claim tokens automatically during the active window.

TokensStartEndClaims
—

Refresh Schedule Cache

Busts the in-memory cache and re-fetches from the Google Sheet.

Recalculate Fantasy Points

Applies current weights to all stored match stats.

Re-enrich Player Profiles

Fetches hero stats and ban data for all players, then regenerates AI bios if ANTHROPIC_API_KEY is set.

Season Lifecycle

Archive final standings before resetting for the next season. Standings are computed live and are destroyed by reset — always run End Season first.

Deletes matches, weeks, stats, the Player Pool, and all cards — retains users, tags, archives
SeasonArchivedUsers
—

Database Backups

Backups are stored on the server and deleted automatically after N days. Download a copy before deploying if you need to keep it.

FilenameCreatedSize
—

Matches

MatchLeagueTeam 1Team 2Start TimeLive seenStats inMVP pickedParseScoringMVPVODAction
—