Rulecraft app icon

Game night has a final boss: the rulebook

“Wait… are you actually allowed to do that?”

Everyone has an opinion. Someone opens a PDF. Someone else remembers a forum post from 2018. Your turn becomes a research project.

That pause inspired Rulecraft: a board game companion that helps you answer the question, check the source, and get back to the people around the table. It also looks after the rest of the evening: your collection, who goes first, shared life totals, and music that fits the game.

Two native apps: iOS is live on the App Store. Android is built and awaiting Google Play review.

▶ Watch the 98-second demo

1. Make the answer useful mid-turn

“Where can I place this?” and “How do I calculate the score?” need different kinds of explanation.

Rulecraft starts with a short ruling, then presents the detail in native cards. Both apps support 25 structured answer formats: steps, comparisons, board grids, scoring breakdowns, timelines, decision trees and more. Sources stay attached so you can inspect the reasoning behind the answer.

Three illustrative answer formats: a board grid, a scoring breakdown and a decision tree

The backend produces a typed answer; each app renders the relevant pieces using its own native components. That shared contract is one of the most useful decisions in the project: information gets a shape that makes sense at the table.

▶ See an actual answer in the demo, at 0:29

2. Give the answer something to stand on

The interesting engineering problem starts before a sentence appears: what evidence is available for this game?

When source documents are ready, Rulecraft uses the stored original rules. When usable rules are not ready, grounded web research can answer the question while document preparation runs in parallel. The next question can benefit from that work.

Two research routes converge on evidence checks and either a cited result or insufficient evidence

The backend uses TypeScript, Firebase and Gemini. It saves the request, performs the longer research work in the background, and exposes progress and results through Firestore. The apps follow that job as it develops.

Trust also needs explicit rules in code:

Situation How Rulecraft handles it
An answer cites a source Source references are checked against the evidence available to the request.
No official source is available Confidence is capped at medium.
Evidence is missing or conflicts Return an explicit no-answer result, with a useful explanation or a prompt to rephrase.

“I don't know” is a supported outcome. A confident voice should never be the only reason to trust a ruling.

3. Give the dungeon a soundtrack

An epic dungeon deserves a fitting soundtrack. Somebody's shuffled commute playlist has other ideas.

Rulecraft builds atmosphere around the game: a musical foundation plus environmental layers, with Pro controls for the mood and mix. The backend selects tracks and ambience; the apps mix them locally.

Music and ambience combine into a mix, and the music level drops while a spoken answer plays

There is a practical challenge behind the mood: music, spoken answers and the microphone all share the same phone. The audio coordination lowers music around speech and handles microphone use so the answer can be heard and the question can be captured.

▶ Hear the music feature in the demo, at 0:49

4. Native on both platforms

I built separate interfaces for iOS and Android, connected to the same backend and data contracts.

The SwiftUI iOS app and Kotlin Compose Android app share Firebase APIs and domain contracts

On iOS, SwiftUI and The Composable Architecture organize the experience; Liquid Glass, Metal effects and haptics add the tactile details. On Android, Kotlin, Jetpack Compose, ViewModel, StateFlow and Hilt provide the native structure, with platform speech and media controls.

Both keep transport details behind repositories and feature-facing dependencies. That makes the important behavior easier to reason about: a UI update should not also have to understand a Firebase response or decide a subscription policy.

5. RevenueCat: make the allowance fair

The paywall is a native part of Rulecraft's interface, with the same pink palette, liquid surfaces and care for typography as the rest of the app. It explains what Pro adds, then presents the packages returned by RevenueCat.

Rulecraft native iOS paywall: Free and Pro benefits

The native iOS paywall, captured in the app.

RevenueCat supplies the pro entitlement, tied to the Firebase user identity for purchases and restores. Pro adds unlimited questions, voice mode, music moods and mix controls, background playback and no ads.

An unanswered question should not spend your allowance

Free players get three rules questions per week. Rulecraft deducts a question when the backend accepts a request, then returns it if research ends with no answer or the request fails. Retrying the same request does not spend another question.

A free question is reserved when research starts and returned if the request fails or produces no answer

This is enforced on the server. Saving a request and deducting its question happen together; settling the result and returning a question happen together too. Repeated callbacks cannot return the same question twice, and an old refund cannot become a bonus in a new week.

Subscription uncertainty gets similar care. If the free allowance is exhausted but subscription status is unresolved, the backend checks RevenueCat before turning the player away. A temporary entitlement-service failure has bounded grace instead of immediately locking out a subscriber.

For an occasional game night, there is also an ad-backed, 12-hour music pass for one game. It survives an app relaunch and leaves the question allowance unchanged. The pass is separate from Pro: it opens that game's soundtrack without granting the subscription's broader controls.

What building Rulecraft taught me

A valid response can still be a bad ruling

Correct JSON is only the beginning. A polished sentence can cite weak evidence, confuse an expansion with the base game, or sound more certain than its sources justify. Rulecraft checks source references and caps confidence according to the evidence available. Missing or conflicting rules can lead to no answer. Checking structure, checking attribution and establishing correctness are different problems. The product has to make that uncertainty visible and give the player a useful next step.

The format does some of the explaining

A placement question benefits from a board grid; a score calculation benefits from a breakdown. Committing to a typed answer contract made those differences part of the product. The backend describes the information, and SwiftUI and Compose turn it into native components, with the sources still attached. The lesson was to design for the next action at the table: checking a total, following a branch, or finding the exception to a rule.

The first question and the next question have different jobs

Preparing every document before helping anyone would make the first player wait through the entire setup. Rulecraft can research the current question while preparing sources for later ones. Saving a durable job first gives both apps something to follow through a reconnect. That separated two engineering goals: useful feedback during the current request, and reusable work that helps the next request.

The small promises need the most careful state

“Three questions a week” sounds simple until a request is retried, two jobs finish together, or a refund arrives after the weekly reset. The same applies to sound: music should make room for an answer, and microphone use should not leave playback in the wrong state. Handling those transitions became part of the product, alongside the visible screens. A dependable game-night companion has to recover gracefully when the evening does not follow the happy path.

The result I care about is still the ordinary one: someone asks a question, the table checks the answer, the phone goes down, and the next turn begins.

Try Rulecraft on iOS · Android: awaiting Google Play review

Built With

+ 4 more
Share this project:

Updates

posted an update —

Android app already passed all the checks, now is waiting for Google to review it! :) iOS is already updated on the App Store. I've redesigned the app and use Metal to improve some visuals, so AppStore screenshots are outdated. Working on it!

Log in or sign up for Devpost to join the conversation.

Submission history