If employer comes to know, they can terminate you, if you are adding value to the org then it's their loss.
If your actions indirectly or directly affect your employer, you will be terminated with instant effect without severance.
No legal implications at all whatsoever.
Workaround is to stay in stealth.
For all the clients, Make sure you make them sign agreement that explicitly mentions you are a consultant to them. Paperwork is a must for legal hygiene, if ignored then it can really screw you.
Never ever use office issued equipments (phone, laptop, cables, etc) for your extra curriculars.
Try to avoid client interactions in office timings.