hi. sounds pretty simple, and you will make it even easier on yourself if you utilize microcontrollers (MCU).
first the easiest part: IR transmitter (aka plain simple IR LED). The current will need to be limited because once it opens up, it really opens up and happy let as much current through it as it can - this will destroy the LED.
So add a resistor in series. Doesn't matter if you place it near the Anode (+) or Cathode (-), if the current wants to go through the LED, it will have to go through the resistor too.
In essence you use the resistor to burn off some voltage, thereby effectively reducing the voltage immediately across the LED. Find more about this online.
For the receiver, you will get an IR phototransistor. It will let current pass if light shines on it.
The MCU can be used in such a way that it turns the IR transmitter on and off very fast. It could be a square wave but later in your design you can encode it in some way.
You can probably drive more current through the LED if it is only on momentarily.
The receiver will pick out the square wave. During the off-period, it can measure the background light level.
The square wave will kind of give the receiver an idea what to look for, you will probably get better sensitivity.
Depending on how strict you want to enforce this pattern or code, it may be very difficult for an intruder to spoof your system.