Welcome to the Aqua Stark local development setup! This guide will help you get from repository clone to a fully running development environment in under 30 minutes.
- Operating System: macOS, Linux, or Windows (WSL2 recommended)
- Node.js: Version 20+
- pnpm: Version 10.13.1+
- Git: Latest version
- Rust: Latest stable version (for Cairo/Scarb)
- Docker: Optional, for containerized setup
# Install asdf if not already installed
# macOS
brew install asdf
# Linux
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.13.1
echo '. "$HOME/.asdf/asdf.sh"' >> ~/.bashrc
echo '. "$HOME/.asdf/completions/asdf.bash"' >> ~/.bashrc
# Install plugins
asdf plugin add nodejs
asdf plugin add rust
asdf plugin add pnpm
# Install versions
asdf install nodejs 20.11.0
asdf install rust 1.75.0
asdf install pnpm 10.13.1
# Set global versions
asdf global nodejs 20.11.0
asdf global rust 1.75.0
asdf global pnpm 10.13.1# Node.js (using nvm)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install 20
nvm use 20
# pnpm
npm install -g pnpm@10.13.1
# Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env# Install Dojo CLI tools
curl -L https://install.dojoengine.org | bash
# Add to PATH (add to your shell profile)
export PATH="$HOME/.dojo/bin:$PATH"
# Verify installation
sozo --version
katana --version
torii --version# Using asdf (recommended)
asdf plugin add scarb
asdf install scarb latest
asdf global scarb latest
# Or manual installation
curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh
# Verify installation
scarb --versionIf you're familiar with the setup, here's the quick path:
# 1. Clone and setup
git clone https://github.com/AquaStark/Aqua-Stark.git
cd Aqua-Stark
pnpm install
# 2. Start local blockchain (Terminal 1)
katana --dev --dev.no-fee
# 3. Deploy contracts (Terminal 2)
cd aqua_contract
sozo build
sozo migrate
# 4. Start indexer (Terminal 3)
# Get WORLD_ADDRESS from sozo migrate output
torii --world <WORLD_ADDRESS> --http.cors_origins "*"
# 5. Start backend (Terminal 4)
cd ../backend
pnpm dev
# 6. Start frontend (Terminal 5)
cd ../client
pnpm dev# Clone the repository
git clone https://github.com/AquaStark/Aqua-Stark.git
cd Aqua-Stark
# Install all workspace dependencies
pnpm install
# Verify installation
pnpm --version
node --versionCreate environment files for each component:
# Copy example file
cp .env.example .env
# Edit with your local settings
nano .env# Copy example file
cp backend/.env.example backend/.env
# Edit with your settings
nano backend/.env# Copy example file
cp client/.env.example client/.env
# Edit with your settings
nano client/.env# Terminal 1: Start Katana
katana --dev --dev.no-fee
# You should see output like:
# Account #0: 0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973
# Account #1: 0x35c9b55d0578068c4b6c8c4c4c4c4c4c4c4c4c4c4c4c4c4c4c4c4c4c4c4c4c4
# ...
# Listening on 127.0.0.1:5050# Terminal 2: Navigate to contract directory
cd aqua_contract
# Build contracts
sozo build
# Deploy to local blockchain
sozo migrate
# Note the WORLD_ADDRESS from output
# Example: World deployed at: 0x02239f77d69e7782b73516b1e0f8ab58fbb50d4f75efa47d5bd0e83781dc1363# Terminal 3: Start Torii with your world address
torii --world 0x02239f77d69e7782b73516b1e0f8ab58fbb50d4f75efa47d5bd0e83781dc1363 --http.cors_origins "*"
# You should see:
# Torii listening on 127.0.0.1:8080
# GraphQL endpoint: http://127.0.0.1:8080/graphql# Terminal 4: Start backend server
cd backend
# Install dependencies (if not already done)
pnpm install
# Start development server
pnpm dev
# You should see:
# Server running on http://localhost:3001# Terminal 5: Start frontend
cd client
# Install dependencies (if not already done)
pnpm install
# Start development server
pnpm dev
# You should see:
# Local: http://localhost:5173/
# Network: http://192.168.1.100:5173/Run through this checklist to ensure everything is working:
# Verify all tools are installed
node --version # Should be 20+
pnpm --version # Should be 10.13.1+
sozo --version # Should show Dojo version
katana --version # Should show Katana version
torii --version # Should show Torii version
scarb --version # Should show Scarb version# Check if Katana is running
curl http://localhost:5050
# Check if Torii is running
curl http://localhost:8080/graphql# Check backend
curl http://localhost:3001/health
# Check frontend
curl http://localhost:5173# Check deployed world
cd aqua_contract
sozo inspect
# Should show your deployed contracts and models- Open http://localhost:5173 in your browser
- Connect your wallet (ArgentX or Braavos)
- Verify you can see the game interface
- Check that blockchain interactions work
# Terminal 1: Blockchain
katana --dev --dev.no-fee
# Terminal 2: Indexer
cd aqua_contract
torii --world <WORLD_ADDRESS> --http.cors_origins "*"
# Terminal 3: Backend
cd backend
pnpm dev
# Terminal 4: Frontend
cd client
pnpm dev# Make changes to contracts in aqua_contract/src/
# Rebuild and redeploy
sozo build
sozo migrate
# Run tests
sozo test# Make changes to client/src/
# Hot reload should work automatically
# If not, restart with pnpm dev# Make changes to backend/src/
# Hot reload should work automatically
# If not, restart with pnpm dev# Contract tests
cd aqua_contract
sozo test
# Frontend tests
cd client
pnpm test
# Backend tests
cd backend
pnpm test# Build contracts
cd aqua_contract
sozo build --release
# Build frontend
cd client
pnpm build
# Build backend
cd backend
pnpm buildProblem: Ports 5050, 8080, 5173, or 3000 are already in use
Solution:
# Find processes using ports
lsof -i :5050
lsof -i :8080
lsof -i :5173
lsof -i :3000
# Kill processes
kill -9 <PID>
# Or use different ports
katana --dev --dev.no-fee --port 5051
torii --world <ADDRESS> --http.port 8081Problem: pnpm install fails or packages are missing
Solution:
# Clear cache and reinstall
pnpm store prune
rm -rf node_modules
rm pnpm-lock.yaml
pnpm install --force
# Check for version conflicts
pnpm listProblem: Torii not syncing with Katana
Solution:
# Restart both services
# Terminal 1: Stop Katana (Ctrl+C), restart
katana --dev --dev.no-fee
# Terminal 2: Stop Torii (Ctrl+C), restart with fresh world
sozo migrate # Get new world address
torii --world <NEW_ADDRESS> --http.cors_origins "*"Problem: Services can't connect to each other
Solution:
# Verify all .env files have correct values
cat .env
cat backend/.env
cat client/.env
# Check for typos in URLs and addresses
# Ensure WORLD_ADDRESS matches sozo migrate outputProblem: Frontend can't connect to wallet
Solution:
- Ensure you have ArgentX or Braavos installed
- Check that you're on the correct network (localhost:5050)
- Try refreshing the page
- Check browser console for errors
Problem: sozo build or pnpm build fails
Solution:
# For contract builds
cd aqua_contract
sozo clean
sozo build
# For frontend builds
cd client
rm -rf dist
pnpm build
# Check for TypeScript errors
pnpm typecheck# Check Dojo world status
sozo inspect
# Check Torii logs
# Look for sync status and errors
# Check Katana logs
# Look for transaction processing
# Check backend logs
# Look for connection errors
# Check frontend console
# Open browser dev toolsIf everything is broken, here's how to reset:
# Stop all services (Ctrl+C in all terminals)
# Reset contracts
cd aqua_contract
sozo clean
sozo build
sozo migrate
# Reset frontend
cd client
rm -rf node_modules
pnpm install
# Reset backend
cd backend
rm -rf node_modules
pnpm install
# Start fresh
# Follow the Quick Start section again- Dojo Getting Started Guide
- Dojo Toolchain Documentation
- Dojo Book
- Scarb Documentation
- StarkNet Documentation
If you're still having issues:
- Check the troubleshooting section above
- Search existing issues on GitHub
- Create a new issue with:
- Your operating system and versions
- Exact error messages
- Steps you followed
- What you expected vs what happened
If you've made it this far, congratulations! You now have a fully functional Aqua Stark development environment. You can:
- ✅ Develop smart contracts with Cairo/Dojo
- ✅ Build and test the frontend
- ✅ Work on the backend API
- ✅ Deploy and interact with local blockchain
- ✅ Connect wallets and test game functionality
Happy coding! 🐠🚀