A gamified, backendless learning platform for Soroban smart contracts on Stellar.
Learn to build smart contracts through epic quests โ no wallet, no installation, no backend.
๐ Live Demo ยท ๐ Documentation ยท ๐ Report Bug ยท โจ Request Feature
Soroban Quest is an open-source, fully client-side educational platform that teaches developers how to write Soroban smart contracts on the Stellar network through a gamified RPG-style quest system.
Inspired by Node Guardians, the platform provides:
- ๐ฎ RPG quest narrative โ immersive story-driven missions
- โจ๏ธ In-browser code editor โ Monaco Editor with Rust syntax highlighting
- ๐งช Instant validation โ AST-based pattern matching (no compilation server needed)
- ๐ XP, levels & badges โ full progression system
- ๐บ๏ธ Visual learning path โ SVG mission map with progress tracking
- ๐พ Offline-first โ all progress saved in
localStorage
Zero backend. Zero cost. Open โ Code โ Learn โ Win.
| Feature | Description |
|---|---|
| 7 Progressive Missions | From "Hello Soroban" to multi-signature contracts |
| XP System | Earn 100โ400 XP per mission with exponential leveling |
| 10 Rank Titles | Progress from Initiate to Stellar Sovereign |
| 8 Achievement Badges | Unlock milestones like First Contract and Completionist |
| Hint System | Progressive hints when you're stuck |
- Monaco Editor โ the same editor that powers VS Code
- Rust syntax highlighting with Soroban SDK awareness
- Pre-loaded code templates for every mission
- Solution reveal for learning by example
Since compiling Rust in the browser is not feasible without a backend, Soroban Quest uses an innovative AST-based pattern matching engine that validates:
- โ
Function signatures (
fn name, parameters, return types) - โ
Soroban attributes (
#[contract],#[contractimpl]) - โ
Storage operations (
env.storage().instance().get/set) - โ
Type usage (
Address,Symbol,Vec,Map) - โ
Access control patterns (
require_auth()) - โ Syntax correctness (balanced braces/parentheses)
- localStorage persistence โ progress survives browser restarts
- JSON export/import โ back up and restore your journey
- Full reset โ start fresh anytime
Chapter 1: The Foundations
โโโ ๐ข Mission 1 โ The First Contract (100 XP)
โโโ ๐ข Mission 2 โ Greetings Protocol (150 XP)
Chapter 2: The Vault
โโโ ๐ก Mission 3 โ The Counter Vault (200 XP)
โโโ ๐ก Mission 4 โ Guardian Ledger (250 XP)
Chapter 3: Advanced Protocols
โโโ ๐ด Mission 5 โ Token Forge (300 XP)
โโโ ๐ด Mission 6 โ The Time Lock (350 XP)
โโโ ๐ด Mission 7 โ Multi-Party Pact (400 XP)
Total: 1,750 XP available
- Node.js v18+
- npm (included with Node.js)
# Clone the repository
git clone https://github.com/JafetCHVDev/soroban-quest.git
cd soroban-quest
# Install dependencies
npm install
# Start the development server
npm run devOpen http://localhost:5173/ in your browser and begin your quest! โ๏ธ
# Generate static files
npm run build
# Preview the build
npm run previewThe dist/ folder contains a fully static site โ deploy it anywhere (Vercel, Netlify, GitHub Pages, Cloudflare Pages, etc.).
soroban-quest/
โโโ index.html # Entry point
โโโ vite.config.js # Vite configuration
โโโ package.json
โโโ src/
โ โโโ main.jsx # React bootstrap
โ โโโ App.jsx # Router setup
โ โโโ index.css # Design system (~800 lines)
โ โโโ pages/
โ โ โโโ Home.jsx # Landing page with starfield animation
โ โ โโโ MissionMap.jsx # SVG learning path + mission cards
โ โ โโโ MissionDetail.jsx # Editor + story + terminal
โ โ โโโ Profile.jsx # Stats, badges, export/import
โ โโโ components/
โ โ โโโ Navbar.jsx # Navigation with live XP display
โ โโโ systems/
โ โ โโโ gameEngine.js # XP, levels, badges logic
โ โ โโโ storage.js # localStorage + export/import
โ โ โโโ codeValidator.js # Pattern matching engine
โ โ โโโ testRunner.js # Test orchestration
โ โ โโโ missionLoader.js # Mission data access
โ โโโ data/
โ โโโ missions.js # 7 mission definitions
โโโ docs/
โโโ logo.svg # Project logo
| Layer | Technology |
|---|---|
| Framework | React 18 |
| Build Tool | Vite 6 |
| Code Editor | Monaco Editor |
| Routing | React Router DOM (HashRouter) |
| Markdown | react-markdown |
| Persistence | localStorage |
| Styling | Vanilla CSS with custom properties |
- Dark space RPG theme with deep blues and neon accents
- Glassmorphism cards with backdrop blur
- Glow effects on interactive elements
- Animated starfield on the landing page
- Terminal-style output with typewriter animation
- Responsive down to mobile viewports
- Typography: Orbitron (display), Inter (body), JetBrains Mono (code)
Contributions are welcome! Here are some ways you can help:
Missions are defined in src/data/missions.js. Each mission object includes:
{
id: 'unique-id',
title: 'Mission Title',
chapter: 1,
order: 1,
difficulty: 'beginner', // beginner | intermediate | advanced
xpReward: 100,
story: '# Markdown story content...',
learningGoal: 'One-line description',
template: '// Starter code...',
solution: '// Reference solution...',
checks: [
{ type: 'has_function', name: 'my_fn', params: ['env'], message: 'Error message' },
// ... more validation checks
],
hints: ['Hint 1', 'Hint 2'],
conceptsIntroduced: ['concept1', 'concept2'],
}| Type | Description |
|---|---|
has_function |
Checks for function with specific name/params |
returns_type |
Validates function return type |
has_attribute |
Checks for Rust attributes |
contains_pattern |
Pattern exists in code |
no_pattern |
Pattern must NOT exist |
uses_type |
Checks for type usage |
storage_operation |
Validates storage get/set/has/remove |
has_struct |
Checks for struct definition |
has_import |
Validates use/import statements |
balanced_braces |
Syntax validation |
# Fork & clone
git clone https://github.com/JafetCHVDev/soroban-quest.git
# Create a feature branch
git checkout -b feat/new-mission
# Make your changes and test
npm run dev
# Build and verify
npm run build
# Submit a pull requestThis project is licensed under the MIT License โ see the LICENSE file for details.
- Stellar Development Foundation โ for the Soroban platform
- Node Guardians โ for the gamified learning inspiration
- Monaco Editor โ for the powerful in-browser editor
- Vite โ for the blazing-fast build tooling
Built with โก for the Stellar ecosystem