Skip to content

nimiq/tutorial

Repository files navigation

Nimiq Tutorial Logo
Nimiq Tutorial

Learn how to build decentralized applications with the Nimiq blockchain using the Web Client

No downloads, no installations - just JavaScript that connects directly to the blockchain!

Interactive Tutorials      Web Client Documentation Developer Center


What Makes This Tutorial Special?

  • 🔥 Zero Setup Required: Everything runs in your browser using WebContainer
  • 📚 Beginner-Friendly: No prior blockchain experience needed
  • 🧪 Hands-On Learning: Try code examples immediately
  • 🌐 Real Blockchain Interaction: Connect to the actual Nimiq testnet and mainnet
  • ⚡ Interactive Environment: Complete file system with terminal access

📖 What You'll Learn

By the end of this tutorial, you'll master:

  • Network Connection: Connect to Nimiq and read blockchain data
  • Wallet Management: Create wallets and generate addresses
  • Transaction Handling: Send payments and manage funds
  • Staking Operations: Delegate tokens and earn rewards
  • Advanced Features: Work with HTLCs, cashlinks, and more

🗺️ Tutorial Structure

🎯 0. Introduction

  • Welcome to Nimiq and blockchain development
  • Understanding the Web Client architecture
  • Setting up your development environment

🔌 1. Connecting to Network

  • Establishing connection to Nimiq network
  • Exploring blockchain data and consensus
  • Understanding network synchronization

💰 2. Working with Transactions

  • Creating and managing wallets
  • Requesting testnet funds from faucet
  • Signing and sending transactions

🏆 3. Staking and Validators

  • Understanding Proof-of-Stake consensus
  • Exploring validator ecosystem
  • Implementing staking operations

🔧 4. Miscellaneous Features

  • Advanced Web Client capabilities
  • Best practices and optimization
  • Real-world application patterns

Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • pnpm (recommended) or npm
  • Modern web browser

Installation

# Clone the repository
git clone https://github.com/onmax/nimiq-tutorial.git
cd nimiq-tutorial

# Install dependencies
pnpm install

# Start development server
pnpm dev

Development Commands

# Start development server
pnpm dev

# Build for production
pnpm build

# Preview production build
pnpm preview

# Run linting
pnpm lint

# Fix linting issues
pnpm lint:fix

Project Structure

nimiq-tutorial/
├── src/
│   ├── components/           # Custom UI components
│   ├── content/
│   │   └── tutorial/         # Tutorial content
│   │       ├── 0-introduction/
│   │       ├── 1-connecting-to-network/
│   │       ├── 2-working-with-transactions/
│   │       ├── 3-staking-and-validators/
│   │       └── 4-polygon/
│   └── templates/            # Code templates
├── public/                   # Static assets
├── scripts/                  # Build scripts
└── dist/                     # Production build

Technology Stack

Contributing

We welcome contributions! Here's how you can help:

Reporting Issues

  1. Use the "Feedback & Bugs" button in the tutorial
  2. Create detailed issues with:
    • Steps to reproduce
    • Expected vs actual behavior
    • Browser and environment details

Making Changes

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Make your changes following our coding standards
  4. Test thoroughly across different browsers
  5. Submit a pull request with a clear description

Content Guidelines

When adding or modifying tutorial content:

  • Keep it Simple: Use clear, jargon-free language
  • Be Progressive: Each step builds on the previous
  • Include Examples: Provide working code snippets
  • Test Everything: Ensure all examples work correctly
  • Add Comments: Explain complex code blocks

Learning Objectives

This tutorial is designed to help developers:

  • Understand blockchain fundamentals without getting lost in complexity
  • Build real applications using Nimiq's browser-native approach
  • Master Web Client APIs through hands-on practice
  • Develop best practices for blockchain development
  • Create production-ready decentralized applications

Additional Resources

License

This project is open source and available under the Apache License 2.0.


Ready to build your first blockchain app?
Start the Tutorial →

Made with ❤️ by the Nimiq