Skip to content

Commit

Permalink
feat: add community templates (#2476)
Browse files Browse the repository at this point in the history
Co-authored-by: Damián Parrino <bucanero@users.noreply.github.com>
  • Loading branch information
flmel and bucanero authored Feb 21, 2025
1 parent 5e23dc3 commit e7f231d
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions docs/2.build/4.web3-apps/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ Make sure you are using **node >= v18**, you can easily switch versions using `n

</details>

<hr className="subsection" />
:::info Info: Community Starter Templates

These are some community templates that you can use to start quickstart your project. Reffer to their pages for more information:
* [Bitte Templates](https://templates.mintbase.xyz) - A `collection` of templates from [Bitte](https://www.bitte.ai/) and [MintBase](https://mintbase.xyz)
* [NEARBuilders/near-vite-starter](https://github.com/NEARBuilders/near-vite-starter) - `Vite`, `TypeScript`, `Tanstack`, `Tailwind`,`Playwright`

:::
---

## Landing Page
Expand All @@ -79,15 +87,18 @@ Our app's template is defined at `./src/pages/_app.js`. It does two things:
1. Initializes a [wallet selector](../../4.tools/wallet-selector.md), and stores it in context so other components can access it later.
2. Renders the navigation menu and the page's content.

<Github url="https://github.com/near-examples/hello-near-examples/blob/main/frontend/src/pages/_app.js" language="jsx" start="9" end="22" />
<Github url="https://github.com/near-examples/hello-near-examples/blob/main/frontend/src/pages/_app.js" language="jsx" start="22" end="48" />

When initializing the `wallet` you can choose to create a [function call access key](../../1.concepts/protocol/access-keys.md) for a specific contract for the application to use. This allows the application to sign `non-payable` methods on behalf of the user so they are not required to manually sign each transaction.
When initializing the wallet-selector you can choose to **create a [Function-Call Key](../../1.concepts/protocol/access-keys.md)** using the `createAccessKeyFor` parameter. This allows the application to sign `non-payable` methods on behalf of the user so they are not required to manually sign each transaction.

```jsx
const wallet = new Wallet({
createAccessKeyFor: HelloNearContract,
const walletSelectorConfig = {
networkId: NetworkId,
});
createAccessKeyFor: HelloNearContract,
modules: [
...
],
};
```

This example additionally includes the option to login with `Metamask` and other `EVM wallets`. Further information on how to add EVM wallets to your application can be found in the [Ethereum Wallets on NEAR documentation](./ethereum-wallets.md).
Expand Down

0 comments on commit e7f231d

Please sign in to comment.