Skip to content

[ENHANCEMENT]: Refactor the whole frontend structure to be simplier #130

Description

@leofvo

Description

Contributing on frontend is actually a disaster.
We are duplicating a lot of things and adding more and more useless code that will be unmaintenable in few months.
As we are rethinking our application and try to focus on major things to get done, refactor the folder structure could improve our developement flow and efficiency.

Of course there is a price to do that, and it's actually to big to be one-shot.
With @MaloPolese we are proposing to get a more simplier approach and use the same folder structure as nextjs.

We aim to reach a folder structure like this one in src folder:

  • main.tsx
  • config shared constants for the whole app
    • constants
    • routes the routers and routes definitions
  • environments infrastructure environments stuff
  • i18n
  • styles scss properties
  • app polyflix application
    • pages
    • layouts
    • contexts
    • hooks
    • styles
  • studio studio stuff
    • pages
    • layouts
    • contexts
    • hooks
    • styles
  • shared shared stuff between 2
    • components
    • hooks
    • services
    • contexts
    • types

Of course a folder structure isn't sufficient to get things orderned, we should adopt a new way to create and place component.
In each folder you will find domains specific folder
for example in shared/components:

  • common shared components between all domains
  • videos components specific to video
  • courses
  • users

To adopt this new architecture we will need to move things progressively.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions