XMoravec

Hi, I’m Erik Moravec. I design and build exciting software that solves real problems. Or is just fun.

This site is about me, my projects, my thoughts and notes. Stay if you are interested in what I am building right now or checkout my lab for some fun (Coming, under construction).

Playground Lab

Lab.xmoravec.com: games, tools, and experiments

A feature-rich web with games like Wordle and chess, tools like a Wordle Solver, and more interactive ideas powered by a modern full-stack architecture.

WordleChessWordle SolverLeaderboards
Preview of Playground Lab home page

My Philosophy

I build software with an emphasis on code quality, readability, and choosing the right tools for the right job. My philosophy is to stay pragmatic and open-minded about using whatever best serves the project and its users. On a practical level, this lets me gather broad experience across programming languages and technology stacks. On a personal level, learning and trying new things is what keeps technology fun for me. I also think this approach is more accessible and increasingly necessary in the age of AI and vibe coding.

Read full about section

Now

I am actively working as a contractor and freelancer. I cooperate with companies like InfoBeans and DHL IT Services on complex software design and delivery. I also work with civilian and business clients to develop personalized web and software solutions.

Read current focus

Photos

Tap any photo to open a larger view.

Curated entries with live technical previews.

Project

02/22/2026 · 10 min read

Playground Lab: Full-Stack Browser Games Platform

A production-oriented game and tools platform: decoupled Next.js + FastAPI services, account-aware gameplay, and extensible module boundaries.

preview.ts

1def best_bot_move(board: Any, *, bot_color: bool | None = None, depth: int = 1) -> Any:
2  legal_moves = list(board.legal_moves)
3  if not legal_moves:
4    raise ValueError("No legal bot moves available")
5
6  if bot_color is None:
7    bot_color = board.turn
8
9  if depth <= 1:
10    return best_capture_or_random_move(board)
11
12  ordered_moves = order_moves(board, legal_moves)
13  # depth-based minimax path for higher bot levels
14  ...
Playground Lab chess match with board, clocks, and move history

Playground Lab is a real product baseline, not just a demo collection. It ships personalized Wordle, full Chess modes, tools, leaderboards, and account-aware flows with explicit trust boundaries, operational controls, and deployment-ready infrastructure.

Next.jsFastAPIMongoDBDockerChessWordleArchitecture
Open project detail

notes.ts

1def order_moves(board: Any, legal_moves: list[Any]) -> list[Any]:
2    ordered: list[tuple[int, Any]] = []
3    for move in legal_moves:
4        priority = 0
5        if board.is_capture(move):
6            priority += 100
7            if board.is_en_passant(move):
8                priority += PIECE_VALUES[1]
9            else:
10                target_piece = board.piece_at(move.to_square)
11                if target_piece is not None:
12                    priority += PIECE_VALUES.get(target_piece.piece_type, 0)
13
14        board.push(move)
15        if board.is_checkmate():
16            priority += 10_000
17        elif board.is_check():
18            priority += 50
19        board.pop()
20
21        ordered.append((priority, move))
22
23    ordered.sort(key=lambda row: row[0], reverse=True)
24    return [row[1] for row in ordered]
25
26
27def best_capture_or_random_move(board: Any) -> Any:
28    legal_moves = list(board.legal_moves)
29    if not legal_moves:
30        raise ValueError("No legal bot moves available")
31
32    best_capture_score = -1
33    best_captures: list[Any] = []
34    for move in legal_moves:
35        capture_score = 0
36        if board.is_capture(move):
37            if board.is_en_passant(move):
38                capture_score = PIECE_VALUES[1]
39            else:
40                target_piece = board.piece_at(move.to_square)
41                if target_piece is not None:
42                    capture_score = PIECE_VALUES.get(target_piece.piece_type, 0)
43
44        if capture_score > best_capture_score:
45            best_capture_score = capture_score
46            best_captures = [move]
47        elif capture_score == best_capture_score:
48            best_captures.append(move)
49
50    return random.choice(best_captures) if best_captures else random.choice(legal_moves)
Playground Lab Wordle gameplay screen with account-aware progress

A deep dive into gameplay and tool modules in Playground Lab: Wordle personalization, chess state and bot flow, server-authoritative clocks, tooling surfaces, leaderboard trust, and the incremental WebSocket roadmap.

GamesChessWordleLeaderboardsWebSocketsRoadmap
Read article

Explore More

Projects hold implementation-facing notes, elaborations over technological choices and case-study deep dives. The blog writes about everything that interests me from programming to traveling.

Let’s connect

Open to collaboration, business or just friendly conversations, and thoughtful feedback.