Skip to content

dfinity/examples

 
 

Repository files navigation

Internet Computer sample applications

Get started building on ICP with the sample applications in this repository. From this repository, you can deploy, download, clone, fork, or share sample projects.

The projects in this repository are not intended to be used as commercial applications and do not provide any explicit or implied support or warranty of any kind.

You can also contribute your own project or suggest updates to published projects using the standard GitHub workflow.

Sample applications

Code samples are organized by programming language:

Some examples include frontends written in a variety of frameworks such as React, JavaScript, etc.

Additional frontend samples can be found in the following folders:

Try in browser

Many examples include a GitHub Codespaces badge in their README. Clicking it opens a pre-configured environment with the ICP toolchain installed — the local network starts and canisters are deployed automatically. No local setup required.

Browse all your Codespaces at github.com/codespaces.

Local development

Dev Containers

Open the repo root in VS Code with the Dev Containers extension to get a pre-configured environment with the full ICP toolchain for both Motoko and Rust. VS Code will prompt you to reopen in the container automatically.

git clone https://github.com/dfinity/examples.git

Then navigate into an example and follow its README to deploy.

Note: The per-example devcontainer configs are designed for GitHub Codespaces. For local Dev Container use, always open the repo root.

Command line

Install icp-cli, clone the repo, navigate into an example, and follow its README:

git clone https://github.com/dfinity/examples.git
cd examples/<language>/<example>

Resources

Security considerations and best practices

If you base your application on one of these examples, we recommend you familiarize yourself with and adhere to the security best practices for developing on the Internet Computer. The examples provided here may not implement all the best practices.

About

Example applications, microservices, and code samples for the Internet Computer

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors