-
-
Notifications
You must be signed in to change notification settings - Fork 4
How to add new feature modules
LeNDuyA edited this page Dec 2, 2025
·
10 revisions
---
title: Client-feature architecture
---
graph TB
discordBot[Discord Bot]
subgraph "Wrapper interface"
registeredFeature[RegisteredFeature<br/>+ commands<br/>+ featureInfo]
end
subgraph "Features"
glossaryInfil[feat/GlossaryInfil]
wikiWavu[feat/WikiWavu]
yourService[feat/YourService]
end
subgraph "Sources"
apiGlossary[Glossary API]
apiWavu[Wavu API]
apiYour[Your API]
end
discordBot <-->|n:n| registeredFeature
glossaryInfil -.->|implements| registeredFeature
wikiWavu -.->|implements| registeredFeature
yourService -.->|implements| registeredFeature
glossaryInfil -->|pulls data| apiGlossary
wikiWavu -->|pulls data| apiWavu
yourService -->|pulls data| apiYour
style discordBot fill:#3B82F6,stroke:#2563EB,color:#fff
style registeredFeature fill:#F59E0B,stroke:#D97706,color:#fff
style glossaryInfil fill:#10B981,stroke:#059669,color:#fff
style wikiWavu fill:#10B981,stroke:#059669,color:#fff
style yourService fill:#6B7280,stroke:#4B5563,color:#fff,stroke-dasharray: 5 5
style apiGlossary fill:#8B5CF6,stroke:#7C3AED,color:#fff
style apiWavu fill:#8B5CF6,stroke:#7C3AED,color:#fff
style apiYour fill:#6B7280,stroke:#4B5563,color:#fff,stroke-dasharray: 5 5
-
Game- add the game if relevant
- create
feature/yourNewFeature - create the new module and its corresponding functionalities
- in
build.gradle.ktsI recommend adding thecoremodule dependency -implementation(project(":core")) - create a
Koinmodule and add your classes
- connect your feature module
- to the bot's gradle via
build.gradle.kts - to the bot's Koin module via
dcBotModule.kt- if your feature uses any DI databases, you will need to add and use qualifiers
- to the bot's gradle via
-
/featureRegistry- add your command via
CommandRegistry.kt - create
/yourNewFeature/directory - create needed usecases
- register your usecases via
featureRegistryModule.kt - create
YourNewFeatureDiscordFeatureand implementDiscordRegisteredFeatureinterface
- add your command via
-
/res/config.json- register your feature
- your name must match
FeatureInfo.name
- your name must match
- register your feature
- connect your feature module
- to the app's gradle via
build.gradle.kts - to the app's Koin module via
Module.kt- if your feature uses any DI databases, you will need to add and use qualifiers
- to the app's gradle via
-
/featureRegistry/- create
/yourNewFeature/ - create needed usecases
-
/ui/- create
ViewState,ViewModelandViewfor the Home screen- for the
View, you can useFeatureInfoHeaderandCharacterOverviewcomposable components
- for the
- create
- create
YourNewFeatureComposeRegisteredFeatureand implementComposeRegisteredFeatureinterface- if you want to navigate to
Destination.MoveList, you must provide the qualifier you added in Apps-1.2.
- if you want to navigate to
- create
-
composeResources- register your feature
- your name must match
FeatureInfo.name
- your name must match
- register your feature