I am both the sole developer for a relatively small company and someone who enjoys programming as a hobby. Recently, for one of my personal projects, I started making a framework for a RESTful API and NoSQL integration that I enjoyed programming at home. Near the same time, my work assigned me to begin a project for integrating the disjointed pieces of our backend into something more easily extensible -- using a RESTful API. As I have begun to code both of these projects, I have found that they are, understandably, shaping up in a similar way (similar class hierarchy, interfaces, etc.) However, I have been programming both of them separately, without copying code from one project to another, and only doing work on work time and personal projects in my personal time.
Now, since I have no agreement stating otherwise with my work, I know (or assume) that all code I write there is copyrighted under my workplace, and not under me. And, as I said, I have not taken any code from work and used it in other projects. Also, while some aspects of both projects are similar, others are quite different (the work one does not use NoSQL because too many processes depend on SQL, for example). The similarities seem unavoidable to me, since I am writing both and I have a specific idea of how HTTP requests should be handled, data should be returned, etc.
However, I still worry about the legal implications of all this. While the code itself has not been copied between projects, the solutions have similar points, and I was wondering if only the text of code is copyrightable, or the overall solution. Could these two projects that handle the same problem in similar ways be considered derivative of one another? I.e., could my home project be considered an infringement of work?
If that answer would be yes, the similar solution would be grounds for infringement, it would cause me additional worry, as I believe if I made a RESTful API 10 years from now, it would still look similar, as it is the way I would handle this kind of problem.
Also, I know this is not a site of legal experts and any advice I get is subjective, so I suppose I'm also looking for insight into what is the Right Thing™.