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
- Plant Care - Add real plants, take daily care photos, earn energy
- Creature Nurture - Spend energy to grow your elemental creatures
- Evolution - Evolve creatures through stages (Seed -> Sprout -> Bloom -> Elder)
- 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
| Layer | Technology |
|---|---|
| UI | React 19, Tailwind 4, Radix UI |
| 3D / AR | Three.js, React Three Fiber, @react-three/xr v6 |
| State | XState 5, Zustand 5, TanStack Query 5 |
| Data | Dexie 4 (IndexedDB), bitECS, Zod 3 |
| P2P Sync | Yjs, y-webrtc, y-indexeddb |
| Proofs | EAS SDK 2 (offchain attestations) |
| Auth | Passkey (Pimlico), Wallet (Reown AppKit) |
| Build | Bun, Vite 7, Vitest, Playwright |
| Deploy | Vercel, GitHub Actions |