To execute the whole application locally, there are two paths:
- Create your own Discord server, and in the server settings create a new role with the same name as the one you have defined in the
.env
file (for example 'chad'). - Create an application with a bot, copy the Application ID and it will be your DISCORD_CLIENT_ID env variable in the
.env
file. - In the application at the Bot page, allow all the "Privileged Gateway Intents" and click "Save changes".
- In the application at the Bot page, click "Reset Token" to create a new bot token, and it will be your DISCORD_BOT_TOKEN env variable in the
.env
file. - In the application at OAuth2 > Url generator, to set up the OAuth2 flow, in SCOPES select "bot" and in BOT PERMISSIONS set "Manage Roles" and "Send Messages". Copy the "generated URL" and paste it into a new tab in the browser, add the bot to your new server and authorize it.
- Now your bot is in your server and can verify the membership of new users with Sismo!!
The steps to run the application are the following:
- Clone the Sismord bot repository (follow the readme instructions to set up the bot).
- Clone this repository and install the dependencies:
git clone https://github.com/mmatteo23/sismord-frontend cd sismord-frontend yarn
- Create the
.env
file and fill it with the correct values:cp .env.example .env
- Run the Sismord bot (follow its readme instructions)
- Run the Sismord frontend:
yarn start
Now you're ready to test the application. You can follow these steps:
- Join the Discord server using the invite link (if you are following the 2nd path, our test discord channel is here, otherwise you have to join the server you created).
- The bot will send you a message with a link that redirects to the Sismord frontend. Click on the link to go to the verification process.
- Follow the zkConnect flow to verify your identity.
- Go back to the Discord channel and you should see a new role assigned to you (in case you followed the 2nd path, you should see the
chad
role, and a channel accessible only if you have that role).