Skip to content

Directory structure #57

@eliasmalik

Description

@eliasmalik

I think the current structure is problematic for a few reasons:

  • Project configuration files are split over three directories instead of all living in the project root
  • Two package.json files suggests two different projects with two different sets of dependencies, but this is one project. It will be deployed as a whole.
  • Packages are duplicated between the two different node_modules; no reason for not sharing common modules. (cd into the root and run diff frontend/node_modules backend/node_modules | grep identical or diff frontend/node_modules backend/node_modules | grep Common to see the list of duplicate files — there’s quite a few.
  • After pulling you have to run npm i twice in different directories
  • Scripting is made awkward by having to litter cd ../*end or similar throughout (c.f. pre-commit hook or post install script, or to run all tests, I have to do cd frontend && npm test && cd ../backend && npm test)

At the very least, I think we should extract the config files, package.json(s) and test directories to the root level. You can still run tests for backend and front-end separately by using command-line arguments in the runner.js (see process.argv).

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions