Front-end code snippets