Choose your path based on what you want to do:
| I want to... | Time | What to do |
|---|---|---|
| Just learn | 30 seconds | Use the website |
| Run locally | 5 minutes | Basic local setup |
| Develop features | 15 minutes | Full developer setup |
Time: 30 seconds
- Go to lyra.works
- That's it! Start learning or coding.
- Click a tutorial to learn step-by-step
- Go to lyra.works/ide to write Solidity
- Use "JavaScript VM" to deploy without real crypto
No wallet, no crypto, no account needed to start learning.
Time: 5 minutes | No API keys required
This runs the frontend only. Perfect for learning and UI development.
- Node.js 18 or higher (download)
- A code editor (VS Code recommended)
# 1. Clone the repository
git clone https://github.com/nirholas/lyra-web3-playground.git
cd lyra-web3-playground
# 2. Install dependencies
npm install
# 3. Start the development server
npm run devOpen http://localhost:5173 in your browser.
- ✅ All tutorials and examples
- ✅ Solidity IDE with compilation
- ✅ JavaScript VM deployment (simulated blockchain)
- ✅ Dark mode, accessibility features, translations
- ❌ AI features (need OpenAI key)
- ❌ Real blockchain deployment (need wallet + testnet ETH)
Time: 15 minutes | Includes backend and all features
# Check Node.js version (need 18+)
node --version
# Check npm version
npm --version
# MetaMask browser extension installed (optional but recommended)# Clone the repository
git clone https://github.com/nirholas/lyra-web3-playground.git
cd lyra-web3-playground
# Install frontend dependencies
npm install
# Install backend dependencies
cd server
npm install
cd ..Create .env in the root directory:
# Frontend Environment Variables
VITE_API_URL=http://localhost:3001/api
# OpenAI API (for AI features) - optional
VITE_OPENAI_API_KEY=sk-your-key-here
# Alchemy API (for RPC) - optional, has fallbacks
VITE_ALCHEMY_API_KEY=your-key-hereCreate server/.env:
# Backend Environment Variables
PORT=3001
# OpenAI - optional, for AI code generation
OPENAI_API_KEY=sk-your-key-here
# Alchemy - optional, for blockchain RPC
ALCHEMY_API_KEY=your-key-here💡 Don't have API keys? That's fine! The app works without them - you just won't have AI features or premium RPC nodes.
Terminal 1 - Backend:
cd server
npm run devTerminal 2 - Frontend:
npm run devOpen your browser to:
http://localhost:5173
- Click "Template" button in toolbar
- Choose "Simple Storage" (beginner-friendly)
- Files are automatically created
- Click "Compile" → Success!
- Connect MetaMask (Sepolia testnet)
- Click "Deploy" → Confirm transaction
- Interact with your deployed contract!
- Click the ⚡ lightning bolt icon
- Select "Generate" mode
- Type:
Create an ERC20 token with 1 million supply - AI generates complete code
- Click "Insert as File"
- Compile and deploy!
- Click "+" in file tree
- Enter filename:
MyContract.sol - Start coding with autocomplete
- Save automatically persists
- Compile when ready!
- Create multiple
.solfiles - Switch between tabs
- Organize by folder (future)
- Select Solidity version (0.8.17-0.8.20)
- Enable/disable optimizations
- View errors in console
- Get ABI and bytecode
- One-click deploy to Sepolia
- Transaction tracking
- Etherscan links
- Address saved for interaction
- Auto-generated function UI
- Type-safe inputs
- Read functions (no gas)
- Write functions (transactions)
- Result display
Generate Mode:
- Natural language → Contract code
- Production-ready output
- Insert as new file
Explain Mode:
- Understand complex code
- Security analysis
- Best practices
Test Mode:
- Auto-generate test suite
- Hardhat or Foundry
- Edge case coverage
- Real-time event tracking
- Filter by type
- Search logs
- Export to file
- Clear when needed
1. Write Solidity code
2. Select compiler version
3. Click "Compile"
4. Check console for results
1. Ensure compiled (green checkmark)
2. Connect MetaMask
3. Switch to Sepolia network
4. Click "Deploy"
5. Confirm in MetaMask
6. Wait for confirmation
1. Go to "Interact" panel
2. Find your function
3. Enter parameters
4. Click "Read" or "Write"
5. View results below
1. Click share icon (🔗)
2. Link copied to clipboard
3. Share with anyone
4. They can view and fork
1. Click download icon (⬇️)
2. JSON file downloads
3. Import later or on different device
# Check if port 3001 is in use
lsof -i :3001
# Kill the process if needed
kill -9 <PID>
# Restart
cd server && npm run dev# Clear cache and reinstall
rm -rf node_modules package-lock.json
npm install
# Try different port
PORT=3000 npm run dev- Check Solidity syntax
- Verify pragma version
- Review import statements
- Check console for detailed errors
- Ensure wallet connected
- Check network (Sepolia)
- Verify ETH balance
- Try increasing gas limit
- Refresh page
- Check MetaMask is unlocked
- Switch to correct network
- Clear site permissions and retry
1. Copy your wallet address
2. Visit: https://sepoliafaucet.com
3. Paste address
4. Receive 0.5 ETH
5. Wait for confirmation
- Alchemy Faucet: https://sepoliafaucet.com
- Infura Faucet: https://www.infura.io/faucet/sepolia
- POW Faucet: https://sepolia-faucet.pk910.de
lyra-web3-playground/
├── src/
│ ├── components/
│ │ └── Sandbox/ # Interactive Sandbox components
│ │ ├── InteractiveSandbox.tsx
│ │ ├── FileTree.tsx
│ │ ├── ContractInteraction.tsx
│ │ ├── ConsolePanel.tsx
│ │ ├── AIAssistant.tsx
│ │ └── TemplateSelector.tsx
│ ├── services/
│ │ └── api.ts # Backend API client
│ ├── stores/
│ │ ├── workspaceStore.ts # File & workspace management
│ │ ├── walletStore.ts # Web3 connection
│ │ └── themeStore.ts # Dark mode
│ ├── utils/
│ │ └── sandboxTemplates.ts # Pre-built templates
│ └── pages/
│ └── ...
├── server/
│ ├── src/
│ │ ├── routes/ # API routes
│ │ ├── services/ # Business logic
│ │ └── middleware/ # Express middleware
│ └── ...
└── ...
POST /api/compile # Compile Solidity
POST /api/deploy # Deploy contract
POST /api/ai/generate # Generate contract
POST /api/ai/explain # Explain code
POST /api/ai/tests # Generate tests
POST /api/faucet/request # Request testnet funds
POST /api/ipfs/upload # Upload to IPFS
Ctrl/Cmd + S Save file (auto-save enabled)
Ctrl/Cmd + F Find in editor
Ctrl/Cmd + H Find and replace
Ctrl/Cmd + / Toggle comment
F1 Command palette
Alt + ↑/↓ Move line up/down
Ctrl/Cmd + D Select next occurrence
- Use templates as starting points
- Compile frequently
- Test on testnet thoroughly
- Use AI to understand patterns
- Enable compiler warnings
- Use AI explain for complex logic
- Generate tests before mainnet
- Follow security best practices
- Learn keyboard shortcuts
- Use multiple files for organization
- Save workspaces for different projects
- Leverage AI for boilerplate code
- Explore Templates: Try all 5 pre-built templates
- Experiment with AI: Generate different contract types
- Build Something: Create your own token or NFT
- Share & Collaborate: Export and share workspaces
- Read Docs: Check
SANDBOX_GUIDE.mdfor advanced features
- User Guide:
SANDBOX_GUIDE.md - Implementation:
SANDBOX_IMPLEMENTATION.md - Architecture:
ARCHITECTURE.md - Accessibility:
ACCESSIBILITY.md - Completion Summary:
COMPLETION_SUMMARY.md
This site is designed to be accessible to all users:
- Keyboard Navigation: Use Tab to navigate, Enter to activate
- Skip Link: Press Tab on page load to skip to main content
- Screen Readers: All actions are announced via ARIA live regions
- Visual Feedback: Toast notifications for deaf/hard-of-hearing users
- Reduced Motion: Respects your system motion preferences
See ACCESSIBILITY.md for detailed documentation.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Check the
/docsfolder - Examples: Browse the template library
MIT License - See LICENSE file
Happy Coding! 🚀
Built with ❤️ for the Web3 developer community.