A post-apocalyptic MUD (Multi-User Dungeon) game built on the Sui blockchain. Experience a rags-to-riches survival story in a barren wasteland, with zkLogin authentication for seamless Web3 access.
- Command-line driven MUD interface
- Explore a post-apocalyptic wasteland
- Collect items, navigate rooms, and uncover the story
- Commands:
look,go <direction>,take <item>,examine <item>,help - Shortcuts: Press
Efor inventory,Mfor map
- Sign in with social accounts (Google, Facebook, Twitch)
- No wallet installation or seed phrases required
- Automatic blockchain address generation from your identity
- Secure, user-friendly Web3 onboarding
- Built on Sui using
@mysten/dapp-kit - Smart contract interactions for game state
- Character data stored on-chain
- Node.js 18+ and npm
- OAuth client IDs from at least one provider (Google, Facebook, or Twitch)
-
Clone and install dependencies:
npm install
-
Configure zkLogin (see ZKLOGIN_SETUP.md for detailed instructions):
cp .env.example .env # Edit .env and add your OAuth client IDs -
Run the development server:
npm run dev
-
Open your browser: Navigate to
http://localhost:5173
src/
├── components/
│ ├── GameTerminal.tsx # MUD-style terminal interface
│ ├── ZkLoginScreen.tsx # zkLogin authentication UI
│ ├── WalletConnect.tsx # Traditional wallet connection
│ └── CharacterPanel.tsx # Character stats display
├── hooks/
│ ├── useZkLogin.ts # zkLogin state management
│ ├── useGameActions.ts # Blockchain game actions
│ └── useCharacterQuery.ts # Character data queries
├── App.tsx # Main app with auth flow
└── main.tsx # App entry point with providers
help— Show available commandslook— Examine current locationgo <direction>ormove <direction>— Travel (e.g.,go north)take <item>— Pick up an itemexamine <item>— Inspect an iteminventoryorE— View your inventorymaporM— Display the map
- E — Open inventory (when input is empty)
- M — Show map (when input is empty)
For detailed zkLogin configuration instructions, see ZKLOGIN_SETUP.md.
Quick summary:
- Register OAuth apps with Google/Facebook/Twitch
- Get client IDs and add to
.env - Configure redirect URIs in provider consoles
- Start the dev server
- Frontend: React 19 + TypeScript + Vite
- Blockchain: Sui (via
@mysten/dapp-kitand@mysten/sui) - State Management: TanStack Query
- Authentication: zkLogin (OAuth-based Web3 auth)
- Styling: Custom CSS with post-apocalyptic theme
npm run buildnpm run lintnpm run previewThis template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel (or oxc when used in rolldown-vite) for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
The React Compiler is enabled on this template. See this documentation for more information.
Note: This will impact Vite dev & build performances.
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])