The basics of an optimized melee build depend on what books are in play and what type of character you are; I'm answering for "all of them, adept"
There are 3 optimal ways to melee as an adept:
1) Dual-wield electrical clubs / other clubs as backup. Pro: cheapest (thus easiest to be OK at things besides thwacka), great against heavily armored living enemies. Con: worst concealable options, might be not so hot against vehicles depending on rule interpretations.
2) Dual-wield swords / other blades as backup. Pro: balanced between expense, good against everything, no fishy rules, good concealable options. Cons: none, really, just not having the advantages of other options.
3) Unarmed. Pro: Highest damage, can't have your weapons taken away. Cons: costs the most resources, you lose defense maybe depending on how your GM thinks the rules work, worst attack rolls (depening on how your GM thinks the rules work).
The way to roll as (1) is to dump Strength as low as you care to and dual-wield stun batons.
You can be a troll (or fomori), elf (or wakyambi), ork (or ogre), or maybe if you are willing to be very focused a 6 edge human, and not be sad about your metatype. Of these, Fomori is probably the overall most straightforwardly good if you don't mind being a metavariant, because you get Arcane Arrester, good Body, and Reach, otherwise I would probably go with ork because it's cheap and balanced.
The key things are:
Martial Arts: +1 Clubs DV, some other martial arts style (you need the manuevers; OK options include the Arnis de Mano damaging disarm, +1 Gymnastics Dodge, +1 Parry, +1 Infiltration), Two Weapon Style, Iaijutsu, Offhand Training, and maybe Vicious Blow. As written, Vicious Blow lets you convert S damage attacks to P damage, including electrical clubs. This lets you beat tanks to death which is hilarious. If your GM vetoes this, Vicious Blow is useless and you can take either Full Offense (good against people who won't or can't melee back like casty magicians and pure gun bunnies) or Watchful Guard.
Way of the Warrior.
Stats you care about a lot are Body, Agility, Reaction, Intuition, Magic 5 (dropped to 4, maybe 3 by 'ware), maybe Edge depending.
Ware can vary a bit and a lot of it is debatable; the major good things include Raptor Cyberlegs (lower legs, with armor, and you have room for comedy ware if you want too), Muscle Toner, Reflex Recorder (Clubs), Attention Coprocessor, Genetic Optimization (Agility, Reaction, or Intuition), Synthacardium, and Reakt. A good simple loadout to start with on a Fomori would be Muscle Toner 2, Genetic Optimization (Agility), Reflex Recorder (Clubs), and Synthacardium 3.
Core skills are Clubs (duh), Perception, and Athletics (strictly speaking, the key ones are Running (for getting into melee) and Gymnastics (for dodging), but it's really a waste not paying 8 bp to get Climbing and Swimming too).
I'm assuming your GM will not allow cheeseball Gaesa that never get violated. If they do allow them Gaesa everything all the time. A good power setup with 4 PP, assuming you do have Reflex Recorder (clubs) would be:
Improved Reflexes 2 (1.875 PP, discounted from Way)
Improved Ability (Clubs) 2 (.75 PP, discounted from Way)
Counterstrike 1 (.5 PP)
The last .75 are flexible if you want comedy powers like Keratin Control, but Enhanced Perception and/or Combat Sense are always safe and useful options.
What makes it work is pretty simple: you save points by not needing high Strength, and you hit hard because you're using fixed-damage electrical weapons. Two-weapon style means you can beat up most people who are willing to honorably melee you back, which is actually pretty useful because lots of critters are melee monsters with relatively low attack pools but huge damage, and plenty of people in the grimdark future have inexplicable katana fetishes. The main drawback is that if your GM vetoes Vicious Blow working as written, you aren't that great against big vehicles that can make the Don't Taze Me Bro check reliably, and that there aren't any good concealable electrical weapons so you have to use bad ones.
A stun baton should be your primary weapon. Carry whatever you want at chargen for a concealable weapon (collapsible staff, maybe) and upgrade to a pair of Victorinox SmartStaves as soon as you can find them; they are from WAR! and are your best bet for both concealability (-1 in a pencil box sized form) and dealing with vehicles (pick form is a one-handed weapon with S/2+2/-2). Do note that your offhand weapon doesn't matter much; you can use whatever you want. Even if your GM doesn't nerf Vicious Blow, it's still good because of the concealability, but you no longer use it on vehicles.
You may or may not want to start with a weapon focus. The reason is that they aren't that expensive, so you might want to wait on a rating 6 stun baton weapon focus. Options include Restricted Gear for a r4 Victorinox SmartStaff weapon focus (which you use early on, and then eventually becomes your backup concealable/anti-vehicle weapon option) and buy a r6 Stun Baton later, Restricted Gear for a r4 Stun Baton weapon focus and buy a r1 Victorinox Smartstaff soon, start with a r1 or r2 Stun Baton weapon focus and just eventually chuck it for a better one and a r1 Victorinox Smartstaff, start with no foci and buy a r1 Victorinox SmartStaff quickly and a r6 Stun Baton later, etc. Long-tem you do want at least a r1 Victorinox SmartStaff so you have a concealable weapon that bypasses ITNW.
To work as (2), you remain mostly but not entirely the same. The differences are:
You care about strength so you really want to be a troll or fomori, and you don't dump strength.
+2 blades DV instead of +1 Clubs DV and whatever, no Vicious Blow (I recommend either of the alternatives listed under (1))
Because you do care about strength you probably want Muscle Toner and Muscle Augmentation. In the long run it is worth losing 2 essence because of this; you may not want to start out with 2 essence loss. A good option is to start with just Muscle Toner, Muscle Augmentation, and Genetic Optimization (Agility*), and upgrade one or the other to Rating 4, then pay 20 karma to bump your magic back up to 4. Other than that, the 'ware you want is the same as (1).
*this is a good idea as a troll because it lets you start with 5 Agility, and then you eventually get Muscle Toner 4 to have 9.
You want the same powers as above.
Gear is actually different because there's a few good options for blades:
Vibroblade Sword (you probably want a cane-sword so you can conceal it; see Attitude): best damage and AP, but F and needs batteries.
Victorinox Smartstaff (concealable, R, turns into a pretty good sword, availability 18R though so you need Restricted Gear to start with it)
Ceramic Knife (goes through MAD scanners, concealable, oddly enough they are totally legal, weak damage)
Vibroblade Knife is, long-term, just worse than Victorinox SmartStaff (less concealable, needs batteries, worse damage than the sword form) but it is available to start with.
Also, because Weapon Focus bypasses ITNW, there's something to be said for a r1 weapon focus of a concealable weapon type so that you have a concealable spirit-ganking weapon.
As above you may or may not want to start with a weapon focus, depending on where you want to go long-term. I don't recommend a Vibroblade Knife focus but any of the other three weapons are sensible. I would probably roll with a r6 Vibroblade Sword weapon focus in a sword-cane and a r1 weapon focus Ceramic Knife, plus some spare ceramic knives for offhanding (starting with the ceramic knife and a non-weapon-focus vibroblade sword, buying the others later), but there's various sensible setups.
(3) is more different from the others, first because you get to start by asking your GM how the rules work and second because instead of Weapon Foci (probably), you want Critical Strike.
They key questions are:
a) Can I use Two-Weapon Style with Unarmed
b) If yes, do I need to wear an offhand fist weapon (Hardliner Gloves or Shock Glove) to do it
c) Can I stack Hardliner Gloves with Critical Strike.
d) Can I have Weapon Focus Bone Lacing
RAW the answers are yes, yes, no, debatable*. Changing a) to no doesn't change how you want to build (aside from dropping the manuever you can't use, but makes you less good. Changing (b) just affects silliness. Changing (c) means you do in fact want a hardliner glove weapon focus and are noticably better. If (d) is yes, you want Bone Lacing weapon focus and you don't want a Hardliner Glove weapon focus even if it works (if your GM lets Hardliner Gloves, Bone Lacing, and Critical strike all stack, you do want non-weapon focus Hardliner Gloves).
*It can totally be a focus. It's iffy if it is a "weapon" or if it just alters your unarmed damage. YGMMV.
The changes from (2) are:
+3 Unarmed DV instead of +2 Blades DV
Manuevers: TWS (if allowed). You can take up to 6, but there are only so many manuevers that don't suck; Blind-fighting, Full Offense, Riposte, Finishing Blow, and Watchful Guard are all reasonably worth 2 bp for this type of character, although they aren't vital. If your GM isn't nerfing Vicious Blow (see discussion under 1), you may want that and a Shock Glove so you can punch tanks to death as a backup.
The 'ware you want changes in a key way: you probably want Bone Lacing, because it gives you a stacking boost to unarmed damage. There's various options for what to start with and what/when to upgrade to, but aside from probably wanting Bone Lacing you want similar gear to (2) and want to either at chargen or before buying magic up, have 2 magic loss.
The case against Bone Lacing is that it is F and cyberware so cyberware scanners will find it and QQ. The case for bone lacing is that a lot of GMs don't use them because they shaft street samurai so hard, and/or that your group has to be able to deal with them anyways because of the shafting street samurai. YMMV. If they come up a lot in your game and are a big deal, you may want to forgo the bone lacing and have the advantage that (unlike street sams or adepts 1 and 2 above) you are fine with them. If you don't take Bone Lacing you will instead eventually want Bone Density Augmentation. There's a lot of permutations of starting and longer-term 'ware setup so I won't go through all of them, but the basics of what you want longish-term are:
Genetic Optimization (Agility)
Some type of Bone Lacing (Aluminum, Kevlar, or Titanium, you may want to start with Plastic) or Bone Density Augmentation 4
Muscle Toner 4
Muscle Augmentation 2 or 4 (depending on space)
Reflex Recorder (Unarmed)
You may want to fill space with other Reflex Recorders and/or an Attention Coprocessor and/or Synthacardium. You can fit various permutations of the above into 2 essence with some Alphawareing. As for what you start with, depends on how long-term you want to think. A good compromise option would be Muscle Toner 2, Reflex Recorder, Genetic Optimization, Plastic Bone Lacing (.95 essence) and upgrade before raising magic.
If your GM lets Bone Lacing or Bone Density Augmentation be a weapon focus, you want that; you might want to start with r1 and save your penny jar up for r6.
If your GM doesn't, but allow Hardliner Gloves and Critical Strike to stack, you want that instead.
If your GM allows both, you want to have your 'ware be the focus and just wear Personalized Grip Hardliner Gloves.
You need an offhand Hardliner Glove or Shock Glove to use TWS, but nothing else about it matters.
Powers:
If you have 4 magic, you would want some combination of:
Killing Hands
Critical Strike
Improved Reflexes
Counterstrike 1
Improved Ability (Unarmed)
Distance Strike (it looks like overpriced crap, but bypassing melee defense is really good).
I would probably take, assuming the rules work like I interpret them:
Distance Strike (Discounted, 1.5 PP)
Improved Reflexes 1 (Discounted, 1.125 PP)
Critical Strike 3
Counterstrike 1
This makes you good against mooks (because of TWS) and good against other skilled melee combatants (because you use Distance Strike to bypass their higher melee defenses). You might decide to drop Counterstrike and/or 2 levels of Critical Strike for Improved Ability (Unarmed). You could also cut all the Critical Strike, or Counterstrike and 1 critical strike, and get Improved Reflexes 2, but IMO it is not worth it.