7/8 speed stuff was pretty much all cross compatible. it got a little more complex at 9 sp, and yet again at 10sp, and I dunno squat about 11sp.
brakes have to be compatible with the brake levers, there are two general classes, short and long pull. road bike 'caliber' brakes are all 'short pull', as are traditional cantilever brakes. v-brakes, and most mechanical disk brakes are 'long pull'.
chains are all compatile within a given width. 5/6/7/8 used the 'classic' width. 9 was a hair narrower, 10 quite a bit narrower, I dunno 11.
cranksets don't care what derailleurs you run as long as its the right number of gears, and its suitable for the gearing range (you can't use a short arm rear road derailleur with monster wide trekking or mountain gearing).
cranksets DO care about the bottom bracket, quite a lot. there's a dozen different incompatible BB types in recent years,a nd you HAVE to use the right type. frames now come with several different sorts of press-in BB fits now, too, which is another complication. not counting really old bikes, nearly everything in the 80s, 90s, and early 2000s used the 'british standard 68mm' BB shell size, now thats exploded to a pile of different poo.
derailleurs are quite picky about the indexed shifters. 7/8 stuff was all pretty much compatible, 9 was with other 9, but sram and shimano 10 speed is different, as is campangolo, who has all kinda their own variances.
so, no, its not that simple.