Skip to main content

Welcome to WEFA

WEFA (Water-Earth-Fire-Air) is a youth-driven phygital game that connects real-world plant care to digital creature collection and board games. Players care for plants, earn energy, nurture elemental creatures, and compete in AR-enhanced board games.

The Core Loop

Plant -> Reward -> Creature -> Game

  1. Plant Care - Add real plants, take daily care photos, earn energy
  2. Creature Nurture - Spend energy to grow your elemental creatures
  3. Evolution - Evolve creatures through stages (Seed -> Sprout -> Bloom -> Elder)
  4. Game Play - Use creatures as game pieces in Tic-Tac-Toe, Mancala, and Ludo

Quick Start

# Prerequisites: Bun, Node >= 20
git clone https://github.com/wefa-labs/app.git
cd app
bun install
bun dev:app

The app runs at http://localhost:5173. See Getting Started for full setup details.

To test on a phone or tablet, just run bun dev:app — it auto-starts a cloudflared tunnel and shows a QR code on the desktop landing page. See Device Testing for the full guide.

Key Design Principles

  • Offline-first: Core loop works without network. Sync and proofs are opt-in.
  • Local-first privacy: User data stays on-device by default. Youth-safe defaults.
  • Progressive enhancement: AR, onchain proofs, and social features upgrade the experience but never block it.
  • White-hat motivation: Meaning, progress, creativity, and social connection over punitive scarcity loops.

Project Structure

packages/
app/ # React + Vite PWA (the main application)
contracts/ # Solidity contracts (Foundry)
docs/ # This documentation site (Docusaurus)

Tech Stack

LayerTechnology
UIReact 19, Tailwind 4, Radix UI
3D / ARThree.js, React Three Fiber, @react-three/xr v6
StateXState 5, Zustand 5, TanStack Query 5
DataDexie 4 (IndexedDB), bitECS, Zod 3
P2P SyncYjs, y-webrtc, y-indexeddb
ProofsEAS SDK 2 (offchain attestations)
AuthPasskey (Pimlico), Wallet (Reown AppKit)
BuildBun, Vite 7, Vitest, Playwright
DeployVercel, GitHub Actions