One of Us Is Lying by Karen McManus (2017)

A colleague's description of this book had me at "Breakfast Club but with murder."

A bunch of high school kids end up in detention together and suddenly, one (who just happens to write a poisonous gossip blog) suddenly dies of a deliberately triggered allergy. Each of the implicated kids, from the drug dealing burnout to the class princess to the jock with a secret are beautifully drawn and realistic.

And, apparently, there's a sequel: One of Us Is Next (2020).