I have a project A, that does something very similar to project B. for example imagine project A does ticket listing for cinema, and now I want to branch off of it and create a separate project with some different features for comedy show listing.
What is the best (or an even remotely good) way to separate these projects, while also maintaining dry (don’t repeat yourself)?
I want to have 2 separate projects, but share the fixes and certain changes between them.
In the past I have tried making a “core” package and share it between my projects. But this complicates routing and debugging way too much and sometimes you end up moving features between projects anyway because they don’t feel like they should be in core they just happen to be required in both projects.
I’m thinking of making a branch for each project, and constantly rebase them on one another so I can cherry pick every change and keep some while losing project specific features but that also comes with a very long list of conflicts to fix everytime I rebase.
I have reached a similar situation multiple times in different projects and I want to know what is the right way to do this with a project in general, and specifically a react project?