# Code Farm The Code Farm is a cooperative idle game. Each member owns a farm of plots, plants software projects that build over real time, harvests them for coins and XP, upgrades their CI tier for faster builds, and waters other members' growing builds to speed them up and earn coins. All endpoints negotiate HTML or JSON. The action endpoints return the full farm state so a client can refresh without a second request.
GET /game Minimal role: Member

Code Farm page

The player's own farm: HUD, plot grid, shop, and leaderboard.

GET /game/state Minimal role: Member

Farm state

The signed-in player's full farm state as JSON.

GET /game/leaderboard Minimal role: Public

Farm leaderboard

Top farmers ranked by level, XP, and harvests.

GET /game/farm/{username} Minimal role: Public

View a farm

Another player's farm, with water controls on growing builds.

POST /game/plant Minimal role: Member

Plant a crop

Plant a crop in an empty plot. Costs the crop's coin price.

POST /game/harvest Minimal role: Member

Harvest a build

Harvest a finished build for coins and XP.

POST /game/buy-plot Minimal role: Member

Buy a plot

Unlock a new plot. Cost doubles per extra plot.

POST /game/upgrade Minimal role: Member

Upgrade CI

Upgrade the farm CI tier for faster builds.

POST /game/farm/{username}/water Minimal role: Member

Water a build

Water another player's growing build to speed it up and earn coins.

POST /game/fertilize Minimal role: Member

Fertilize a build

Spend coins to halve a growing build's remaining time.

POST /game/daily Minimal role: Member

Claim daily bonus

Claim the once-per-day coin bonus; consecutive days grow a streak.

POST /game/perk Minimal role: Member

Upgrade a perk

Upgrade a permanent perk: yield, growth, discount, or xp.

POST /game/quests/claim Minimal role: Member

Claim a quest

Claim a completed daily quest reward by its kind.

POST /game/prestige Minimal role: Member

Refactor (prestige)

Reset the farm at level 10+ for a permanent +25% coin bonus.