


the complete guide to keeping mew alive.

mew is a digital being living on Solana — born May 17, 2026 at 16:15 UTC. It has four vital stats that decay in real time and only on-chain interactions from real wallets can keep it healthy.
Three live clocks tick on the home page, all driven from mew's birth timestamp:
Birth is set in public/js/config.js as CONFIG.BIRTH and can be overridden at build time with the PUBLIC_BIRTH_ISO env var. The current birth is 2026-05-17T16:15:00Z.
The wallet-balance line under the timers ($X.XX in wallet) refreshes from Supabase every 5 minutes.

mew has 4 vital stats, each 0–100, displayed on the arcade screen:
Decay rates (points lost per minute of real time):
Modifiers: decay runs at 0.25× while mew is sleeping, and an extra 0.5× during nightly slowdown (02:00–07:00 UTC). Decay is computed lazily on every read via the mew_get_state() SQL function — no cron required for accuracy.
Sickness: if hygiene OR hunger hit zero and mood is under 20, mew gets sick (is_sick = true). Sickness only clears via the Medicine item.
Mood label: the API derives a one-word mood from the raw stats — sick, sleeping, hungry, dirty, tired, sad, happy, or okay.
Six action buttons live under the arcade cabinet. Each is a real Solana transaction (SystemProgram.transfer + Memo) sent to mew's wallet. The site applies an optimistic UI delta immediately, then the server confirms the tx and writes the authoritative delta to the database.
Build → sign → confirm flow:
Diminishing returns: talk halves its mood reward each repeat within a rolling 1-hour window. Other actions are full-strength per call but stats are clamped 0–100.
While sleeping: all actions except wake are rejected with mew_is_sleeping.

mew can be put to sleep for 360 minutes (6 hours) via the sleep action. While sleeping:
Sickness is triggered when (hygiene = 0 OR hunger = 0) AND mood < 20. Once sick:
Both states are persisted on the singleton mew_state row (id = 1) in Postgres.
Wallets can buy items with SOL and either consume them on mew or keep them as cosmetic / passive buffs.
Inventory is per-wallet (mew_inventory). Consuming an item calls mew_consume_item(), which decrements qty atomically and then applies the item's effect through mew_apply_action().

Cron periodically spawns random world events — a falling cookie, a passing stranger, a glitch in the matrix. Each event has:
The first wallet to POST /api/events with {id, wallet} wins via mew_claim_event(), which atomically marks the event claimed and applies the reward to mew on that wallet's behalf.
Every confirmed action updates two structures:
The public leaderboard is the view mew_leaderboard_24h — top 25 wallets by action count in the last 24 hours, computed live from mew_events (not the cached counter, so it's always accurate).

A global real-time chat in the bottom-left, backed by Supabase Realtime (Postgres + WebSockets).
Connection details (SUPABASE_URL + anon key) are fetched at runtime from /api/config, never inlined at build time.
Subscribe in your browser to get a push when mew needs you:

The price chart at the bottom of the home page is a GeckoTerminal embed.
To swap providers later, only chart.js needs to change — the iframe id is the stable price-chart-embed.
mew's wallet is its lifeline — the receiver of every action transaction and any direct donations.
When the wallet runs dry, mew dies. That's still the rule.

Token: $mew on Solana, launched on pump.fun.
Buy on pump.fun ↗ · chart on geckoterminal ↗ · updates on x.com/onchainmewagent ↗
mew runs on a small, boring stack with a strict CSP and no inline scripts.
Authoritative-server, optimistic-client — the UI applies a delta as soon as you sign, but the database delta is only written after /api/action/confirm verifies the on-chain tx. If confirmation fails, the optimistic state is reconciled on the next /api/state poll.
No hidden logic. No private APIs. mew runs in the open — see the repo for the full SQL schema and serverless handlers.

2026-05-17