Make your entrance 3-tiles wide, with walls on both sides. Put three rows of three stone-fall traps outdoors, between these walls. Outdoors, because you want to set options to Only Soldiers Go Outside during attacks, and if the traps are indoors the Dwarves will rush out into danger in order to gather the loot.
= walls
+ floor/ground
^ stone-fall trap
R ramp down
=====
=RRR=
=+++=
=^^^=
=^^^=
=^^^=
=+++=
=+++=
Beneath the ground, make a right-angle turn in the 3-wide corridor before it arrives at the 5x5 space for the trade depot. This keep archers from shooting at caravans without having passed over the traps.
Later on, replace the stone-fall traps with weapon traps, or have both. You can put one large iron dagger in a weapon trap and it does a pretty good job. These can be collected from goblins who die from the stone-fall traps.
Eventually you want to extend the wall behind the ramp so it includes a section of aboveground gardening area that can be reached only from a set of stairs within the walls. Build another set of stairs up to the level of the wall and put a floor behind the ramp at wall level. Enclose that in fortifications and station your archers up there. Set stations for them and keep them there all during caravan visits.
Hunters and rangers can be recruited as soon as they immigrate. They come with their own crossbows and metal bolts. Alternatively you can make crossbows out of wood and draft peasants. Bone bolts can be made from both goblins and turtles.
Some people will say that this makes it too easy, but I find it better to learn with the easy way and then challenge myself. Also, goblin seiges don't wait for you to be ready, so it is possible to lose troops and even civilians using this setup. You have to call everyone home and ambushes can still take out critical personnel.
Detecting thieves is done by tying dogs on either side of the corridor, but around the bend so that, once again, they cannot be shot from outside. I actually usually put mine behind the trade depot, counting the exit ramp as "in front". That way any visiting caravans take the brunt of an attack before my tied-up dogs have to fight. All of your dogs should be trained as war dogs.
Some megabeasts can destroy doors and don't get stopped by the traps. If you are lucky, your archers will see them and kill them. If your archers alll decide to go have a drink at the same time, you'll have a hydra in the fortress. That is when you will decide to graduate to more elaborate defenses, but the above will do for a start.