> For the complete documentation index, see [llms.txt](https://w3auth.devzstudio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://w3auth.devzstudio.com/installing.md).

# 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**](https://app.supabase.com/) **or** [**planetscaledb**](https://planetscaledb.com)

[**Alchemy API**](https://alchemy.com/?r=TkzODEwNzgyMjYxN) 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**](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&#x20;

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

```
npx prisma migrate
```

## Admin Account&#x20;

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.&#x20;

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

**4hr cron jobs for tokens clear.**&#x20;

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