# Securing your data

Adamite allows you to secure your database using rules. By default, your database's rules file is located in `database/rules.js`.&#x20;

```javascript
module.exports = {
  "default": {
    
  }
};
```

To begin adding rules, you'll want to specify a collection and an operation to secure in the `rules.js` file.

```javascript
module.exports = {
  "default": {
    "projects": {
      "read": () => {
        return true;
      }
    }
  }
};
```

Now, when anyone attempts to read a document in the `projects` collection, the function specified will be executed first and must return `true` to allow the operation to proceed.

To prevent the operation from proceeding, you can either return `false` or throw an `Error` which will be sent back to the client.
