The devil is in the details.
Shifters and rear derailleurs can be mixed and matched unless you have a wide ratio rear cassette in which case you need a mountain bike rear derailleur.
Shimano says not to mix and match shifters and front derailleurs but many manufacturere used to spec mountain shifters with road bike front derailleurs. Within a range, your front derailleur has to match the size of your front chainrings.
Cranks are pretty much interchangable but your bottom bracket has to match your bike frame and, again within a range, you need to be aware of the chainline.