Skip to content

boul2gom/nullptr-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

86 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ› οΈ A complete, modular and flexible toolset for all your Java β˜• projects

Nullptr-tools is a collection of tools for Java projects. Its includes a lot of modules, to make it easier for you to include and interact with many commonly used libraries and frameworks.
All modules are separated from the whole project and are standalone, to keep your app lightweight. They have only a common base package included.

⚠️ The project is still in development, so many modules are planed but not released yet. See "Planned modules and features" below.


Master CI Release License Pages Develop CI

Discussions Issues Pull requests Stars Forks

Deepsource Active Codefactor Deepsource Resolved

πŸ“‚ Available modules

  • πŸ’Ό Tools: The main module, a basic common tools base used by all other modules.
  • πŸ“¦ Redis: A module to interact with Redis, including a connection manager and a Pub/Sub listener system.
  • 🐳 Docker: A module to interact with the Docker client, with wrappers and callbacks for all commands, and a Dockerfile generator. You can easily interact with containers, images, networks, Swarm and volumes.

πŸ“₯ How to get it

⚠️ The project is still in development, so publishing to MavenCentral will be done later. Creating a modular project require to open a new ticket for every module, so it's very long.
πŸ“¦ All artifacts are available on Maven Central, and in GitHub Packages as fallback.

  • If you are using Gradle, you can get it by adding the following code in your build.gradle:
repositories {
    // Maven Central
    mavenCentral()
    
    // My Github Packages, as fallback if there is any problem with Maven Central
    maven {
        url = "https://maven.pkg.github.com/nullptr-rs/nullptr-tools"
        credentials {
            username System.getenv("Your GitHub username")
            password System.getenv("Your GitHub password or personal access token")
        }
    }
}

dependencies {
    implementation "io.github.nullptr:Module ID:Latest version"
}
  • If you are using Maven, you can get it by adding the following code in your pom.xml:
<project>
    <repositories>
        <!-- My GitHub Packages, as fallback if there is any problem with my Maven Central -->
        <repository>
            <id>github</id>
            <name>GitHub nullptr-rs Apache Maven Packages</name>
            <url>https://maven.pkg.github.com/nullptr-rs/nullptr-tools</url>
            <credentials>
                <username>Your GitHub username</username>
                <password>Your GitHub password or personal access token</password>
            </credentials>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>io.github.nullptr</groupId>
            <artifactId>Module ID</artifactId>
            <version>Latest version</version>
        </dependency>
    </dependencies>
</project>
  • If you don't use any build tool, you can get it by downloading the latest release of your wanted module from GitHub Releases

πŸš€ How to use it

πŸ’Ό Tools

  • πŸ“¦ Module ID: 'tools'
  • πŸ“ Size: ~350Ko
  • πŸ“… Release date: 2022-03-25
  • 🧠 Developer: nullptr-rs
  • πŸ“„ Dependencies: Slf4j API, JetBrains Annotations, Gson
  • πŸ“ Description: The main module, a basic common tools base used by all other modules.

🚦 Getting started

  • Check the Wiki to learn how to use it.

πŸ“¦ Redis

  • πŸ“¦ Module ID: 'tools-redis'
  • πŸ“ Size: ~1Mo
  • πŸ“… Release date: 2022-03-25
  • 🧠 Developer: nullptr-rs
  • πŸ“„ Dependencies: Jedis
  • πŸ“ Description: A module to interact with Redis, including a connection manager and a Pub/Sub listener system.

🚦 Getting started

  • Create a new instance of the Redis connection through the builder:
final RedisConnection connection = new RedisConnection.Builder().withHost(() -> "127.0.0.1").withPassword(() -> "my-password").build();
  • Now you can use the connection to interact with Redis:
connection.execute(jedis -> jedis.set("foo", "bar"));

final String foo = connection.executeAndReturn(jedis -> {
    final String value = jedis.get("foo");
    return value + " world";
});
  • Check the Wiki to learn how to use Pub/Sub system and advanced features.

🐳 Docker

  • πŸ“¦ Module ID: 'tools-docker'
  • πŸ“ Size: ~9.8Mo
  • πŸ“… Release date: 2022-03-25
  • 🧠 Developer: nullptr-rs
  • πŸ“„ Dependencies: Docker Java, Docker Transport Zerodep
  • πŸ“ Description: A module to interact with the Docker client, with wrappers and callbacks for all commands, and a Dockerfile generator. You can easily interact with containers, images, networks, Swarm and volumes.

🚦 Getting started

  • Create a new instance of the Docker manager through the builder:
final DockerManager docker = new DockerManager.Builder().withHost(DockerHost.TCP_DAEMON).build();
  • Now you can get the managers for all the Docker commands:
final DockerClient client = docker.getClient();

final DockerInfoManager info = docker.getInfoManager();
final DockerImageManager image = docker.getImageManager();
final DockerSwarmManager swarm = docker.getSwarmManager();
final DockerVolumeManager volume = docker.getVolumeManager();
final DockerNetworkManager network = docker.getNetworkManager();
final DockerContainerManager container = docker.getContainerManager();
  • Check the Wiki to learn how to use each manager, custom registry and the Dockerfile generator.

🚧 Planned modules and features

  • πŸ“ Yaml and Json configuration creator -> Config
  • πŸ”§ ZooKeeper tools -> ZooKeeper
  • ♻️ Placeholder registry in the I18n system -> Tools
  • πŸ—‚οΈ Provider system, to register instances of API -> Tools
  • πŸ–₯️ Commands creator for CLI apps -> CLI
  • πŸ“‚ Reflection system -> Tools
  • πŸ“¨ Discord bot tools, with prefix and slash commands handling, etc. -> Discord
  • 🧭Spigot plugin tools, with messaging, GUI creator, plugin.yml generator, auto register for commands and listeners, etc. -> Spigot
  • πŸ” Encryption tools, to secure your files and data -> Security
  • πŸ“¦ Kafka tools -> Kafka
  • πŸ“ˆ MySQL tools -> MySQL
  • πŸ“Š MongoDB tools -> MongoDB
  • πŸ“ˆ PostgreSQL tools -> PostgreSQL
  • πŸ—οΈ Spigot-like build tools creator -> Build tools
  • πŸ”Œ Spigot-like plugin system -> Tools

πŸ’¬ Any problem ?

You can open a Discussion, and ask for help.

πŸ› Find a bug ?

You can open an Issue, describe the problem, and report it.

⭐ Support the project

If you like the project, you can leave a star, or consider sponsoring me.

🀝 Contribute to the project

The project is open-source, so you can fork it and open a pull request to add new features or fix bugs.

πŸ“ License

The project is released under the GNU GPLv3 license. To learn more about it and understand what it commits you to, check this page.

πŸ‘¨β€πŸ’» Contributors


@nullptr-rs