Installing

The following details are required on the env file.

DATABASE_URL=
JWT_SECRET=
ADMIN_JWT_SECRET=
ALCHEMY_API=
CRON_PASSWORD=

Postgres database url can be entered in the environment. You can get one from supabase or planetscaledb

Alchemy API is used for NFT Gating and Token Gating features.

For admins and users, you must use separate JWT Secrets.

Generate JWT SHA 256 Secret from: https://cloud.google.com/network-connectivity/docs/vpn/how-to/generating-pre-shared-key

You must enable Cloudflare and Cloudflare IP geolocation in order to use the country blocklist and log user login information.

Database

You can import the db/db.sql to your database or run the following prisma migration command.

npx prisma migrate

Admin Account

Replace 0x00000000000000000000000000000000dEaD with your wallet address in the db/seed.ts file. Or you can create and record at the admins table on postgres with your wallet address

Cron Jobs

To clear refresh tokens and nonces, cron jobs are used. You can use https://cron-job.org/en/ to manage cron.

15 min cron jobs for nonce clear.

*/15 * * * * /api/console/cron/clear_nonce?password=[CRON_PASSWORD]

4hr cron jobs for tokens clear.

* */4 * * * /api/console/cron/clear_tokens?password=[CRON_PASSWORD]

Last updated