Earlier quoted context omitted.
Always always always talk to a lawyer. If your dog walker (at the peak of their career) friend was like “I need a website” you wouldn’t be like “learn JavaScript” you would say find a programmer. If I had 10 dollars for every time I had to spend weeks convincing an engineer friend to talk to an attorney and then when they finally did it got dealt with in 30 minutes... Lawyers are just “full stack law architects” do y…
I find kneejerk advice to consult lawyers for anything that concerns the law frustrating for two reasons: 1. It never seems to be accompanied with advice on how to find the appropriate kind of lawyer. 2. It almost always seems to ignore the fact that lawyers are expensive. Sure, there are times when that cost is warranted, but I don't think it is right to ignore it. For example, in this case, it is probably only wort…
https://www.lawson-weitzen.com/attorney/bauer
He gave me terrific advice on a similar issue many years back, and I've gone to him a few times since. I've never retained him: our conversations were always about knowing how to interpret employment contracts, understanding options, and coming up with a negotiation strategy. After those consults, I could go it myself.
A good lawyer won't drag you into litigation. Good lawyers are rare, but the goal should always be to appear professional and to preserve relationships. If you have the rights to your code, you should be able to maintain them without burning relationships with your job. If you don't, you should hand the rights over without a fight (or negotiate for rights, but understanding you'll need to compromise something in return). In either case, you'd like to keep working there, you'd like good references later, and you'd like your employer to stay in your network.
You can't do that unless you understand your legal rights, and unless you have an idea of what tactics you should take.
A good lawyer will run you $300-$600 for a conversation (1-2 hours). A bad lawyer will escalate to a conflict, and run you tens or hundreds of thousands of dollars.
Keep in mind law varies by jurisdiction. I don't know where OP is, so this recommendation may be moot. I've worked with many lawyers. I have no conflict-of-interest (my relationship with Bauer is limited to a small number of ~1-hour consults).