Skip to main content

Overview

Sample projects

Take a look at some sample dapps below and see the possibilities of building on ICP. All samples and further projects can be found in the samples repo. Additional resources can be found in the awesome DFINITY repo, a curated set of open-source projects and examples from our community.

Hello, world!

The dapp equivalent of 'Hello, World!' with a separate backend and frontend canister serving a web page.

Developer ladder series

A 36-part tutorial series that includes several sample applications and workflows.

Actor classes

A sample dapp that shows a dynamic actor (class) instantiation.

Basic Bitcoin

Basic Ethereum

Basic decentralized autonomous organization (DAO)

This sample dapp showcases decentralized governance. It demonstrates how to initialize a set of accounts and corresponding tokens, how account owners can submit proposals for other account owners to vote on, and how a proposal is executed given enough favorable votes.

Basic decentralized exchange (DEX)

To enable DeFi applications on ICP, canisters need to interact with token canisters and the ledger canister. This example dapp illustrates these interactions by showing how to enable an Exchange to take custody of funds, update an internal balance book as users trade, and give custody back to the user as funds are withdrawn.

Calculator

This example demonstrates a basic calculator dapp. It uses an orthogonally persistent cell variable to store an arbitrary precision integer that represents the result of the most recent calculation.

Canister info

Canister logs

This dapp provides an example of how canister logs can be used.

Canister snapshots

Certified variables

This dapp provides a frontend and a backend that shows a simple certified variable (a single 32-bit number), with client-side certificate validation.

Chain Fusion starter

Composite queries

Counter

A simple dapp that shows a basic (stable) variable demo.

Encrypted note-taking dapp

Create, access, modify confidential notes from multiple devices using Internet Identity service and end-to-end encryption. The sample code relies upon the web-serving and storage capabilities of ICP, and highlights two key functionalities:

  1. Client-side, end-to-end encryption.
  2. Multi-user and multi-device support.

Hosting a static website

This tutorial shows how to quickly set up a static website structure, add content and basic styling, and deploy to ICP.

Hosting a web game

The example shows how to deploy a web game on ICP, sample code can be found at samples repo.

ICP transfer

This sample code demonstrates how a canister can hold and transfer ICP tokens.

ICRC-2 token swap

Internet Identity integration

Minimal counter dapp

The example dapp shows how to build a very basic dapp with both backend and frontend, using Motoko for the backend functionality and plain HTML and JavaScript for the frontend. The dapp is a simple counter, which will increment a counter by clicking a button in the frontend.

NFT minting

This NFT minting dapp showcases how easy it can be to create a user generated NFT and share it. This dapp uses the DIP721 NFT standard.

NFT wallet

This is an NFT wallet example dapp that utilizes minted NFTs from the Rust dip721-nft-container. Among some of its essential features, the wallet can register NFTs, transfer out NFTs and check how many NFTs it contains. This dapp includes a frontend UI for interaction.

Parallel calls

Performance callers

Periodic tasks

This example demonstrates different ways of scheduling periodic tasks on the Internet Computer: timers and heartbeats. The example shows the difference between the two, and helps to decide which method suits you the best.

Point of sale (POS)

This app demonstrates a real world use case for ckBTC on the Internet Computer. It is a simple point of sale app that allows users to charge customers using ckBTC. It also demonstrates the HTTPS outcall functionality by sending notifications to users when a payment is received.

PubSub

This sample shows multiple canisters, with publisher-subscriber inter-canister calls.

QR code generator

This example shows that an Internet Computer dapp can perform a long-running computation, like image processing, in a single message execution which is possible due to a unique feature called Deterministic Time Slicing (DTS) that automatically divides long computations into smaller slices executed across multiple blocks.

Query stats

Random maze

This sample shows how to create a simple frontend in JavaScript where the previous samples did not provide a frontend, this sample provides both a frontend and a backend. It creates a random maze generation, with ICP-based randomness.

Sending and receiving cycles

This sample dapp illustrates how to receive and transfer cycles and check a balance.

Superheros

This example is a simple CRUD dapp.

Threshold ECDSA

Threshold Schnorr

Token transfer

Token approve and transfer from

This sample code demonstrates how a canister can be approved to transfer funds on behalf of a user.

WebAssembly SIMD

Who am I?

This dapp is a simple canister that reports the Principal of its caller.

Explore further samples in Motoko

This is a collection of repo-links to additional code samples written in Motoko. Most are also available in the playground. Deploying to the playground is ICP's equivalent of deploying to a testnet network. The playground provides the simplest environment for trying out pure Motoko samples without having to download and learn to use the SDK, but does not support dapps with frontends.

Full stack

These samples demonstrate how to build dapps on ICP, with frontends based on React and TypeScript.

  • Auth client demo is a simple authentication with Internet Identity.
  • IC-avatar is a full-stack Motoko + React with more advanced authentication, image uploads, and optimistic updates.

Advanced

Large samples contributed by the community and not necessarily up-to-date:

Video guides for building dapps

These videos from the community conversations series cover an introduction to building dapps in Rust, and best practices for building dapps in Rust.

Additional useful video series can be found at coding with Kyle.