Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 1.68 KB

ARCHITECTURE.md

File metadata and controls

32 lines (22 loc) · 1.68 KB

Project architecture

This document try to gather the inspirations that led to the project architecture.

As both clients (website and mobile) are part of an entire system, i found interresting to try to put in common the business part and see what that leads us.

Obviously, both clients won't use ALL the use-cases (that could lead to design problems), but i find that the application business is close enough to try to put everything in common.

Clean architecture

This project is organised around the principles of the clean architecture, presented by Rober B. Martin in his article.

This architecture offers to organize the code in distinct layers:

  • Frameworks and drivers: Web, Devices, UI, databases
  • Interfaces: All that is in relation between Frameworks and Business layers
  • Application Business Rules: Where the business logic is
  • Enterprise Business Rules: aka Entities

In the code

Trying to reproduce an architecture which is close to the one exposed above, in the code we have:

  • mobile/ folder (Framework level): Where Expo's framework code and UI code is
  • website/ folder (Framework level): Where React's framework code and UI code is
  • gateway/ folder (Interfaces level):
    • services/ folder: Where the transformation between API and applications is made
  • business/ folder:
    • actions folder: Use-cases
    • models folder: Entities
    • reducers folder

I am not sure yet what is the position of reducers in this architecture, since it is there to deal with side-effects and organize data. I am not sure that it belongs to the business part, but don't know exactly what to do with it.