Its really bothering me that the diode is shown in the opposite direction here and i don't understand why its been put like that? the input voltage will come from the left side of the circuit then why is the diode's cathode connected to the output of the op amp? does the polarity even matter here?
In this particular circuit application, the demodulation of amplitude modulated RF, no, the polarity of the diode does not matter. If you reverse the diode, you simply track the positive part of the envelope rather than the negative part. Either will give you the demodulated signal.
At the point just before the first amp, the radio waves have been filtered to a particular frequency by L1, C1 & C2. That first amplifier is not an op-amp, it is an RF gain amplifier. It amplifies the incoming signal by a number of dB. The signal before and after will be an AC signal, equally biased around ground.
The diode or detector gets rid of one half of the signal (either the positive half or the negative half, depending on which way the diode is). Description of AM Detector.
The next stage filters off the carrier signal with a low-pass filter.
As the next amp, an op-amp has a bipolar power supply so it can handle either the positive or negative signal. It amplifies the sound waveform for the speaker.
The signal into the diode is a (presumably) AM (amplitude modulated) signal. The variations in amplitude are what is of interest to the listener and are what the amplifier chain is seeking to recover.
As shown the diode rectifies negative going halves of the signal.
If reversed it would rectify positive going half cycles.
Either way, Cd provides a filter that smooths out (and so removes) the RF variations and results in a voltage that varies with the amplitude of the incoming signal. As shown you get negative variations which are smoothed. Reverse the diode and you would get positive going variations. The two are the same except inverted.
In either case the resultant "envelope" is AC coupled by Cb, and is DC ground referenced by Rb. So EITHER way "Amplifier" "sees" an AC signal centred around ground. This is amplified and, again, AC coupled vi C3 to the headphones.
So, either way the result is much the same to the end user.