All technical cases

Lab project with public source

A Pokémon simulator split by responsibility

Next.js for the UI, Laravel for the API, and a Node.js simulation service, with public code to inspect the decisions.

  • Next.js
  • TypeScript
  • Laravel
  • Node.js
  • PostgreSQL

Goal and contribution

I built the UI, API, and integration with an existing battle engine to explore service boundaries. PokéAPI supplies Pokémon data; the simulation engine is @pkmn/sim from the Pokémon Showdown ecosystem. My contribution is the application and integration, not authorship of that engine.

This is a lab project. It supports discussion of HTTP contracts, persistence, failure handling, and operational cost without presenting it as a large-scale platform.

Application flow

The browser uses Next.js, React, and TypeScript to select teams and present the battle. The Laravel API validates input, retrieves data, orchestrates the simulator call, and persists results in PostgreSQL.

The Node.js service runs the battle engine and returns results and events. The browser presents the state while the main simulation logic lives in the dedicated service. Describing all logic as client-side did not represent this architecture.

Decisions and cost of separation

The split lets me reuse a Node.js ecosystem engine while keeping persistence and the API in Laravel. The cost is multiple deployments, service contracts, and network failures to handle. For a smaller product, a single service could be simpler.

The code includes team-size validation, HTTP timeouts, and internal authentication conditional on a configured token. The presence of middleware does not prove that the variable is configured in every environment.

Integration scenarios worth reviewing include empty or invalid teams, an unavailable simulator, unexpected responses, repeated choices, and state loss after restart. These are review scenarios, not a claim that every one already has automated coverage.

Public evidence

The three repositories below let readers follow the UI, orchestration, and simulation implementation. The project demonstrates integration across technologies without unmeasured claims about cost reduction, scale, or availability.

References and evidence