Skip to content

File & folder structure of our appsΒ #120

@Mohammer5

Description

@Mohammer5

Right now, every app we have does things slightly differently, even when using the new app platform. I'd like to talk about whether we should aim for consistency in that regard as well and what we think works best for us.

I think what I like the best right now is having a very flat structure and use the duck approach on everything. I'll use the current state of the refactor of the sms-configuration app as an example:

image

I'm using views for the routes, these are more or less just controller-like components that just compose the different modules in the src directory into a working view as well as the view's meta data like route-path and label for sidebars, menus etc.

Everything else is a duck-module and contains components, functions and an index.js.

From time to time there's an issue with circular dependencies when using the index.js approach, which can be solved by importing directly what the files need and optionally split a file into multiple files when necessary (mostly happens when having two selectors.js importing each other)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions