Skip to content
Grimoire

Grimoire

Grimoire (hereinafter the “Application”) is a daily rune-deduction puzzle from SpellWare. Each day hides a spell made of four runes. You have six attempts to work out which runes it contains and where they sit, and every guess tells you how close you were.

This section is for those interacting with a live instance of the Application.

The Application is available at grimoire.spellware.dev.

You can play straight away, without an account. If you sign in with Discord, the Application keeps your streaks, statistics, achievements and profile. Signing in only asks for the identify scope, so the Application never sees your email address.

There are twelve runes in four elements, with three runes in each:

ElementRunes
FireEmber, Flare, Cinder
WaterTide, Frost, Mist
EarthRoot, Stone, Moss
AirGale, Wisp, Zephyr

A spell is made of four different runes, so a guess cannot use the same rune twice. Choose four runes and cast your spell. Every rune you cast is scored in one of four ways:

ResultMeaningHow it looks
ExactThe right rune in the right placeA solid tile with a filled diamond
PresentThe rune is in the spell, but in a different placeA white tile with a heavy outline and a ring
KindredThe rune is not in the spell, but it shares an element with the rune that belongs in that placeA tinted tile with a dashed edge and a half-filled circle
AbsentNone of the aboveA plain tile with no mark

The palette of runes also marks what you have learned. A rune you know is in the spell has a diamond or a ring, and a rune you know is not has a cross and a line through its name.

Click a rune, or press the key printed on it. The keys are 1 to 9 for Ember, Flare, Cinder, Tide, Frost, Mist, Root, Stone and Moss, then 0 for Gale, the minus key for Wisp and the equals key for Zephyr. Backspace takes the last rune out, and Enter casts the spell.

Each element is drawn in its own colour (red for fire, blue for water, green for earth and gold for air), and runes that could still be in the spell glow softly. The colour is only a help. Every rune has its own shape, and every result has its own mark and is also described in words for screen readers, so nothing depends on seeing colour.

There is one puzzle a day. Puzzle 1 was on 1 December 2026, and a new puzzle starts at midnight Pacific time. The day is counted on the Pacific calendar, so a puzzle still starts at midnight through daylight saving changes. When you finish, the Application shows a countdown to the next puzzle.

Use the Share button to copy your result. It contains your guess count and a row of symbols for each guess, and it never reveals the spell. You can post it in the #grimoire channel of the SpellWare Discord server, where players share their daily progress. Please keep the spell for any puzzle out of that channel, because every puzzle in the archive can still be played, and put any talk about how to solve a puzzle in spoiler tags.

Any earlier puzzle can be played from the archive, newest first. Archive plays count towards your statistics and achievements, but never towards a streak. If you are signed in, the archive shows which puzzles you solved, failed or started.

A guest’s guesses are kept in the browser. Clearing the browser’s storage removes them. When you sign in, the Application brings the puzzles you finished as a guest into your account. Because nothing can prove when a guest played, those puzzles count like archive plays: they appear in your statistics and achievements, but do not count towards a streak. A puzzle you have started but not finished, and today’s puzzle, are carried over when you open them.

Your profile shows the number of puzzles you have played, your win rate, your current and longest streak, your average number of guesses, your points and a chart of how many guesses your wins took.

A streak is a run of consecutive puzzles, each solved on its own Pacific day. A puzzle counts if you started it on its own day, even if you finish just after midnight. Missing a day, failing a puzzle on its own day or solving one from the archive ends or skips the streak.

There are 17 achievements. Each earns points, and some also earn a badge.

AchievementHow to earn itPoints
First CastSolve your first puzzle5
ApprenticeSolve 10 puzzles10
AdeptSolve 50 puzzles25
ArchmageSolve 100 puzzles50
Grand ArchmageSolve 365 puzzles100
Warming UpSolve puzzles on 3 days in a row5
Week KeeperSolve puzzles on 7 days in a row10
Month KeeperSolve puzzles on 30 days in a row25
CenturionSolve puzzles on 100 days in a row50
Year KeeperSolve puzzles on 365 days in a row100
Close CallSolve a puzzle with your very last guess5
PhoenixSolve a puzzle straight after failing the one before it10
HistorianSolve 10 puzzles from the archive10
ElementalistMake a guess that uses a rune from every element5
Kindred SpiritsMake a guess where every rune is kindred to the spell10

Two more achievements are hidden until you earn them, and they are worth no points. Knowing the answer makes them easy, so they are only a mark of luck or skill.

Your own profile lists every achievement that is not hidden, with how far you have got and a progress bar. Each achievement has its own icon, and the ones you have not yet earned are dimmed.

A badge is flair that you can show on your profile. You choose one as your primary badge. Badges come from three places:

  • Achievement badges are unlocked by First Cast, Archmage, Week Keeper, Month Keeper, Centurion, Year Keeper and Phoenix.
  • Awarded badges are given by an administrator: Founder, Staff, Supporter, Contributor and Beta Tester.
  • SpellWare Member is given automatically to members of the SpellWare Discord server. You are never asked for any extra permission for it.

Every player has a public profile at /u/ followed by their profile address. The address is made from your Discord username when you first sign in. It has 3 to 24 lower case letters, digits and hyphens, it is unique, and you can change it in the settings.

In the settings you can choose a display name to show instead of your Discord name, write a bio of up to 280 characters and choose your primary badge. Your name and bio are shown exactly as you typed them, as plain text.

Profiles are public by default. You can make yours private in the settings, and then it behaves as though it did not exist: nobody else can see it, and you do not appear on the leaderboards.

You can upload a picture, copy your Discord avatar once, or use one of the default avatars. A copy is fetched once and then becomes a picture of the Application’s own. Nothing is ever loaded from Discord in other people’s browsers.

  • Uploads can be PNG, JPEG, WebP or GIF, up to 2 MiB, and you can upload ten an hour.
  • Whatever you upload, the Application makes a new 256 pixel square WebP picture from its pixels and throws the original away. That removes details such as the location in a photo, turns a photo the right way up, and keeps only the first frame of an animation.
  • If you have no picture, you have one of six default avatars, chosen from your Discord ID.

There are three leaderboards: the longest current streaks, the longest streaks ever, and the most wins. A player is listed when all of these are true:

  • Their profile is public and has not been hidden by a moderator.
  • They are not banned or delisted.
  • Their account is at least 7 days old.
  • They have finished at least 7 puzzles.
  • They have no flag from the fair play checks that is open or confirmed.

Streaks only count puzzles solved on their own day. Wins count every puzzle solved, including those from the archive. A current streak board is often empty, because a streak that is no longer alive today does not count.

If you see a profile or an avatar that you think breaks our rules, open that player’s profile and use Report this player. You choose whether you are reporting their name, bio and address or their uploaded avatar, then give a reason and, if you want, a note of up to 300 characters. The reasons are harassment, impersonation, inappropriate content, personal information, spam and something else, which needs a note.

A report only asks a moderator to look. Nothing happens to the player because of it, however many people report, and a group cannot get somebody hidden by reporting them together. The player is never told that anyone reported them, or who. You can report the same thing only once, you cannot report yourself, and you can make 20 reports a day.

The Application cannot stop a determined cheater, so it aims to make cheating unrewarding and to notice the obvious cases:

  • Lucky achievements are hidden and worth no points.
  • Automatic checks raise a flag when a pattern looks unusual, such as solving on the very first guess, sending guesses almost at once, or solving a long run of puzzles with an efficiency that few players reach. A flag only asks a moderator to look. Nobody is banned automatically, and the player is never told.
  • Moderators can clear or confirm a flag, take a player off the leaderboards without changing anything else, hide a profile, take down an avatar, give or take back awarded badges, and ban a player. A ban ends their sessions and refuses their login. Every action is written to a log.

