-
Notifications
You must be signed in to change notification settings - Fork 266
Open
Description
Description
Repository structure must follow https://github.com/golang-standards/project-layout.
This will greatly improve the project readability and developer experience.
Also, getting the project into the proper structure will actually hlpe
Note: This is not just about putting files into certain directories. This should be meaningful, i.e.:
- unused packages must be dorpped
- some packages should be split into smaller domain-specific ones
- packages with unknown purpose must not exist (e.g. "common")
Details
Some live-recorded details from offline discussion. Should be split into sub-issues.
- Cleanup
accounts-management, perhaps rename toaccounts - api
- Remove "signing phrase" (make sure it does not exist as a feature anymore
- Remove
StatusBackedinterface - Rename
GethStatusBackend->StatusBackend - Goes to
pkg app_state-> change to non-app-related method/args (low power mode, low data mode)StatusBackendmoved topkg/backendcreate_account_and_login- either goes with backend or to users/app servicedefault_networks- should go tonetworkspackage (might touch settings)- Settings should be split into service-specific settings. A group of settings struct might make sense to exist
NodeConfigdiesmultiformat->pkg/multiformat
- Databases
appdatabase->internal/db/appdatabasewalletdatabase>->internal/db/walletdbshould split into "migrations" and "creating db file"multiaacounts->internal/db/multiaacounts- this needs to be cleaned up A LOT
sqlite->internal/db
cetralizedmetrics->services/cetralizedmetricscircuitbreaker->intermal, then probably AFUERA!cmdcmd/generate_handlers->protocol/internalcmd/librarykeep here, depends on how many c-bindings we have
common/dbsetup->internal/dbcommon/device.go-> mostly should not exist, rest goes tointernal/platforminternal/connection(orLowDataMode)constants- splitinternal/contractscrypto- AFUERA (butinternalfor now)deprecationshould most probably die (just in case check how timeline/profile chats were implemented)errors-> internal. Only use on API client-surfacing level.eth-nodeAFUERAhealthmanager->internalimages-> internalipfs-> internal- disabled in privacy mode
- use own IPFS node instead
- logutils -> internal
- messaging -> internal
- mobile ->
- separate into services
- maybe name the API
- some free functions might stay, or even be extracted in a separate library
node->pkg/backendparams/networkhelper->services/networks(where we instantiate RPCClient)cluster- remove waku settings from UI
- Most probably AFUERA. Split into services configurations. First make sure it's not sued externally by clients.
protocolmove tointernalrpc-> internallocalpairing-> serviceserver_media->services/mediaservices->pkgsignals-> internal- send signals not with global functions
- status backend convert from services pubsub to signals
static-> split into certain places- use
go:embedinstead ofbindata
- use
t-> internaltests-functionalandtest-unit-network->/testtransactions->internaland then afuera.
PrivateKey should always be provided withMessageSigner inrerface
Service settings / NodeConfig
- each service have its own settings, with persistence interface (most probably own table and migrations)
- service have get/set methods for each setting. These would change the runtime and persisted values
- during onboarding, user might define certain settings. Such should persist. So:
usersService—setSmthEnabled-->newsfeedService-->Persistence - if a setting have to be overridden in runtime, it should be passed with go
Optiontoservice.Start()
We didn't agree on the approach yet. 2 options considered:
<Service>Config+Set<Setting>type Settings interfacewithGet<Setting> <type>orGetSetting <-chan <type>
Metadata
Metadata
Assignees
Labels
No labels