|
2 | 2 |
|
3 | 3 | Who am I? demonstrates how entities on the Internet Computer are identified. Every entity, such as a user or canister smart contract, has a principal identifier. Principals can be used for identification and authentication. Who am I? uses Internet Identity (II) for user authentication, then displays the principal identifier associated with that Internet Identity on the user interface.
|
4 | 4 |
|
5 |
| -This application's logic is written in [Rust](https://internetcomputer.org/docs/building-apps/developer-tools/cdks/rust/intro-to-rust), a primary programming language for developing canisters on ICP. |
6 |
| - |
7 | 5 | ## Deploying from ICP Ninja
|
8 | 6 |
|
9 |
| -When viewing this project in ICP Ninja, you can deploy it directly to the mainnet for free by clicking "Deploy" in the upper right corner. Open this project in ICP Ninja: |
10 |
| - |
11 | 7 | [](https://icp.ninja/i?g=https://github.com/dfinity/examples/rust/who_am_i)
|
12 | 8 |
|
13 |
| -## Project structure |
| 9 | +## Build and deploy from the command-line |
14 | 10 |
|
15 |
| -The `/backend` folder contains the Rust smart contract: |
| 11 | +### 1. [Download and install the IC SDK.](https://internetcomputer.org/docs/building-apps/getting-started/install) |
16 | 12 |
|
17 |
| -- `Cargo.toml`, which defines the crate that will form the backend |
18 |
| -- `lib.rs`, which contains the actual smart contract, and exports its interface |
| 13 | +### 2. Download your project from ICP Ninja using the 'Download files' button on the upper left corner, or [clone the GitHub examples repository.](https://github.com/dfinity/examples/) |
19 | 14 |
|
20 |
| -The `/frontend` folder contains web assets for the application's user interface. The user interface is written using the React framework. |
| 15 | +### 3. Navigate into the project's directory. |
21 | 16 |
|
22 |
| -## Build and deploy from the command-line |
| 17 | +### 4. Deploy the project to your local environment: |
23 | 18 |
|
24 |
| -To migrate your ICP Ninja project off of the web browser and develop it locally, follow these steps. These steps are necessary if you want to deploy this project for long-term, production use on the mainnet. |
| 19 | +``` |
| 20 | +dfx start --background --clean && dfx deploy |
| 21 | +``` |
25 | 22 |
|
26 |
| -### 1. Download your project from ICP Ninja using the 'Download files' button on the upper left corner under the pink ninja star icon. |
| 23 | +## Security considerations and best practices |
27 | 24 |
|
28 |
| -### 2. Open the `BUILD.md` file for further instructions. |
| 25 | +If you base your application on this example, it is recommended that you familiarize yourself with and adhere to the [security best practices](https://internetcomputer.org/docs/building-apps/security/overview) for developing on ICP. This example may not implement all the best practices. |
0 commit comments