Photocoupler PC817 circuit

My photocoupler (optocoupler) board design. I added four resistor places to combine them with different input and output voltages. Also added a diode for reverse voltage protection. Does the output side need it? Any other suggestions? Updated version Update version with a two-way communication.