LigaMagic · Full-time employee · 2023–2025
LigaMagic and LigaPokémon Circuits
I was responsible for the front end of the LigaMagic and LigaPokémon tournament circuits: 2,400+ tournaments, 150+ stores and 6,000+ players in the 2024 season.
- 2,400+tournaments in the 2024 season
- 150+stores
- 6,000+players in the season
- 2,000+players on the apps on event days
The problem
LigaMagic is the largest Brazilian marketplace for card games: Magic, Pokémon, Yu-Gi-Oh!, One Piece and others. The Circuits are the tournament leagues run in stores across the country, with registration, rounds and rankings.
When I took over the front end, it was at an early stage and poorly structured. It already had real users: in the 2024 season, the LigaMagic and LigaPokémon circuits added up to more than 2,400 tournaments, in more than 150 stores, with more than 6,000 players. And on event days, the apps serve more than 2,000 players during the tournaments, at events with more than 12,000 people.
A fragile front end under these conditions is more than technical debt. When something breaks on an event day, there are people waiting in the store.
There was also a second challenge: the circuits for each card game had different brands. The product had to look like a Magic circuit in one place and a Pokémon circuit in another, without two codebases.
What I did
Refactoring the inherited codebase
I refactored almost the entire front-end codebase I received, in Nuxt 3 and Vue 3 with TypeScript. The exception was the store registration module, which I only worked on in parts: I refactored pieces of the stores' sign-up and payment flow, without taking over the whole module.
Multi-brand theming
For the circuit brands, I used Tailwind with CSS variables. Each brand's colors and other tokens live in variables. Components don't know about the brand, only about the tokens. Switching circuits means switching values, not code.
LigaMagic Circuit 2024
Sign up/* [data-circuito="magic"] */
--marca: oklch(0.55 0.19 28);
--marca-2: oklch(0.92 0.04 60);
--raio: 6px;
Front-end technical reference
I set front-end standards and decisions and took part in UI/UX, brainstorming and refinement with the product team. I was a technical reference for the front end, without a formal leadership title.
Decisions and trade-offs
Refactoring almost everything instead of patching. A poorly structured codebase, used by thousands of players, called for a structure I could change without fear. The cost is high: refactoring a codebase in use takes time that doesn't turn into new features, and every big change needs care so it doesn't break what already worked. I did it because the alternative was stacking changes on unstable ground.
CSS variables instead of one stylesheet per brand. With one stylesheet per brand, every visual tweak would be made several times and the brands would drift apart over time. With variables, the tweak is made once, and a new brand becomes a set of values. The cost: the token system has to be well thought out from the start. If a component hardcodes a color, it breaks the theme.
Not taking over the whole store registration module. I worked on it in parts, such as the sign-up and payment flow, but I didn't refactor it end to end. The cost is that some parts of the front end kept the previous organization, outside the standard I set for the rest.
Outcome
The front end carried the 2024 season and the event days, with the numbers above. These numbers describe the product's scale, not a gain I attribute to my work alone.
I don't have before-and-after metrics for the refactoring, such as bug counts or delivery time, and I won't make them up. What I can say: the derived brands came to be handled as themes instead of copies, and the team now had defined standards to work with.
The work was done during my time at LigaMagic, as a full-time employee.
What I would do differently
I would measure from the start. If I had recorded error rates and delivery time before refactoring, I could show the effect in numbers today.
I would pair the refactoring with UI tests on the critical flows, such as sign-up and payment, before touching them. Refactoring without that safety net takes more manual care than it should.
I would document the theming token system right at the beginning. The flexibility of variables only pays off if everyone on the team knows which tokens exist and when to use each one.