← All projects
Telegram Bot RPGIn Progress

Pokeshowdown — Telegram Bot RPG

Decorator-driven MVC Telegram RPG engine with ACID Pokémon trading and bilingual command routing.

TypeScriptNode.jsgrammYPostgreSQLPrismaDocker
Pokeshowdown — Telegram Bot RPG
809Live PokeAPI Species
1 / 512Configurable Shiny Odds
EN / ESBilingual Command Engine

Problem

Chat bots with complex stateful workflows (multi-step trading, wild encounters, party management) quickly devolve into monolithic switch statements and race conditions during concurrent user transactions.

Solution

Designed a clean MVC architecture using TypeScript decorators and dependency injection to register grammY commands and stateful conversations, backed by Prisma interactive transactions on PostgreSQL.

System Design

Architecture Breakdown

Bot Gateway & Router

grammY + Custom Decorators

Declarative @Command and @Conversation decorators auto-register handlers and bilingual aliases.

Application & Domain

TypeScript MVC + DI Container

Encapsulated game mechanics: encounter rates, 1/512 shiny rolls, evolution trees, and 6-slot parties.

External Integration

PokeAPI Adapter

Fetches and normalizes sprites, base stats, and evolution chains across 7 generations (809 species).

Transactional Storage

Prisma + PostgreSQL + Docker

Atomic multi-user Pokémon trades and inventory updates guaranteeing zero item duplication.

Implementation Details

Key Engineering Highlights

  • Built a full-stack Telegram RPG bot using grammY and TypeScript supporting catching, evolving, and trading across 809 live PokeAPI species.
  • Engineered a clean MVC architecture with dependency injection and custom TypeScript decorators for command and stateful conversation registration.
  • Guaranteed data integrity during peer-to-peer Pokémon trades and party swaps using Prisma interactive transactions on PostgreSQL.
  • Shipped full bilingual EN/ES command support and configurable game mechanics (1/512 shiny odds, evolution caps, 6-Pokémon active rosters).

Explore More Projects