An honest player can trip a check by being lucky, quick or consistent, which is why every flag is reviewed by a person.

If you have feedback or a bug report, please let us know in the Discord community. Share your daily progress in the #grimoire channel of the same server.

This section is for those interested in running their own instance of the Application. The Application is closed source, so this section describes how it is built and configured rather than linking to its code.

The Application is a pnpm monorepo, version 0.1.0, that requires Node.js 24 or newer.

PackageWhat it holds
packages/sharedThe rune catalogue, the scoring rules, spell generation, the solver, the achievements, badges and leaderboard rules
apps/serverFastify, MongoDB, Discord login, Cloudflare R2 avatar storage and the page server
apps/clientThe browser app, built with Vite and plain TypeScript with no framework

The server uses Fastify with the cookie, Helmet and rate limit plugins, the official MongoDB driver, the AWS S3 client for Cloudflare R2, Sharp for pictures and @nhcarrigan/logger. Errors go to the alerts server through the logger.

There are 11,880 possible spells. A solver plays every one of them the way a careful player would, always guessing a spell that is still possible. Daily puzzles are drawn only from the 9,561 spells that the solver clears in four guesses or fewer, which is about 26 years of puzzles. The order is a one-off shuffle that is fixed in the server’s source and never sent to the browser. It must not be regenerated or reordered once the game is live, because players are partway through it, and a test fails if the rules, the runes or the solver change underneath it.

The server holds no state about a guess. The browser sends the puzzle number and every guess so far, and the server scores them and reveals the spell only once the puzzle is finished. For a signed-in player the same request saves the game, and the guesses must carry on from what is already saved, so a stale tab or a second device cannot rewrite a game.

A player’s statistics, streaks and achievements are recalculated from all of their plays whenever a play finishes. Nothing is incremented, so recalculating is safe to repeat.

Every variable is listed in prod.env, with secrets as 1Password references.

VariableRequiredPurpose
PORTNoThe port the app listens on, bound to 127.0.0.1. Defaults to 3000
PUBLIC_URLYesThe public address, used for the OAuth redirect and to check where changes come from
DISCORD_CLIENT_IDYesThe Discord application’s client ID
DISCORD_CLIENT_SECRETYesThe Discord application’s client secret
DISCORD_BOT_TOKENYesThe token of a bot that is in the SpellWare server, used to check who is a member
DISCORD_GUILD_IDYesThe Discord server whose members earn the member badge
ADMIN_DISCORD_IDSNoThe Discord IDs of the administrators, separated by commas. Leave it empty for none
R2_ACCOUNT_IDYesThe Cloudflare account that holds the avatar bucket
R2_ACCESS_KEY_IDYesThe access key for the bucket
R2_SECRET_ACCESS_KEYYesThe secret for the access key
R2_BUCKETYesThe name of the private bucket where avatars are stored
MONGO_URIYesThe MongoDB connection string
MONGO_DATABASENoThe database name. Defaults to grimoire
LOG_TOKENNoThe alerts server token. When it is empty, errors go to the console
CLIENT_DISTNoThe built browser app. Defaults to ../client/dist

The server refuses to start if a required variable is missing.

  1. Create the Discord application and add the redirect https://grimoire.spellware.dev/auth/callback. Only the identify scope is used.
  2. Invite a bot to the SpellWare server. It needs no special permission, because it only looks members up.
  3. Create a private Cloudflare R2 bucket for avatars, and an access key that can read and write it.
  4. Create the item in 1Password with the fields prod.env refers to, and set PUBLIC_URL to https://grimoire.spellware.dev.
  5. Add the server block for grimoire.spellware.dev to the NGINX configuration and reload NGINX. It proxies the app on its local port, and allows request bodies of up to 3 MiB, because an avatar may be up to 2 MiB and the default limit is 1 MiB.
  6. Build and start the app with pnpm install && pnpm build && pnpm --filter @grimoire-daily/server start. The start script runs the server through op run, which resolves the secret references.

