Yes, you can do it. It's a real thing. You don't necessarily need a garden "patch" (those words together always sound like some sort of heinous joke to me) to grow food to feed yourself and your friends (human or furball), partner, or offspring.
Some general rules for growing all these delicious food planties
1. You will need a sunny windowsill. Food stuffs don't really tend to grow inside in the dark. Some do require more sun than others though so if you have less sun or just indirect light, peep the conditions before planting. Or invest in grow lights.
2. All these guys will like to be kept moist but not sopping wet. Ensure that your pot of choice has drainage holes in the bottom so nobody's roots get drowned out.
*HINT Terracotta pots dry out faster so if you're lazy and tend to forget to water things, go for another pot type. OR if you've got the cheddar, go for a self watering planter. Less guessing, fewer dead plants.
3. Purchase potting mix (also called soilless media) for your growing medium. Soil or dirt from the park across the street can carry icky diseases. Also, dirt/soil in pots can get compacted which makes it difficult for pretty much anything to grow.
Add some alfalfa pellets to your potting mix and you'll have a nice steady stream of nutrients to feed your little food champions.
1. Chilli Peppers
Chilli peps need lots of heat and sun. Like 8-12 hours preferably. Bonerific hot pepper plus points - you only really need one productive plant and you'll be swimming in spice.
Sow seeds 1 inch apart. They take a while to germinate so don't freak out. Like 2-3 weeks. But worth the wait.
Quick to germinate and mature - sow successively so you've always got some for spicy salads.
Toms like at least 8 hours of sunlight. Peep planting and harvesting instructions here.
Go for the Italian type for a beefy harvest. Also takes 2-3 weeks for germination. Save yourself the wait and buy a $4 plant.
Plant in its very own special pot or this brute will take over.
The more you harvest, the more they grow. Also, let a couple go to flower for beautifully sweet chive flowers.
Minimum 8 hours sunlight for a bumper crop. And lots of water.
Choose a dwarf variety so you don't need to pot up too often and end up with a gargantuan beast in the window.
If you don't have much direct light, these guys are your best bet. Leafy greens don't need a tonne of sun to produce. They'll grow a little slower, but won't halt altogether. Give kale, collards, arugula, mustards and lettuces a shot. Harvest the outer leaves first rather than giving a buzzcut with the scissors.
Lemons need a lot of sunshine. South facing window preferable. Buy a mature plant from a nursery and be sure to tell them your plan so they can help you pick the best one for your life.
Same as lemons above. I've heard Owari mandarins are the shit.
An easy way to add super greens packed with nutritional goodness to your diet. Microgreens are basically a gang load of sprouts grown in a tray of soil. Some need to be covered and others are okay in the open air. They will need a sunny windowsill but not too much baking heat. Check West Coast Seeds' guide for more info on growing your own.
Sprouts are ridiculously tasty and don't even need all the windowsill sunlight bullshit. Just soak a couple tablespoons in a jar for 2-6 hours, rinse em and then rinse again in the morning and at night (that's 2 times per day for you non mathy types). Then after about 5 days, eat them.
Once you're about half way done consuming that jar, start another one. So many goodies. SO FREAKIN EASY! Just maybe hard to remember to rinse sometimes. Set a timer if you're a spazz like me.
There ya go, balconyless, apartment dwellers. You don't have to buy all your produce. Give it a shot!
ALWAYS TRY! Even if you have limited sunshine. Just don't get all butthurt if you are harvesting a bunch of greens but don't get a gang load of tomatoes from your sunless sill. It's all about balance, man.