generated from coinbase/onchain-app-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8574a8f
Showing
49 changed files
with
1,348 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# ~~~ | ||
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=GA_TEST_1234567890 | ||
|
||
# See https://www.coinbase.com/developer-platform/products/base-node | ||
NEXT_PUBLIC_CDP_API_KEY="CDP_API_KEY_1234567890" | ||
|
||
# ~~~ | ||
NEXT_PUBLIC_ENVIRONMENT=localhost | ||
|
||
# See https://cloud.walletconnect.com/ | ||
NEXT_PUBLIC_WC_PROJECT_ID="TEST_1234567890" |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# ~~~ | ||
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID= | ||
|
||
# See https://www.coinbase.com/developer-platform/products/base-node | ||
NEXT_PUBLIC_CDP_API_KEY="GET_FROM_COINBASE_DEVELOPER_PLATFORM" | ||
|
||
# ~~~ | ||
NEXT_PUBLIC_ENVIRONMENT=localhost | ||
|
||
# See https://cloud.walletconnect.com/ | ||
NEXT_PUBLIC_WC_PROJECT_ID="GET_FROM_WALLET_CONNECT" |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# ~~~ | ||
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=GA_TEST_1234567890 | ||
|
||
# See https://www.coinbase.com/developer-platform/products/base-node | ||
NEXT_PUBLIC_CDP_API_KEY="CDP_API_KEY_1234567890" | ||
|
||
# ~~~ | ||
NEXT_PUBLIC_ENVIRONMENT=localhost | ||
|
||
# See https://cloud.walletconnect.com/ | ||
NEXT_PUBLIC_WC_PROJECT_ID="TEST_1234567890" |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Bug report | ||
description: Create a report to help us improve | ||
title: 'Bug: ' | ||
labels: ['type: bug'] | ||
|
||
body: | ||
- type: textarea | ||
id: steps | ||
attributes: | ||
label: Describe the bug and the steps to reproduce it | ||
placeholder: | | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: expected | ||
attributes: | ||
label: What's the expected behavior? | ||
|
||
- type: textarea | ||
id: environment | ||
attributes: | ||
label: What version of the libraries are you using? | ||
placeholder: | | ||
- OnchainKit: [e.g. 0.2.x] |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Base Discord | ||
url: https://base.org/discord | ||
about: The official Base Discord community. |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Documentation request | ||
description: Suggest a documentation for this project | ||
title: 'Documentation Request: ' | ||
labels: ['type: documentation'] | ||
|
||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
This issue form is for documentation requests only! | ||
If you've found a bug, please use [bug_report](/new?template=bug_report.yml) | ||
- type: textarea | ||
id: problem | ||
attributes: | ||
label: Is your documentation request related to a problem? Please describe. | ||
description: A clear and concise description of what the problem is. Ex. It's not clear when [...] |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Feature request | ||
description: Suggest an idea for this project | ||
title: 'Feature Request: ' | ||
labels: ['type: enhancement'] | ||
|
||
body: | ||
- type: textarea | ||
id: solution | ||
attributes: | ||
label: Describe the solution you'd like | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: alternatives | ||
attributes: | ||
label: Describe alternatives you've considered. |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
**What changed? Why?** | ||
|
||
**Notes to reviewers** | ||
|
||
**How has it been tested?** |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Setup | ||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
registry-url: https://registry.npmjs.org | ||
cache: yarn | ||
|
||
# For provenance https://docs.npmjs.com/generating-provenance-statements#prerequisites | ||
- name: Install npm 9.5 | ||
run: npm install -g npm@^9.5.0 | ||
shell: bash | ||
|
||
- name: Install node modules | ||
run: yarn install --frozen-lockfile | ||
shell: bash |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Template Build | ||
on: | ||
push: | ||
branches: ['main'] | ||
pull_request: | ||
branches: ['main'] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Bun | ||
uses: oven-sh/setup-bun@v2 | ||
|
||
- name: Template Install dependencies | ||
run: bun install | ||
|
||
- name: Template Test Build | ||
# When fails, please check your build | ||
run: | | ||
bun run build |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Template Check | ||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Bun | ||
uses: oven-sh/setup-bun@v2 | ||
|
||
- name: Template Install dependencies | ||
run: bun install | ||
|
||
- name: Template Check | ||
run: bun run ci:check |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Template Format | ||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Bun | ||
uses: oven-sh/setup-bun@v2 | ||
|
||
- name: Template Install dependencies | ||
run: bun install | ||
|
||
- name: Template Format | ||
run: bun run ci:format |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Template Lint | ||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Bun | ||
uses: oven-sh/setup-bun@v2 | ||
|
||
- name: Template Install dependencies | ||
run: bun install | ||
|
||
- name: Template Lint | ||
run: bun run ci:lint |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Salus Security Scan | ||
|
||
on: [pull_request, push] | ||
|
||
jobs: | ||
scan: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Salus Scan | ||
id: salus_scan | ||
uses: federacy/scan-action@0.1.4 | ||
with: | ||
active_scanners: "\n - PatternSearch\n - Semgrep\n - Trufflehog" |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Kit Test | ||
on: | ||
push: | ||
branches: ['main'] | ||
pull_request: | ||
branches: ['main'] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Bun | ||
uses: oven-sh/setup-bun@v2 | ||
|
||
- name: Template Install dependencies | ||
run: bun install | ||
|
||
- name: Kit Test | ||
# When fails, please check your tests | ||
run: bun run test:coverage |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
.env |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Coinbase | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<p align="center"> | ||
<picture> | ||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/coinbase/onchainkit/main/site/docs/public/logo/v0-27.png"> | ||
<img alt="OnchainKit logo vibes" src="https://raw.githubusercontent.com/coinbase/onchainkit/main/site/docs/public/logo/v0-27.png" width="auto"> | ||
</picture> | ||
</p> | ||
|
||
# Onchain App Template | ||
|
||
An Onchain App Template build with [OnchainKit](https://onchainkit.xyz), and ready to be deployed to Vercel. | ||
|
||
Play with it live on https://onchain-app-template.vercel.app | ||
|
||
Have fun! ⛵️ | ||
|
||
<br /> | ||
|
||
## Setup | ||
|
||
To ensure all components work seamlessly, set the following environment variables in your `.env` file using `.local.env.example` as a reference. | ||
|
||
You can find the API key on the [Coinbase Developer Portal's OnchainKit page](https://portal.cdp.coinbase.com/products/onchainkit). If you don't have an account, you will need to create one. | ||
|
||
You can find your Wallet Connector project ID at [Wallet Connect](https://cloud.walletconnect.com). | ||
|
||
```sh | ||
# See https://portal.cdp.coinbase.com/products/onchainkit | ||
NEXT_PUBLIC_CDP_API_KEY="GET_FROM_COINBASE_DEVELOPER_PLATFORM" | ||
|
||
# See https://cloud.walletconnect.com | ||
NEXT_PUBLIC_WC_PROJECT_ID="GET_FROM_WALLET_CONNECT" | ||
``` | ||
<br /> | ||
|
||
## Locally run | ||
|
||
```sh | ||
# Install bun in case you don't have it | ||
bun curl -fsSL <https://bun.sh/install> | bash | ||
|
||
# Install packages | ||
bun i | ||
|
||
# Run Next app | ||
bun run dev | ||
``` | ||
<br /> | ||
|
||
## Resources | ||
|
||
- [OnchainKit documentation](https://onchainkit.xyz) | ||
|
||
<br /> | ||
|
||
## License | ||
|
||
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details |
Oops, something went wrong.