note: needs to be updated as src/status
moved to its own repo at https://github.com/status-im/nim-status-lib/
stack
src/status/libstatus
)src/status
)src/app/<module>/core.nim
)src/app/<module>/view.nim
& ui/*.qml
)folder structure
src/
- where most of the source is
src/app
- Where the Application is
src/app/<module>
- module e.g 'chat', 'profile'
src/app/<module>/core.nim
- wrapper for this module
src/app/<module>/view.nim
- view, exposed data and some view specific logic
src/app/<module>/views/*
- views
src/signals
- signals (should be refactored & moved into src/status)
src/status
- business logic
src/status/libstatus
- integration with status-go
nim_status_client.nim
- the main file
ui/
- QML files
src/status
This folder contains the library that abstracts the status app business logic, it's how the app can interact with status-go as well as how they can obtain data, do actions etc..
src/status/libstatus
(exception for libraries ofc)app/
should be able to import from src/status
(but never src/status/libstatus
)src/status/libstatus
This folder abstracts the interactions with status-go
src/status
)status/
should be able to import / call files in src/status/libstatus
src/app
This folder contains the code related to each section of the app, generally it should be kept to a minimum amount of logic, it knows what to do, but not how to do it
src/app/<module>/
<module>
folder inside app/
should correspond to a section in the app (exception for the onboarding/
and login/
currently)<module>
should not import files from another <module>
src/status
) it should not be able to emit eventssrc/app/<module>/core.nim
This file is the controller of this module, the general structure of controller is typically predictable and always the same
init
methodthe constructor has typically the following structure
src/status/
and its own files within src/app/<module>
(i.e the views), a controller should not import files from anywhere else (including other files inside app/
)src/app/<module>/view.nim
This file contains the main QtObject for this <module>
and exposes methods to interact with the views for the controller and QML.
<module>
src/status/
to use their typesviews/
folder and initialized in this file.signals/
into src/status/
and instead handle as eventssrc/status/libstatus
in src/status
files, we will do dependency injection, this allow us to more easily do unit tests, as well as transition from status-go to nimstatussrc/status
should be reanamed to src/nim-status
src/status/libstatus
should be renamed to src/nim-status/status-go