BeamNG.Earth
A 1:1 scale streamed Earth for BeamNG.drive: real elevation and satellite imagery, floating origin, LOD streaming from a companion server
Grow your farm. Trade the markets. Build your empire.
GamesTypeScript · JavaScriptGitHub @carynyx80OnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Grow your farm. Trade the markets. Build your empire.
Follow along on X: @Harvestiaa · Play: harvestia.xyz
Harvestia is a browser-based pixel-art farming game with an agricultural economy referenced to real commodity markets and a $HRV token economy (Robinhood Chain first, BNB Chain later).
contracts/, Solidity, OpenZeppelin 5, Hardhat):
server/src/vault.e2e.test.ts runs the whole flow against a local chain: sign in, deposit, quote, sign, buy, burn, the refused replay and refused underpriced signature, indexing, earning and claiming a reward, and solvency.NEXT_PUBLIC_HRV_TOKEN_ADDRESS (and optionally NEXT_PUBLIC_HRV_CHAIN_ID) is set at launch; until then the game says the token hasn't launched. Deposits, withdrawals and the Game Vault remain Stage 8.Every farm now lives on the server:
{ type: 'plant', plot, cell, seed }, never a new state. The API checks each one against a strict schema, advances the farm's timers by server time, applies the action with the same rules code the browser uses (shared/), and stores the result in PostgreSQL inside a row-locked transaction. The browser predicts the result for instant feedback, then adopts the server's answer.The farm is playable with simulated Farm Coins (100 coins = $1 reference):
The rules live in shared/sim/ as pure, deterministic functions (with unit tests), shared by the browser and the server.
Pixel-art game windows over the live world. Open them from the left menu, the toolbar, keyboard shortcuts or the inspector's action button:
| Window | Shortcut | Contents |
|---|---|---|
| Inventory | I | Storage grid with category tabs, capacity, item details, quality stars and value |
| Marketplace | B | General Store (seeds, feed, livestock, buildings, land, machinery) priced in $HRV with USD reference ≤ $15; purchase review with quote expiry and the 50% burn / 50% farmer-treasury split; player listings preview |
| Commodity Exchange | E | Market list, price chart (7/30/60 days), in-game price breakdown with bounded moves, order ticket with fee, order book, recent trades |
| Profile | P | Farm, level and XP, stats, achievements |
| My Farm | F | Field stages from the live world, today's weather and tasks |
| Equipment | M | Machines with level, condition, effects and upgrade cost |
| Livestock | L | Herd with health, happiness, feeding and production timers |
| Wallet & Vault | V | Wallet vs Game Vault balances (placeholders), 3% deposit / 5% withdrawal fees, burn and treasury totals |
Farm controls: the toolbar strip shows a seed picker (Plant), watering-can level (Water), ready fields (Harvest), and building/upgrade shortcuts. All prices, balances and market figures are clearly labelled demo or simulated values; actions show the stage that enables them.
The world is alive:
Stage 2 foundations: a Next.js + Phaser 3 + TypeScript game:
World: six zones on a 1024×640 art-pixel map with a 32×32 logical terrain grid (press G to show it).
Rendering: the approved Stage 1 sprite library is recorded into packed texture atlases. Every object is a depth-sorted Phaser image, so characters walk behind trees and buildings correctly.
Animation: animals, farmers, the tractor and the windmill blades play generated sprite-sheet animations.
Camera: drag, WASD/arrow keys, mouse-wheel zoom toward the cursor, +/−, a live minimap, and zone navigation from the left menu.
Selection:
Hovering outlines an object; clicking selects it and opens the inspector.
React HUD (Zustand state): profile, wallet and vault placeholders, a commodity board (clearly simulated demo values), a toolbar (keys 1–6), the inspector and view controls.
The Stage 1 concept and art-direction sheet stay available at /concept/index.html.
| Path | Purpose |
|---|---|
src/game/art/sprites.js | Procedural pixel-art sprite library (approved in Stage 1) |
src/game/world/ | Geometry, terrain generation, world layout and hotspots |
src/game/render/atlas.ts | Draw-call recorder, atlas packer, Graphics adapter |
src/game/scenes/WorldScene.ts | Phaser scene: rendering, actors, camera, selection |
src/game/env/ | Clock, sky colours, weather looks, season palettes |
src/game/systems/ | Lighting, weather, water, wildlife, crop and particle systems |
src/store/game.ts | Shared state between Phaser and the HUD |
src/components/hud/ | React HUD |
src/components/panels/, src/components/ui/ | Game windows and the pixel UI kit |
src/game/data/ | Item catalog, economy rules, simulated market, demo data |
shared/ | Rules, actions, catalog, world clock and geometry shared by client and server |
src/lib/sync.ts | Client prediction, ordered action queue and server reconciliation |
server/ | API, Prisma schema and migrations, jobs, live channel |
| Part | Where | Path |
|---|---|---|
| Frontend: Next.js + Phaser game client | Vercel, https://harvestia-one.vercel.app | repo root |
| Backend API: Fastify + TypeScript | Railway, https://harvestia-api.up.railway.app | server/ |
| Database: PostgreSQL (Prisma) | Railway | server/prisma/ |
| Queue, cache, pub/sub: Redis (BullMQ) | Railway | server/src/jobs.ts, server/src/live.ts |
API routes: GET /health, GET /v1/status, GET /v1/world, POST /v1/auth/guest, POST /v1/auth/logout, POST /v1/wallet/nonce, POST /v1/wallet/verify, GET /v1/me, GET /v1/farm, POST /v1/farm/actions, POST /v1/farm/reset, GET /v1/leaderboard, GET /v1/farms/:id, GET /v1/market, GET /v1/market/:key/history, GET /v1/vault, GET /v1/vault/history, GET /v1/vault/me, POST /v1/vault/quote, POST /v1/vault/purchase, POST /v1/vault/claim, and the WebSocket /v1/live. CORS only allows the Vercel site, its preview deployments and local dev.
npm install && npm --prefix server install
npm run dev # frontend on http://localhost:5180
npm test # game rules tests
npm --prefix server run db:local # throwaway PostgreSQL on :54331 (no Docker needed)
npm run api:dev # API on http://127.0.0.1:4000 (set DATABASE_URL; without it the API uses an in-memory store)
npm run api:test # API tests
Copy .env.example to .env.local and point NEXT_PUBLIC_API_URL at http://127.0.0.1:4000 to use a local API.
server/ is excluded via .vercelignore.server/Dockerfile with the repo root as context (so shared/ is bundled in), runs prisma migrate deploy on start, and is health-checked on /health. It redeploys when server/ or shared/ change. DATABASE_URL and REDIS_URL reference the project's Postgres and Redis services.Development is stage-gated; each stage ships only after explicit approval.