if i just have a fan will that be enough?
Highly unlikely. You need to realise and understand that growing inside is replicating nature and that means giving the plant enough light, water, oxygen, co2, moisture and nutrients to support and sustain growth. If you have a plant inside a cupboard with a fan simply re-circulating stale, co2 spent air for the majority of it's life how do you think it will get on? How would you like it if someone put you in a small room with a fan and only opened the door twice a day to let fresh air in?
Plants require and need proper ventilation and that means changing the air and co2 around the plant leaves about once every 2 or 3 minutes so new c02 rich air can be utilised by the plants growing mechanisms.
Proper ventilation is only one half of the equation, you also need to be aware of and deal with odour problems, particularly in flowering when the plants can fill the whole house with weed smell unless they're correctly ventilated and exhaust air filtered with a charcoal filter or some other means of odour control used.
You don't necessarily need to invest in expensive and sophisticated ventilation systems, it does depend on the size of your growspace and how many air exchanges you use. A simple formula for working this out is to calculate the cubic meterage of your growspace and multiply this by the number of air exchanges per hour. For example a 1.5m H x 1m W x 0.75m D growspace would have a cubic meterage of 1.12cm, to convert into cubic feet you'd multiply by 35, so 39.2 cubic feet. To exchange the air in this space every 2 mins you'd multiply 39.2 by 60/2, 39.2 x 30 = 117.6. So you'd need to look for a ventilation fan that would flow 117.6 cubic feet per minute. 117.6 cfm isn't a particularly high flow rate and a standard bathroom ventilator/extractor would do a reasonable job, but it does have to be ported out of the growspace and ventilation holes provided for fresh air to be drawn in.