💡 Sept. Tip => even use cases can be sensitive
Like humans, some use cases are safe but others require careful attention.
During this month of September 2025, we'll highlight various and interesting aspects of libmodulor
.
What do these different use cases have in common ?
- Delete article
- Send money
- Revoke user
Exactly ! They are kind of dangerous. In other terms, unlike "Like a post", "Write a comment", their execution can have irreversible effects.
In libmodulor
this notion is represented using the sensitive
property of UCMetadata
.
export const Manifest = {
languageCodes: ['en', 'fr'],
name: 'Auth',
ucReg: {
DeleteAccount: {
action: 'Delete',
icon: 'trash',
name: 'DeleteAccount',
sensitive: true,
}
SignIn: {
action: 'Create',
icon: 'right-to-bracket',
name: 'SignIn',
},
},
} satisfies AppManifest;
The sensitivity of a use case is orchestrated in each target.
For instance, in GUI targets (web, mobile), we show a confirm modal. If the user confirms, the use case is executed, otherwise, it is cancelled.
+----------------------------------------------------+
| Delete account |
+----------------------------------------------------+
| Are you sure you want to delete your account ? |
+----------------------------------------------------+
| [ YES ] [ CANCEL ] |
+----------------------------------------------------+
It can also be used to color the button differently, like GitHub does with the "Delete Repository" button.
In CLI targets, it is represented with the usual prompt :
Are you sure you want to delete your account? (Y/n):
That being said, how to define the message used for confirmation ?
We will explore I18n
in a future article.
Voilà c'est tout.