Emojitsu is an async multiplayer emoji auto-battler RPG. Players pick an emoji, name it, equip up to three permanent cards at the start, and challenge other emojis in server-simulated round battles. Opponents do not need to be online: when they return, they see how many battles happened, which ones were won or lost, and which rewards were earned.
- Next.js App Router
- React + TypeScript
- Supabase Auth + Postgres
- Supabase Row Level Security for player-owned data
- Vitest for isolated game-rule tests
The core rule code is intentionally independent from React and Supabase:
src/lib/game/
battle-engine.ts deterministic round simulation
calculate-power.ts central combat-power formula
cards.ts starter card catalog
leveling.ts XP and level progression
matchmaking.ts power-range opponent selection
rewards.ts weighted card rewardsThe client never decides battle outcomes. A server path should:
- load both character loadouts and decks,
- simulate the battle with a server-generated seed,
- persist the battle log, XP changes, and card reward,
- return the battle id so the UI can replay the stored log.
Initial schema lives in:
supabase/migrations/20260609175505_initial_schema.sqlTables:
profilescharacterscardsplayer_cardsdeck_slotsbattles
All public tables have RLS enabled. Client-visible keys must be provided via:
NEXT_PUBLIC_SUPABASE_URL=https://xqbnqfntxeaqbcjakzfd.supabase.co
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=sb_publishable_WSExgYEUSmMbfKqCkCoOuA_UQsUHRRKCopy .env.example to .env.local for local development.
Project:
- Supabase project:
Emojitsu - Project ref:
xqbnqfntxeaqbcjakzfd - Region:
eu-west-1
Emojitsu starts with a kid-friendly anonymous Supabase account:
- A new player clicks Sofort spielen.
- The browser creates an anonymous Supabase Auth user.
- The player chooses an emoji and name on
/onboarding. profilesandcharactersrows are stored with the authenticateduser_id.- Returning on the same device reuses the cookie-backed session.
Enable Anonymous Sign-ins in the Supabase project's Auth providers before using the flow in production.
Progress can be secured in two ways:
- Login code — color + animal + two digits (e.g.
blauerelefant65), created in the dashboard - Email — links the anonymous account via Supabase
updateUser
Log in on a new device via /login. Set the Supabase Auth
redirect URL to https://<your-domain>/auth/confirm for email confirmation.
npm install
npm run devQuality checks:
npm run typecheck
npm run test
npm run build/landing page with a simulated battle summary/dashboardoffline battle inbox concept/opponentstargeted and automatic matchmaking concept/deckstarter card/deck concept/battle/demoreplay prototype for a stored battle log