Pictures are kept in the private R2 bucket under random identifiers, and the server serves them itself. Because the bucket is not public, a moderator’s removal takes effect at once, and browsers and proxies keep a copy for an hour at most. An upload is judged by what the file really is and not by its name or content type, and a picture of more than 25 million pixels is refused before it is decoded. There is no automatic scan of uploads beyond Cloudflare’s own CSAM scanning of what passes through its cache, so avatars are reported and removed by hand.

  • Every page response carries a Content Security Policy with a fresh nonce on each script, plus the other Helmet headers. The raw index.html is never served as a file, because it would have no nonce. The policy allows inline event handler attributes, because the consent banner from the shared headers script needs them, so the client always shows text from other people as text and never as markup.
  • Login, uploads, reports, imports and the administrators’ routes are rate limited, and every request that changes something must come from the Application’s own address.
  • Only a hash of each session token is stored, a session lasts seven days, and MongoDB removes expired sessions on its own.
  • The reported player is never told who reported them, and a private, hidden, banned or missing profile all get the same 404.

The Application loads the shared SpellWare headers script from cdn.spellware.dev/headers/index.js, which brings the layout, footer, consent banner, Google Analytics, HubSpot tracking and the community popup. The page opts out of the shared header only, because the Application has its own navigation bar. The Application sends no analytics events of its own.

The Application inherits SpellWare’s global legal documents:

  1. Privacy Policy: https://docs.spellware.dev/#/privacy
  2. Terms of Service: https://docs.spellware.dev/#/terms
  3. License: https://docs.spellware.dev/#/license
DataKept
Discord ID, username and avatar identifierKept so that you can sign in, be shown to others and copy your Discord avatar
Display name, bio, profile address, primary badge and privacy choiceKept until you change them
Uploaded avatarThe processed 256 pixel WebP picture only. The original is never kept
Your guesses and when the server first saw each oneKept for every puzzle you play while signed in, so that your games can be restored and unusual patterns can be found
Statistics, streaks, achievements, points and badgesKept, and recalculated from your plays
Whether you are in the SpellWare Discord serverRemembered for 24 hours
Session tokensOnly a hash of each token is kept, and it expires after seven days
Reports about a profile or an avatarThe reason, an optional note and who reported, which only administrators can see
Fair play flags and the moderation logKept, and only administrators can see them

The Application sets two cookies. The session cookie holds your session while you are signed in, and a short-lived cookie holds a one-off value while you sign in with Discord. Both are used only to sign you in. A guest’s guesses are kept in the browser’s local storage, and the page you were on when you chose to sign in is kept in the tab’s session storage, until you return. None of these are sent anywhere else.

The Application is closed source and does not accept code contributions. Feedback and bug reports are welcome in the Discord community.

For maintainers, the project uses:

  • TypeScript with ESLint and a zero warnings policy.
  • Vitest for tests, with 100% coverage enforced in every package. The server tests start their own in-memory MongoDB, so no database is needed.
  • pnpm for package management.
Terminal window
pnpm install
pnpm lint
pnpm test
pnpm build

To check how fair the puzzles are, run pnpm balance. It plays every possible spell with the solver and reports how many guesses it needs, which is 3.86 on average with all twelve runes and never more than six.

To run locally, set PORT=3000 and PUBLIC_URL=http://localhost:5173 in a copy of prod.env that you save as dev.env, and add http://localhost:5173/auth/callback as a redirect in the Discord application. Then start the server, and run the Vite dev server, which proxies /api, /auth and /avatars to it:

Terminal window
pnpm --filter @grimoire-daily/server build
op run --env-file=dev.env -- node apps/server/prod/index.js
pnpm --filter @grimoire-daily/client dev