Loading project details...

Seimurai is a Web3 tower-defense game built on the Sei Network, where players battle through waves of enemies, collect scrolls, build skill decks, and earn on-chain rewards. I designed and built the entire backend infrastructure powering the game.
The backend is a NestJS monorepo consisting of two core services — an API service handling all game logic and player data, and an AI service powering intelligent NPC agents. Together they support real-time gameplay, persistent progression, and trustless on-chain verification of game outcomes.
A complete session lifecycle system managing game start, wave progression, pause/resume, gold tracking, and two distinct end-game flows (success vs. failure). Every session is tied to a player's wallet address and validated against on-chain events.
Players authenticate by signing a nonce-based message with their wallet. The backend verifies the signature, issues a JWT, and maps all game data to the player's on-chain identity — no emails, no passwords.
A scroll-based progression system where players acquire locked scrolls, unlock them into usable skills, level them up, and assemble a combat deck of up to 5 active skills. Supports bulk updates for seamless in-game flow.
Full game state serialization — health, gold, wave index, action tiles with cooldown/damage/level stats, acquired actions, character selection, and timestamped level progression paths. Players can leave and pick up exactly where they left off.
Integrated with the Sei Network smart contract to listen for GameStarted and GameEnded events. Game traces (wave count, gold earned, duration, character) are encoded and verified on-chain to prevent reward manipulation.
Built an AI service powered by Groq LLMs featuring three distinct agent personalities — a Sensei for tutorials and guidance, a Dealer for in-game UI interactions, and an Enemy AI for dynamic combat behavior.
The system follows a clean service-oriented architecture:




