-
Notifications
You must be signed in to change notification settings - Fork 393
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #999 from dfinity/jessiemongeon1-patch-2
Update README.md
- Loading branch information
Showing
1 changed file
with
46 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,64 @@ | ||
## DFINITY Examples for the Internet Computer | ||
# Internet Computer sample applications | ||
|
||
This repository provides access to sample code, applications, and microservices that run on the Internet Computer platform. | ||
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. | ||
|
||
From this repository, you can 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 will also be able to contribute your own project or suggest updates to published projects using the standard Git work flow. | ||
You can also contribute your own project or suggest updates to published projects using the standard GitHub workflow. | ||
|
||
Sample projects provide a way for you to experiment and collaborate with other developers. | ||
The projects and sample code are not, however, intended to be used as commercial applications and do not provide any explicit or implied support or warranty of any kind. | ||
## Sample applications | ||
|
||
To get started: | ||
Code samples are organized by programming language: | ||
|
||
1. Open a terminal shell on your local computer. | ||
- [Motoko](https://github.com/dfinity/examples/tree/master/motoko) | ||
- [Rust](https://github.com/dfinity/examples/tree/master/rust) | ||
- [C](https://github.com/dfinity/examples/tree/master/c) | ||
|
||
1. Download the DFINITY Canister SDK, if needed: | ||
Some examples include frontends written in a variety of frameworks, such as React, JavaScript, etc. | ||
|
||
``` | ||
sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)" | ||
``` | ||
Additional frontend samples can be found in the following folders: | ||
|
||
1. Select a language—for example, `c` or `motoko`—to explore the examples available in the language of your choice. | ||
- [Svelte](https://github.com/dfinity/examples/tree/master/svelte) | ||
- [HTML](https://github.com/dfinity/examples/tree/master/hosting) | ||
- [Unity](https://github.com/dfinity/examples/tree/master/native-apps) | ||
|
||
1. Clone the repository to download the `examples` repo to your local workspace. | ||
## Deploying samples | ||
|
||
1. Open the project folder for the example you want to use. | ||
### GitHub Codespaces or Gitpod | ||
|
||
1. Start a local internet computer replica by running the following command: | ||
This repo can be opened in a web-based developer environment such as [GitHub Codespaces](https://github.com/codespaces) or [Gitpod](https://www.gitpod.io/), allowing you to edit and deploy the sample projects without downloading any tools or setting up a local environment. | ||
|
||
``` | ||
dfx start | ||
``` | ||
[Get started with GitHub codespaces](https://internetcomputer.org/docs/current/developer-docs/developer-tools/ide/codespaces). | ||
|
||
1. Open a new terminal shell on your local computer. | ||
[Get started with Gitpod](https://internetcomputer.org/docs/current/developer-docs/developer-tools/ide/gitpod). | ||
|
||
1. Build the sample project by running the following command: | ||
### Motoko Playground | ||
|
||
``` | ||
dfx build | ||
``` | ||
Motoko Playground is a web-based developer environment for Motoko projects. To use Motoko Playground, navigate to the [playground UI](https://m7sm4-2iaaa-aaaab-qabra-cai.ic0.app/) and select a template to get started, or start a new project. | ||
|
||
## Security Considerations and Best Practices | ||
### dfx | ||
|
||
If you base your application on one of these examples, we recommend you familiarize yourself with and adhere to the [Security Best Practices](https://internetcomputer.org/docs/current/references/security/) for developing on the Internet Computer. The examples provided here may not implement all the best practices. | ||
dfx is a command-line tool used to create, deploy. and manage projects on ICP. To download and use dfx with this examples repo, run the following commands locally (macOS/Linux systems): | ||
|
||
``` | ||
git clone https://github.com/dfinity/examples.git | ||
cd examples | ||
sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)" | ||
``` | ||
|
||
Then, navigate into the folder of the sample that you want to use and follow the project's README instructions to setup and deploy the sample code. | ||
|
||
|
||
## Resources | ||
|
||
- [ICP Developer Docs](https://internetcomputer.org/docs/current/home) | ||
|
||
- [Overview of ICP](https://internetcomputer.org/docs/current/developer-docs/getting-started/overview-of-icp) | ||
|
||
- [Installing dfx](https://internetcomputer.org/docs/current/developer-docs/getting-started/install/) | ||
|
||
- [Developer tools](https://internetcomputer.org/docs/current/developer-docs/developer-tools/dev-tools-overview) | ||
|
||
## 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](https://internetcomputer.org/docs/current/references/security/) for developing on the Internet Computer. The examples provided here may not implement all the best practices. |