https://github.com/thirdweb-example/loyalty-card
https://github.com/thirdweb-example/loyalty-card
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/thirdweb-example/loyalty-card
- Owner: thirdweb-example
- License: apache-2.0
- Archived: true
- Created: 2023-09-04T12:32:00.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T00:31:48.000Z (almost 2 years ago)
- Last Synced: 2025-03-13T08:45:09.450Z (11 months ago)
- Language: TypeScript
- Homepage: https://loyalty-card.thirdweb-example.com
- Size: 22.5 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
> [!Important]
> This repository is referencing the `mumbai` chain.
>
> `Mumbai` [is deprecated since 08/04/2024](https://blog.thirdweb.com/deprecation-of-mumbai-testnet/), meaning the code in this repository will no longer work out of the box.
>
> You can still use this repository, however you will have to switch any references to `mumbai` to another chain.
# Loyalty Card Template
This project demonstrates how you can create loyalty cards for your customers using NFTs.
## Installation
Install the template with [thirdweb create](https://portal.thirdweb.com/cli/create)
```bash
npx thirdweb create --template loyalty-card
```
## Set up
- Deploy or import an already deployed Loyalty card contract on thirdweb dashboard.
- Update the contract address in the [consts.ts](./consts.ts) file to use your contract address.
### Environment Variables
To run this project, you will need to add the following environment variables to your .env file:
```bash
NEXT_PUBLIC_TEMPLATE_CLIENT_ID=
TW_SECRET_KEY=
WALLET_PRIVATE_KEY=
```
- Generate your `TW_SECRET_KEY` and `NEXT_PUBLIC_TEMPLATE_CLIENT_ID` via thirdweb's [dashboard](https://thirdweb.com/create-api-key).
- For `WALLET_PRIVATE_KEY` export your wallet private key from your wallet.
### Run Locally
Install dependencies:
```bash
yarn
```
Start the server:
```bash
yarn start
```
## Additional Resources
- [Documentation](https://portal.thirdweb.com)
- [Templates](https://thirdweb.com/templates)
- [Video Tutorials](https://youtube.com/thirdweb_)
- [Blog](https://blog.thirdweb.com)
## Contributing
Contributions and [feedback](https://feedback.thirdweb.com) are always welcome!
Please visit our [open source page](https://thirdweb.com/open-source) for more information.
## Need help?
For help, join the [discord](https://discord.gg/thirdweb) or visit our [support page](https://support.thirdweb.com).