> For the complete documentation index, see [llms.txt](https://docs.petal.build/petal-pro-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.petal.build/petal-pro-documentation/v1.6.0/fundamentals/util-and-helpers.md).

# Util & Helpers

We have two files to put helper functions:

* `Util` (`/lib/petal_pro/util/util.ex`) - utility functions used anywhere, eg. `random_string()`
* `PetalProWeb.Helpers` (`lib/petal_pro_web/helpers.ex`)- utilities functions imported into views (templates and live views), eg. `main_menu_items()`, `is_admin?`

If you want to add new helpers, ask "is this only going to be used in templates and live views?". If yes then put it in `helpers.ex`. If "no", put it in `util.ex`.&#x20;
