Inspiration

Mei-Tra is inspired by Meisen Trump, a traditional Japanese team card game played by four people in two teams. The game has deep strategy and a strong local community, but it has been difficult to play online. We wanted to preserve the game and make it accessible to players anywhere.

What it does

Mei-Tra provides a complete real-time online experience for four players. Players can create a room, invite friends or fill empty seats with computer players, declare a trump suit and target score, play cards in turn, track tricks and team scores, and continue across multiple rounds. The app also includes an order reference, play logs, and in-game chat.

How we built it

The web client is built with Next.js, React, TypeScript, and SCSS. The NestJS backend manages rooms, players, reconnection, game phases, card validation, declarations, scoring, and rule violations. Socket.IO keeps every player synchronized through WebSockets. Shared TypeScript types and utilities are used across the frontend, backend, and Expo mobile app.

We used Codex as a development partner to inspect the monorepo, refine the submission, and create the English demo assets and captions.

Challenges we ran into

The hardest part was keeping four clients synchronized while enforcing turn order and game-specific rules. We also needed to handle temporary disconnects without losing a player's seat or corrupting the room state. Modeling the declaration phase, trump rules, scoring, and invalid moves as separate services helped keep the backend understandable.

What we learned

We learned that multiplayer card games benefit from a server-authoritative design and explicit game phases. Shared types significantly reduced mismatches between clients and the server, while room-scoped events made real-time updates easier to reason about.

What's next

Next, we plan to improve matchmaking, computer-player strategy, mobile support, onboarding, internationalized documentation, and spectator features.

Built With

Share this project:

Updates