> For the complete documentation index, see [llms.txt](https://adamite.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://adamite.gitbook.io/docs/server/database/securing-your-data.md).

# Securing your data

By default Adamite doesn't enforce security on the database. When you're ready to configure security, you can do so with database rules.

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.
