mmqnym / Discord-NFT-Verifier-Client

Verify that the user is a NFT holder and assign roles. Users' wallets will be tracked regularly.
Apache License 2.0
12 stars 5 forks source link

README Unclear #13

Open aayush-g1414 opened 1 year ago

aayush-g1414 commented 1 year ago

The instructions for step-by-step on how to set this up for me are slightly unclear, for example, for Step 2 in the setup do I create a role.json file under database? Do I need to create a Moralis server and something with MongoDB? Another thing is what exactly would my verify API URL, client URL, and verification page URL all be? If possible could you update the README to be a bit more simple?

Apologies for the inconvenience.

mmqnym commented 1 year ago

Because this project uses Discord authentication API, it will be more complicated to set up.

First, for mongodb, you only need to create the role collection under your database, and then insert at least one document with the role setting you want according to the format, because the server must know your role setting, otherwise it will not check what role users can get.

Second, on the server side, you must apply for Moralis API and Discord bot token and input them into the configs. You just need to set configs. verify API URL is simply your back-end verification URL, I'm not sure which part you don't understand. client URL is your verification web page URL. Because it is a front-end url, it is named like this. The client URL used in the test here is https://0xmimiq.github.io/Discord-NFT-Verifier-Client/ The verification page URL is the same as the client URL, which is actually mentioned in the configs comment of the server project

aayush-g1414 commented 1 year ago

create the role collection under your database, and then insert at least one document with the role setting you want according to the format

How exactly would I do that, is it something I set up just on MongoDB or do I need to modify something in the code/files

verify API URL

Do you have an example of this or where I would get it from?

Also to add on, is it possible to modify this so that it works on the Solana Blockchain?

mmqnym commented 1 year ago

How exactly would I do that, is it something I set up just on MongoDB or do I need to modify something in the code/files

You don't have to add or change project files, you just need to directly operate the database on mongodb. image

Do you have an example of this or where I would get it from?

If you know how to set up a server, it's something easy to understand. As you run the server, you must have an API URL for the front-end to be able to request. Suppose your server domain is example.app, then the API URL here is https://example.app/api/verify

/api/verify is this function API route.

Also to add on, is it possible to modify this so that it works on the Solana Blockchain?

Yes, you can. But I don't recommend checking the data on Solana through Moralis API since there is so little functionality. You can use like solscan API.