#monorepo architecture

4 messages · Page 1 of 1 (latest)

modest rain
#

it's my first time working with monorepos, so i'm a bit unsure about how to structure it. i have 3 sites that are pretty much the same, except for some different content/images etc., so i thought a monorepo makes sense for them.

i'd create a folder for each site with their unique stuff and then have shared components, configs etc. in another seperate folder.

would i install astro in the main package or in the site workspace? what are some basic things i have to consider for a structure like that?

i pretty much want to share my tailwindconfig and astro config across all the sites, but it seems like i need to set it up for each project individually (or maybe i could just symlink it from the shared folder i guess?)

any tips/pointers are highly appreciated. never worked with monorepos, so i'll have to wrap my head around it a bit 🙂

copper oreBOT
#
No-one around right now?

It looks like no-one has responded to your question yet. People might not be available right now or don’t know how to answer your question. Want an answer while you wait? Try asking our experimental bot in #1095492539085230272.

pure citrus
#

@modest rain I migrated my company's FE and BE to Nx recently and really, really enjoyed it. Their documentation is super helpful, and there's a third party maintained generator for Astro if that brings down learning curve. Personally wouldn't use a generator, but requires more manual config which might be more difficult

https://www.npmjs.com/package/@nxtensions/astro

#

Nx does have much more learning curve than something like pnpm or yarn workspaces, but it's worth it imo. Great caching and the command line is very intuitive. In Nx, all packages are installed at root

In your situation even if you went with something like pnpm workspaces, packages should still all be installed at root