Philosophy

Philosophy

Vision and efforts

We want to focus our efforts on the following areas:

  • Developer Experience
  • Performance, security and low power consumption thanks to the Dart language
  • Robustness, modularity and flexibility
  • Complete and intuitive documentation
  • Rich ecosystem

Our motivations

In the various programming languages, there are a multitude of alternatives offering an API for interaction with Discord. with Discord, the best known being discord.js, eris.js or even discord.py and jda.

Within the Dart language, there is only one alternative called Nyxx which, like discord.js, provides a complete API for developing great Discord bots in a relatively functional form.

Librairie vs Framework

  • Library: A set of functions or classes that can be used to carry out specific operations. It provides a set of predefined functions that you can use in your code, so you don't have to write them yourself. writing the functionality yourself.

  • Framework: A set of structured software components and libraries that provide a basis on which you can develop your own application. develop your own application. It defines the structure of your application and provides predefined predefined functionality that you can use. Unlike a library, a framework can dictate your application's flow of control flow of your application, i.e. it can define the overall architecture of your project.

If it were simply a question of providing what the wonderful Nyxx library has to offer, the mineral project would have been pointless.

In fact, we want to professionalise the development of Discord bots within the Dart language by providing a ecosystem for developers.

Drawing on our experience, we want to offer a robust alternative to the traditional event handler that we found on almost every Discord bot project.

One problem, one solution

When designing a Discord bot, it is common to encounter various problems related to the architecture of your project. It is often difficult to structure your code in such a way that it is readable, maintainable and scalable. scalable.

Modularity

When all your code is concentrated in a single file, it quickly becomes difficult to find your way around.

Although we don't impose any particular software architecture, we do recommend a functional neighbourhood approach which can be achieved by following the principles of hexagonal architecture.pnpm dev

├─ bin
│ └─ main.dart
├─ lib
│ └─ modules
│ ├─ tickets
│ │ ├─ ...
│ │ └─ ticket_provider.dart
│ │
│ └─ giveaways
│ ├─ ...
│ └─ giveaway_provider.dart
├─ pubspec.yaml
└─ .env

See the documentation for more information about recommended structures.