I just finished the game on a non-stealth melee build. 10 STR / 10 END crazy barbarian mode...
First off I will say that melee is incredibly gimped compared to guns. You can do a lot of damage, but so can guns, especially if you are a decent shot (headshots). The other thing, is that yo will constantly get hit a lot, taking lots of damage and rads. You don't do much more damage than ranged weapons, so it is hard to justify the constant beatings you take and stimpack/food chugging.
The biggest issue with melee is that your attack animation gets reset if you are hit during an attack. This can be incredibly frustrating as NPC's will very often gun bash you and reset your attack. There is no way around this, no way to stagger or bash like in skyrim.
The other hugely annoying thing is that, against other enemies in melee, they can block you extremely easily and chain-blocking you can quickly become extremely annoying where it becomes a waiting game of trying to get an attack in where they don't block, or just using VATS to bypass it.
For this reason, the melee damage perk that causes a chance to disarm enemies is actually incredibly annoying and counter-intuitive design, because once they lose their gun they go into fist mode and start blocking your attacks... makes them harder to kill... ridiculous.
I played through on Hard difficulty and it was entirely viable, but kinda frustrating. Perks that help include Endurance +Damage Resist, LifeGivier, Cannibal (eating corpses for health.. you will always need health). Rooted is somewhat useful for the damage resist but you won't find yourself standing still very much as you need to be constantly moving so that your attacks don't get blocked/reset.
So yea, you can do it with pretty much nothing but melee. You will want a rifle to shoot some wall turrets/etc... but otherwise it is totally possible, just really fucking annoying at times since the melee system is pretty annoying.