forked from Mintbase/templates
-
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
1 parent
3d0e733
commit fa53d34
Showing
16 changed files
with
193 additions
and
60 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
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
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
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
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
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
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
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
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,3 @@ | ||
NEXT_PUBLIC_NETWORK="testnet" | ||
NEXT_PUBLIC_CONTRACT_ADDRESS="hellovirtualworld.mintspace2.testnet" | ||
NEXT_PUBLIC_CALLBACK_URL="http://localhost:3000" |
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 |
---|---|---|
|
@@ -27,6 +27,7 @@ yarn-error.log* | |
|
||
# local env files | ||
.env*.local | ||
.env | ||
|
||
# vercel | ||
.vercel | ||
|
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,34 +1,70 @@ | ||
|
||
# Starter Next | ||
<img src="https://i.imgur.com/bHpvyk6.png" alt="cover_image" width="0" /> | ||
|
||
<img src="https://i.imgur.com/bHpvyk6.png" alt="cover_image" width="0" /> | ||
|
||
This is a simple-login project with support to Next.js 14 | ||
|
||
|
||
|
||
[![Demo](https://img.shields.io/badge/Demo-Visit%20Demo-brightgreen)](https://starter.mintbase.xyz) | ||
|
||
[![Deploy](https://img.shields.io/badge/Deploy-on%20Vercel-blue)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FMintbase%2Ftemplates%2Ftree%2Fmain%2Fstarter) | ||
|
||
|
||
|
||
**Tooling:** | ||
|
||
|
||
|
||
[![Use Case](https://img.shields.io/badge/Use%20Case-Utilities-blue)](#) | ||
|
||
[![Tools](https://img.shields.io/badge/[email protected]/react%2CArweave%2CMintbase%20Wallet-blue)](#) | ||
|
||
[![Framework](https://img.shields.io/badge/Framework-Next.js%2014-blue)](#) | ||
|
||
|
||
|
||
**Author:** | ||
|
||
|
||
|
||
[![Author](https://img.shields.io/twitter/follow/rubenmarcus_dev?style=social&logo=twitter)](https://twitter.com/rubenmarcus_dev) [![Organization](https://img.shields.io/badge/Mintbase-blue)](https://www.mintbase.xyz) | ||
|
||
|
||
|
||
## Project Walkthrough | ||
|
||
|
||
This is a simple-login project that uses [@mintbase-js/react](https://github.com/Mintbase/mintbase-js/tree/beta/packages/react) as Provider to showcase Mintbase Wallet usage. | ||
|
||
It uses Next.js 14. | ||
|
||
|
||
|
||
## Getting Started | ||
First run install | ||
|
||
|
||
|
||
*NOTE: As a standard on Mintbase as we use the latest versions of Next.js we recommend using pnpm, but the package manager is up to your personal choice.* | ||
|
||
|
||
|
||
### Install | ||
|
||
|
||
|
||
First run install | ||
|
||
|
||
|
||
|
||
```bash | ||
|
||
npm install | ||
|
||
# or | ||
|
||
npm install | ||
|
||
yarn | ||
|
||
# or | ||
|
@@ -38,24 +74,67 @@ pnpm install | |
``` | ||
|
||
|
||
Second, run the development server: | ||
### Setup | ||
|
||
```bash | ||
|
||
npm run dev | ||
**ENV Variables** | ||
|
||
# or | ||
yarn dev | ||
|
||
# or | ||
you can change the values on the `starter-next/.env.example` to the ones that suits you. | ||
|
||
|
||
`NOTE: the env variables need to have the NEXT_PUBLIC_ on the variable name due to be available for the browser to process` | ||
|
||
on the file `.env.example` , you can change / or add the env variables according to the properties of the [MintbaseWalletContextProvider](https://github.com/Mintbase/mintbase-js/tree/beta/packages/react#properties): | ||
|
||
``` | ||
NEXT_PUBLIC_NETWORK="testnet" | ||
pnpm dev | ||
NEXT_PUBLIC_CONTRACT_ADDRESS="hellovirtualworld.mintspace2.testnet" | ||
NEXT_PUBLIC_CALLBACK_URL="http://localhost:3000" | ||
``` | ||
|
||
on the file `starter-next/src/app/layout.tsx` , theres this `const`: | ||
|
||
|
||
|
||
```typescript | ||
|
||
const MintbaseWalletSetup = { | ||
contractAddress: process.env.NEXT_PUBLIC_CONTRACT_ADDRESS, | ||
network: process.env.NEXT_PUBLIC_NETWORK, | ||
callbackUrl: process.env.NEXT_PUBLIC_CALLBACK_URL, | ||
}; | ||
|
||
``` | ||
|
||
- this object accepts all the properties listed on the package [@mintbase-js/react](https://github.com/Mintbase/mintbase-js/tree/beta/packages/react) | ||
|
||
|
||
- you can check all the properties here on this link: [Mintbase Wallet Context Provider Properties](https://github.com/Mintbase/mintbase-js/tree/beta/packages/react#properties) | ||
|
||
|
||
|
||
### Running | ||
|
||
|
||
for development env just run: | ||
|
||
``` | ||
pnpm run dev | ||
``` | ||
|
||
|
||
|
||
## Get in touch | ||
|
||
- Support: [Join the Telegram](https://tg.me/mintdev) | ||
|
||
- Twitter: [@mintbase](https://twitter.com/mintbase) | ||
|
||
<img src="https://i.imgur.com/nP4DQai.png" alt="detail_image" width="0" /> | ||
|
||
|
||
<img src="https://i.imgur.com/nP4DQai.png" alt="detail_image" width="0" /> |
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
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,3 @@ | ||
VITE_NETWORK="testnet" | ||
VITE_CONTRACT_ADDRESS="hellovirtualworld.mintspace2.testnet" | ||
VITE_CALLBACK_URL="http://localhost:3000" |
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 |
---|---|---|
|
@@ -22,3 +22,5 @@ dist-ssr | |
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
.env |
Oops, something went wrong.