ArangoDB-Community / ArangoBnB

16 stars 3 forks source link

Project Structure #19

Closed lostpebble closed 3 years ago

lostpebble commented 3 years ago

Just thought I'd open discussion about the structure of the actual project and what could work best.


What would you think about creating the project as a monorepo, using npm workspaces? This way we can maintain and develop each section in isolation without crossover- since technically, they all run in isolation in any case.

Could have a project structure like so, using a "root" package.json to define the workspaces:

/package.json
/workspaces/frontend-vue
/workspaces/frontend-react
/workspaces/backend-nodejs

/workspaces/common     (optionally, if there are shared enums and metadata etc.)

Inside each of these folders they maintain their own dependencies and package.json etc. This would allow us to all work on the master branch as well.

It will still be very easy to get started for newcomers, as we can still create npm scripts in the root package.json to allow people to quickly startup the backend- and their choice of either Vue or React- the default can still be Vue for the general npm run serve, or it could even run both frontends at different ports.

cw00dw0rd commented 3 years ago

The npm workspaces seem pretty interesting and doesn't seem to complicate things. I would vote that we have npm run serve only do Vue by default, to avoid any confusion. Could you do PR for how you would structure it?

lostpebble commented 3 years ago

Cool, created the PR.

When you take a look, after running npm install in the root, try running npm run serve and npm run serve-react, and you'll see they can both execute from within their respective workspaces.

lostpebble commented 3 years ago

Oh shucks, looks like I didn't add all the new files in the PR. Will rectify quick.

EDIT: all done.