In the Notes example, the whole kitchen sink is ro...
# sst
g
In the Notes example, the whole kitchen sink is rolled into a single project. Is there any wisdom to breaking it into 2 separate projects. One for the API and Data and another for the front end React app? I can see where I might ultimately have multiple front end apps all talking to the same API. Also, I have development teams that are very focused on backend and database and others that are all about the front end. Separation of concerns seems wise to me. Thoughts?
t
This is roughly what I follow and I think scales for a while
It's a single repo but very clear boundaries inside it
g
Hmm. You've clearly put a lot of thought into this. Doesn't fit with my narrative/thought process above, and that's ok. You make very good points in here. Now I'm torn. For example, our initial very small project will fit this nicely. That is, until we move to step 2 where we build an iPhone app. Clearly, that's a different animal. But, it will need to talk to the API. Or, at the very least, it will need to talk to an API that points to the common database (Dynamo, MySQL, etc)
my Notes project is working now. 😉. Thank you for helping
t
Cool! And yeah there's a lot of ways to go with this. I can see why monorepos are trickier with native apps. I'd probably still try to do it personally though and separate once clear painpoints show up
d
I think the more important thing is to split Stacks as opposed to projects. I would definitely set everything up across Stacks so they could be easily moved to another project however (like say, using SSM and
.fromArn
instead of handing in props). This means you can always change your mind, and decreases coupling for almost no cost. I would say the single vs multi project argument is the same as Monolith vs Microservices, its about scale.
(this mostly agrees with what @thdxr posted, just emphasizing one line:)
That said, we've structured the repo in a way where components can be extracted into their own repositories once the boundaries become more clear and your team is ready.