RMU. Home
es · Leer esta página en español
Back to work

Side project · Automation

Añakleta

A private panel for the co-leaders and a Discord bot that automate running the clan (members, wars, leagues and reminders), connecting Discord, the game's API and Supabase through scheduled jobs.

Añakleta, Discord bot: the shield with the bot between a barbarian and an archer, over a landscape of castles
Role
Design and development
Period
Jul 2026 — now
Stack
  • Next.js
  • React
  • TypeScript
  • Tailwind CSS
  • Supabase
  • Node.js
  • discord.js
  • GitHub Actions

Why it exists

Running an active Clash of Clans clan means keeping track of dozens of players: who attacks in war, who signs up for the league, who hasn’t shown up for days. I built it for my clan. It brings all of that into a private panel for the co-leaders and hands the repetitive work to a Discord bot.

What it does

  • Panel: members with their history and linked accounts, activity and streaks, wars attack by attack, warnings and sanctions, league sign-ups and seasons, rankings and capital raids. Plus a rules editor and an announcement composer for Discord.
  • Bot: league sign-up by typing naturally (“I’m in”) or with commands, a welcome by direct message, and nickname and roles set from the player’s game account.

Architecture

The panel (Next.js 16 with Server Actions, on Supabase) and the bot (Node with discord.js) are deployed separately and only talk through the database. There are no queues: GitHub Actions triggers the scheduled jobs against protected panel routes. There’s a clan snapshot every six hours, war capture and reminders every hour, and daily syncs. All of them are idempotent, so re-running one never duplicates anything.

Añakleta's architectureGitHub Actions triggers the scheduled jobs against the panel, which queries the Clash of Clans API. The co-leaders use the panel and the players talk to the bot on Discord. The panel and the bot only share the Supabase database.GitHub ActionsScheduled jobsCo-leadersUse the panelDiscordClan playersGame APIClash of ClansPanelNext.jsBotNode and discord.jsSupabaseThe only thing they share
Añakleta's architectureBuilt for the projectDataExternal

Decisions

Understanding free text without false positives. The bot recognizes intent despite typos, but only applies edit distance to long, specific words. On short ones, a typo would end up triggering actions nobody asked for.

Telling inactivity from a season reset. Periodic clan snapshots show whether someone has stopped playing or the game has simply reset the season.

Independent pieces. Since the panel and the bot only share the database, either can be updated or restarted without affecting the other.

Outcome

In production for my clan since summer 2026. It’s tailored to it, but it can be adapted to any other. Like everything I build on my own, it comes from automating a real need, and I publish it so others can use it.

Añakleta is a fan project: it is unofficial and not endorsed by Supercell. See Supercell’s Fan Content Policy (opens in a new tab).