New groupset for Specialized Rockhopper

Hello all. Sorry if this is a silly question, but I'm really clueless on the mechanical side. I'd be truly grateful for any help. Thanks in advance....

I am after some advice please on how I might reasonably upgrade the drivetrain on my 2015 Specialized Rockhopper 29" MTB. I'm not sure it's really worth it, but the frame seems fine and my newish RockShox Judy fork is brilliant (what an upgrade!), so I might as well do a Trigger's Broom and keep upgrading.

I've looked at groupsets which seem to come with or without brakes. My rear brake needs replacing, while the front brake is fine, however I am happy to replace as part of a package.

So, with a budget of maybe £400, is there a particular groupset that I should get? I really want a 1xSomething set up, but otherwise I'm not fussy. Any links to specific products most welcome.

And, for comparison, how much would a whole new 29" hardtail with a similar groupset cost?

Thanks very much. Any advice very much appreciated.

Cheers
Al