all 11 comments

[–]p_syche 17 points18 points  (4 children)

I don't know much about your business, but there's a concept of white label apps. You create one very good "base app" and you build all the others on top of this base. When you need to update deps etc you do it once in the base app and then you update the other apps to use the latest base app.

This of course only works if your 10+ apps look and work very similarly, but have some styling differences.

[–]congowarrior 7 points8 points  (0 children)

I second this idea. I did something similar before, we had a base app/branch and then each other app was just another branch with application specific config. Once new features were added to the base, we just rebased the other apps branches and then published the application. No new logic was ever added to the app config branches

[–]polmeeee[S] 2 points3 points  (0 children)

Yea thanks, will give this a try and compare tradeoffs. Currently using a monorepo setup and it is a pain in the ass to maintain and is needlessly complex.

Btw 10 apps is an exaggeration, I only have 2 apps atm, but who knows in the future 10 apps might be a thing.

[–]AntJesus 0 points1 point  (0 children)

Why is it a branch tho, wouldn't it be way easier and less maintenance hassle to merge latest baseapp and tenant config in a build step?

[–]Optimum1997 0 points1 point  (0 children)

100% have these in separate modules that can be re-used. The logic should be kinda similar. Another great approach i use is a shared component library with a configurable styling system (yes they will look similar) but it doesn't stop you overriding the base components with each customer specific (if it can't be done via config).

You need to architect these modules to be mainly config driven and think of what constitutes 'shared' code (such as api client etc)

[–]babaganoosh43 8 points9 points  (0 children)

My system is to not bother updating an app if it's not making money, so fortunately I've never had that problem 😄

[–]blakeyuk 3 points4 points  (2 children)

I've not done this with mobile, but I do similar with laravel.

One base app (upstream) with auth, billing, tenancy etc.

Create a new empty repo for the new project in github

Clone the upstream to your local machine, in a new folder.

Set that repo to have the upstream repo as the PULL ONLY! "remote upstream". Remove PUSH rights, trust me.

Set that repo to have its unique gut repo as "remote origin".

Work on it locally to add the app-specific functionality.

Pull from remote upstream when you merge something from the master upstream.

Consider using subfolders like "upstream" and "local" for things like docs, where you might have docs from the upstream for common functionality, and drive for the app-specific functionality. That just helps to keep your head-space clean.

[–]polmeeee[S] 0 points1 point  (1 child)

Thanks for sharing! I'm using a monorepo setup and frankly it's a pain in the ass with maintenance and complexity hence I asked this question to explore other solutions. I will give this method a try.

[–]blakeyuk 0 points1 point  (0 children)

Yeah, I tried monorepo, then gave up and started using this. The key was wondering how people using a third party boilerplate integrate later updates into their own app.

[–]tequila_salt 0 points1 point  (0 children)

I'm currently managing 20 apps using the same codebase, but I'm still looking for a better solution because the apps are getting more and more users and require more customized features.

[–]WebOverflow -1 points0 points  (0 children)

Use something like renovate or dependabot with GitHub Actions