This is a Next.js project bootstrapped with create-next-app
.
To install packages, run npm ci --legacy-peer-deps
To run, use npm run dev
and open localhost:3000
.env
requires the following variables. You can also rename the sample.env
file to .env
and fill in the details listed below.
NEXT_SUPABASE_DB_URL= supabase DB url NEXT_SUPABASE_DB_KEY= supabase key NEXT_SHYFT_API_EP= https://api.shyft.to/sol/v1/ NEXT_SHYFT_API_KEY= your SHYFT API key from shyft.to NEXT_CALLBACK_URL=The url to which the callbacks will be reported to, when running on local environment you can set it up using ngrok, localtunnel,serveo etc NEXT_PUBLIC_KEY= public key of the user who setup the project, merkle tree auth and Compressed NFT authority remains with this,this will also be the feepayer while creating merkle tree and compressed NFTs NEXT_PRIVATE_KEY=private key of the above user
Manual database setup
Supabase project setup should have two tables, and RLS
should be disabled.
table name-> callback_details
id,created_at auto reference_address:text monitor_addresses: json callback_id: text network: text
table name -> monitor_mints
id,created_at auto mint_address: text current_holder: text nft_data: json network: text refernece_address
you can also setup the project from the csv files provided in db_exports
,
- import the file
callback_details_rows
in a table namedcallback_details
- set the
id
column to be not null and primary key(and removeRLS
) - clear out the rows before starting the project
- import the file
monitor_mints_rows
in a table namedmonitor_mints
- set the
id
column to be not null and primary key(and removeRLS
) - clear out the rows before starting the project
Thats all the setup you need.
This project uses live callbacks to manage data.
- To list your callbacks, use our List callback Docs. You can also view the id on the
callback_details
table in supabase. - To remove already created callback, use our Remove callback Docs. You can view the id on the
callback_details
table in supabase.
or you can also use our swagger interface to do the same.
For more details, visit https://docs.shyft.to/, or SHYFT website.
First, run the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.tsx
. The page auto-updates as you edit the file.
API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts
.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.