Browser Farming Game with a Server-Side Economy
An online game with a fully server-side economy and offline earnings, hardened against cheating.
About this project
The challenge
In browser games, running the economy in the browser lets players trivially tamper with their values. On top of that, the game had to keep earning for the player after they closed the tab.
The solution
I moved all economic logic to the server; the browser is purely a view layer, and every transaction is validated server-side before it is recorded. For offline earnings, instead of running a permanent timer, the server computes the time elapsed since the last visit and grants that period's income in one capped batch.
- A fully server-side economy that resists tampering
- Offline earnings calculated from elapsed time
- Balanced upgrade costs and growth curves
- An optimized database for fast transaction writes
The result
Despite running in the browser, the game has a secure and dependable economy, and returning players get a fair, smooth experience.
Other projects
Other
100 Questions — A Party Quiz Tournament
A general-knowledge quiz tournament for parties: an automatic bracket with a chess-style clock, a TV display, the game on every player’s phone — and it keeps running even without internet.
A whole tournament run from one laptop, even offline
View project
Service
CafeCode — A Coworking Cafe Website That Actually Books Tables
A website for a coworking cafe built for developers. Visitors can pick their exact table on a live floor plan, choose a time slot, and get a booking code — all without the page ever feeling slow. The whole homepage loads in 62 KB.
A 62 KB page, ready in 0.28 s, that books real tables
View project
Personal
Friday Imam of Takestan — News Portal
A custom-built news and content platform for the office of the Friday Imam of Takestan, Iran. It publishes Friday sermons, news, official statements and answers to religious questions from the public. Built from scratch — no off-the-shelf theme — with a fully Persian, right-to-left admin panel that
A searchable sermon archive, run entirely without a developer
View project