System Requirements
Node.js
Version 18 or higher requiredCheck your version:
Package Manager
Choose one:
- npm (bundled with Node.js)
- yarn
- pnpm
Sui Wallet
Browser extension for wallet connectionInstall Sui Wallet
Testnet SUI
Required for transactionsGet testnet tokens
Installation Methods
- npm
- yarn
- pnpm
Using npm
Dependencies
TUNA uses the following key dependencies:Core Dependencies
@mysten/dapp-kit
@mysten/dapp-kit
Official Sui dApp integration kit providing:
- Wallet connection and management
- Transaction signing
- Account state management
- React hooks for Sui interactions
@mysten/sui.js
@mysten/sui.js
Sui TypeScript SDK for:
- Building transactions
- Querying blockchain state
- Interacting with smart contracts
- RPC client functionality
@tanstack/react-query
@tanstack/react-query
Data fetching and state management:
- Automatic caching and revalidation
- Loading and error states
- Optimistic updates
- Background data synchronization
React 19
React 19
Modern React features:
- Improved server components
- Enhanced concurrent rendering
- Better TypeScript support
- Performance optimizations
Environment Configuration
Create Environment File
Copy the example environment file:
Use
.env.local for local development. This file is automatically ignored by git.Configuration Reference
All configuration is loaded from environment variables and consolidated insrc/config/index.ts:
Development Server
Available Scripts
TUNA includes several npm scripts frompackage.json:
npm run dev
Start the development server with hot module replacementRuns on:
http://localhost:5173npm run build
Build for productionOutputs to:
dist/npm run lint
Run ESLint for code qualityChecks all
.ts and .tsx filesnpm run preview
Preview production build locallyServes the
dist/ folderDevelopment Workflow
Start Development Server
http://localhost:5173 with:- ⚡️ Fast HMR (Hot Module Replacement)
- 🔄 Automatic page reload on changes
- 📊 React Query DevTools
- 🐛 Source maps for debugging
Run Linting
Check code quality before committing:ESLint will check for:
- TypeScript errors
- React best practices
- Code style issues
Project Structure
Understanding the TUNA codebase:Wallet Setup
Install Sui Wallet
Download and install the Sui Wallet browser extension:
Create or Import Wallet
Follow the wallet setup wizard:
- Create a new wallet or import existing
- Save your recovery phrase securely
- Set a strong password
- Complete the setup
Switch to Testnet
Configure your wallet for testnet:
- Open Sui Wallet
- Click settings (⚙️ icon)
- Navigate to Network
- Select Testnet
TUNA currently runs on Sui testnet. Make sure your wallet is on the correct network.
Get Testnet Tokens
Obtain testnet SUI from the faucet:
- Join the Sui Discord
- Go to the
#testnet-faucetchannel - Use the command:
!faucet <your-address> - Wait for tokens to arrive
Verification
Verify your installation:- Check Installation
- Test Development Server
- Verify Configuration
- Test Wallet Connection
Troubleshooting
Installation Errors
Installation Errors
Problem:
npm install fails with errorsSolutions:- Clear npm cache:
npm cache clean --force - Delete
node_modulesandpackage-lock.json, then reinstall - Use Node.js LTS version (18 or 20)
- Try using yarn or pnpm instead
- Check for network/firewall issues
Port Already in Use
Port Already in Use
Problem: Port 5173 is already in useSolutions:
- Kill the process using port 5173
- Use a different port:
npm run dev -- --port 3000 - Check for other Vite dev servers running
TypeScript Errors
TypeScript Errors
Problem: TypeScript compilation errorsSolutions:
- Ensure all dependencies are installed
- Run
npm install @types/node -D - Check
tsconfig.jsonis present - Restart your IDE/editor
- Run
tsc --noEmitto see all errors
Environment Variables Not Loading
Environment Variables Not Loading
Problem: Configuration values are undefinedSolutions:
- Ensure file is named
.env.local(not.env) - Restart the dev server after changing
.env.local - Verify all variables start with
VITE_ - Check for syntax errors in the env file
- Use
import.meta.env.VITE_*to access variables
Wallet Connection Issues
Wallet Connection Issues
Problem: Cannot connect walletSolutions:
- Install Sui Wallet extension
- Unlock your wallet
- Switch to testnet in wallet settings
- Refresh the page
- Clear browser cache
- Try a different browser
Next Steps
Quickstart Guide
Get up and running in 5 minutes
Core Concepts
Learn how TUNA works
Integration Guide
Start building with TUNA
Features
Explore TUNA’s key features
