Getting started
Concepts
Mineral meets a need for scalability over time but also within a team of developers thanks to a modular and flexible software architecture. modular and flexible software architecture.
Our motivations
Don't reinvent the wheel, the framework facilitates the sharing and accessibility of your data across your entire of your application. Design modules that can be reused in several of your projects.
We want to make your life easier, Mineral provides you with dedicated classes for each of the following features of Discord: events, commands, context menus, etc...
In order to improve your development experience, we wanted to integrate some features that do not exist in Discord but are very interesting but very interesting features such as intra-application data sharing through the Stores, a bunch of additional events around your discord servers or access in only one and 2 lines of code to an API through official Dart packages delivering recurring features such as tickets recurring features such as tickets, invitations or voice chancels on demand.
Core sections
The mineral framework consists of 4 main sections represented in the following diagram.
Container
The Mineral framework container is based on an IOC (Inversion Of Control) design pattern allowing access to any section of your application or core at any time as long as the requested service is initialized.
Indeed, the container contains all the internal services of the Mineral framework, allowing at the same time their access from the outside, to preserve a unification of the core functions of your application.
In addition to these two qualities that the use of an IOC allows is that you can extend the core package of the Mineral framework according to your needs and uses so that the framework fits the greatest number.
Websocket
The websocket stream is an extremely important part of the Discord API, as it allows you to receive incoming events from the Discord servers on which your application is present.
The Mineral framework manages the connection to the stream via your application's token (specified in the environment file) as well as all connection errors that your application may encounter and thus automatically reconnects to Discord's websocket service.
The current Discord websocket version is 10
Api
The API is like a toolbox that is made available to you through Discord's websocket events, you can interact with the various features of the Discord HTTP API platform through the accessible methods.
The API documentation is available here.
Builders allow you to design Discord components such as buttons, modals, embeds or selection menus.
Utilities
Utilities are modifications or additions of functionality to native classes such as String to add, for example, more utility methods to format conversion.
You will find the console tool to format your messages or to use the reporter
tool to keep some logs.