A
Argha SenReflections & Devlogs
3 min readBy Argha Sen

Cricket Manager - Devlog Entry #5: Next.js 15, Drizzle ORM, and Simulation Tuning

Table of Contents (9 sections)

The last few months have been a whirlwind of architectural upgrades and deep simulation calibrations for Cricket Manager. As our beta user base continues to play daily league and cup matches, scaling demands and gameplay feedback prompted a major framework refresh alongside finer tactical controls.

Here is a breakdown of what changed between February and May 2025.

1. Upgrading the Engine Room: Next.js 15 & Drizzle ORM

As the codebase grew past 60,000 lines of TypeScript, managing database migrations and async request lifecycles required leaner, faster tooling.

Migrating to Drizzle ORM

While Prisma served us well during initial prototyping, its client overhead and query abstraction layer became a bottleneck for high-frequency match simulations. We migrated our entire data layer to Drizzle ORM.

Drizzle gives us:

  • Zero-overhead SQL queries: Direct TypeScript-to-SQL mapping with near-instant execution times on our Turso distributed SQLite database.
  • Type-safe schema declarations: Strict relation definitions and effortless batch transactions during matchday processing.
  • Dramatically smaller bundle sizes and lightning-fast serverless cold starts.
// Example: Batch querying match orders and active squad fitness with Drizzle
async function getMatchOrdersWithSquad(matchId: string, teamId: string) {
  return await db.query.matchOrders.findFirst({
    where: and(eq(matchOrders.matchId, matchId), eq(matchOrders.teamId, teamId)),
    with: {
      team: {
        with: {
          players: {
            where: eq(players.isInjured, false),
            columns: { id: true, name: true, fitness: true, stamina: true }
          }
        }
      }
    }
  });
}

Next.js 15 & Async Request Architecture

We upgraded the web client and server actions to Next.js 15. Leveraging the updated asynchronous React Server Components and improved caching semantics eliminated stale match scorecards and simplified our tabbed dashboard navigation.

Structured logging via Pino was also integrated across all background match pipelines, providing granular timing traces for every over simulated.

2. Match Engine Refinements & Tactical Depth

A core request from beta managers was greater tactical agency over bowler rotations and defensive fielding impacts.

Tactical Short Spells

In limited-overs formats (SOD and Youth OD), managers can now mandate Short Spells for their frontline pacers and mystery spinners. Instead of exhausting a bowler’s spell in a single block, the engine distributes overs dynamically across the middle and death overs, keeping bowler stamina higher for critical late-game breakthroughs.

Fielding & Consistency Impact

We reworked the defensive equations in the match engine:

  • Fielding Multipliers: High team fielding ratings now actively suppress boundary conversion rates and save 4–8 extra runs per 50-over match.
  • Consistency Calibration: Calibrated the consistency trait so elite players experience fewer erratic rating swings under adverse pitch and weather conditions.

3. Training: Wicketkeeper Specialization

Player development previously treated wicketkeepers under general fielding routines. We introduced dedicated training pathways for:

  • Pure Wicketkeeper: Accelerated glovework, catching probability behind the stumps, and stumping reaction speed.
  • Batsman-Keeper: Balanced split between top-order batting progression and keeping competency.

4. Community, Ratings History & Trophy Cabinets

To make the club management experience more rewarding:

  • Club Ratings History: An interactive historical rating curve tracking squad progression season-over-season.
  • Trophy Cabinets & Division Badges: Commemorating championship titles and cup victories directly on manager profiles.
  • In-Game Community Forums: A dedicated hub for tactical discussions, bug reports, and banter.

What’s Next?

Our focus for the summer turns to the long-awaited Transfer Market & Club Economy, alongside expanding custom tournament formats. Stay tuned for the next devlog!

Enjoyed this article? Share it:
Share on X
💬

Discussion & Comments

Loading comments...
Fetching discussion...

Join the conversation

Share thoughts, ask questions, or discuss technical insights. No account required.