# Requirements and Infrastructure

## 🐳 Backend with the server (serverUrl)

The backend (VOS-Mock) exposes necessary endpoints for:

* User registration with WebAuthn
* Authentication with WebAuthn
* Bot that grants memberships to registered users

### Environment configuration

For the test environment you need an env file to catch up basic parameters. Create an .env file in the root of your project, with this content:

```bash
SEED=eternal loyal question bunker behind kind future police illegal stumble weapon tenant
WS_PROVIDER_URL=ws://localhost:12281
SIGNING_SERVICE_URL=http://localhost:4000/sign
KREIVO_PROVIDER=ws://localhost:12281

# You can change these RPC providers in case of failure
KREIVO_ENDPOINT=wss://kreivo.kippu.rocks
KUSAMA_ENDPOINT=wss://ksm-rpc.stakeworld.io
```

### To run the backend execute:

```bash
docker run -p 3000:3000 -p 12281:12281 --env-file .env bavb/virto-dev 
```

## ⛓️ Blockchain (providerUrl)

The same VOS-Mock Docker image includes a test blockchain that exposes a websocket on port 12281.

### To configure:

The component needs an attribute called `providerUrl` that points to a compatible blockchain (default: `ws://localhost:12281`).

## 🔑 Browser requirements

* WebAuthn support (all modern browsers)
* HTTPS mandatory (except on localhost)
* JavaScript enabled

> ⚠️ **Important**: The component will not work if the `serverUrl` and `providerUrl` values are not correctly configured or the services are not active.
