Skip to content

MeveraStudios/Synapse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

68 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  Synapse

Java Gradle License Release

A powerful, modular placeholder translation system designed for dynamic text processing across multiple platforms.

๐Ÿ“‹ Table of Contents


๐Ÿค” Why Synapse?

Compared to traditional placeholder systems:

  • โœจ Modern API: Built with Java 21+ features and best practices
  • ๐ŸŽฏ Type-Safe: No runtime surprises with strongly-typed generics
  • โšก Performance: Smart caching and async-first design
  • ๐Ÿ”Œ Multi-Platform: One API works across Bukkit, Bungee, and Velocity
  • ๐Ÿงช Well-Tested: Comprehensive test suite for reliability

๐ŸŒŸ Overview

Synapse is a high-performance, extensible placeholder translation framework that enables dynamic text processing with context-aware placeholder resolution. Built with a clean, modular architecture, Synapse supports multiple platforms while maintaining type safety and excellent performance through intelligent caching mechanisms.

Key Concepts

  • ๐Ÿง  Neurons: Platform-specific placeholder processors that handle text translation
  • ๐Ÿ‘ค Users: Context providers that supply necessary information for placeholder resolution
  • ๐Ÿท๏ธ Namespaces: Organized categorization system for placeholder management
  • โšก Async Support: Built-in asynchronous processing capabilities for non-blocking operations

โœจ Features

Core Features

  • ๐Ÿš€ High Performance: Optimized placeholder resolution with intelligent caching
  • ๐Ÿ”ง Modular Architecture: Clean separation between core logic and platform implementations
  • ๐ŸŽฏ Type Safety: Strongly typed generics ensure compile-time safety
  • โšก Async Processing: Non-blocking placeholder resolution with CompletableFuture support
  • ๐Ÿ—๏ธ Extensible Design: Easy to add new platforms and custom neurons
  • ๐Ÿ“ Rich API: Comprehensive API for both synchronous and asynchronous operations
  • ๐Ÿท๏ธ Namespace Management: Organized placeholder categorization and conflict prevention
  • ๐Ÿ”„ Context-Aware Resolution: Placeholders resolved based on user context and environment

Advanced Features

  • ๐Ÿ”— Relational Placeholders: Placeholders that resolve values based on relationships between 2 Users
  • ๐Ÿ’พ Intelligent Caching: Built-in caching mechanisms with expiration support
  • ๐Ÿงช Comprehensive Testing: Extensive test suite ensuring reliability
  • ๐Ÿ”™ PAPI Backward-Compatibility: In Bukkit, you can simply call BukkitNeuron#hookToPAPI and we will do the rest
  • ๐ŸŽจ Adventure Integration: First-class MiniMessage support with custom tag resolvers

๐Ÿš€ Getting Started

Prerequisites

  • Java 21+ (Required)
  • Gradle 8.x (For building)
  • Your target platform (e.g., Paper/Spigot for Bukkit)

Installation

For Bukkit/Bungee/Velocity Servers

  1. Download the latest synapse-PLATFORM-*.*.jar from Releases
  2. Place the JAR in your server's plugins/ directory
  3. Restart your server
  4. Configure as needed

For Developers

๐Ÿ“ฆ Adding to Your Project

Gradle (Kotlin DSL)

repositories {
    mavenCentral()
}

dependencies {
    compileOnly("studio.mevera:synapse-bukkit:VERSION") // Replace VERSION
}

Gradle (Groovy)

repositories {
    mavenCentral()
}

dependencies {
    compileOnly 'studio.mevera:synapse-bukkit:VERSION' // Replace VERSION
}

Maven

<dependency>
    <groupId>studio.mevera</groupId>
    <artifactId>synapse-bukkit</artifactId>
    <version>VERSION</version> <!-- Replace VERSION -->
    <scope>provided</scope>
</dependency>

๐Ÿ’ก Note: Use compileOnly/provided scope since Synapse is already on the server. Replace VERSION with the latest release.

๐Ÿ’ป Quick Example

// Create a custom neuron
public class MyNeuron extends BukkitNeuron {
    public MyNeuron(Plugin plugin) {
        super(plugin, Namespace.of("custom"));
        
        // Register placeholders
        register("hello", "Hello World!");
        register("player_name", context -> context.user().getName());
    }
}

// Register and use
@Override
public void onEnable() {
    new MyNeuron(this).register();
    
    BukkitSynapse synapse = BukkitSynapse.get();
    String message = synapse.translate("${custom.hello}, ${custom.player_name}!", player);
    player.sendMessage(message);
}

Check out the Documentation for detailed guides on integrating Synapse into your projects.


๐ŸŽฎ Platform Support

Currently Supported

Platform Status Module Version
Bukkit/Paper โœ… Stable synapse-bukkit 1.8.8+
Bungee โœ… Stable synapse-bungee Latest
Velocity โœ… Stable synapse-velocity 3.0+

Planned Support

Platform Status ETA
Fabric ๐Ÿ“‹ Planned Q2 2026
Forge ๐Ÿ“‹ Planned Q2 2026

๐Ÿ”ง Building

Prerequisites

  • Java 21 or higher
  • Git

Build Steps

# Clone the repository
git clone https://github.com/MeveraStudios/Synapse.git
cd Synapse

# Build all modules
./gradlew build

# Run tests
./gradlew test

# Generate JARs
./gradlew shadowJar

Build Outputs

  • synapse-core/build/libs/synapse-core-x.x.jar - Core library
  • synapse-platform/bukkit/build/libs/synapse-bukkit-x.x.jar - Bukkit plugin
  • synapse-platform/bungee/build/libs/synapse-bungee-x.x.jar - Bungee plugin
  • synapse-platform/velocity/build/libs/synapse-velocity-x.x.jar - Velocity plugin

Development Setup

# Import into your IDE as a Gradle project
# Ensure Java 21+ is configured
# Run tests to verify setup
./gradlew test

๐Ÿค Contributing

We welcome contributions to Synapse! Here's how you can help:

Getting Started

  1. Fork the repository
  2. Clone your fork locally
  3. Create a feature branch: git checkout -b feature/amazing-feature
  4. Make your changes
  5. Test thoroughly: ./gradlew test
  6. Commit your changes: git commit -m 'Add amazing feature'
  7. Push to your branch: git push origin feature/amazing-feature
  8. Open a Pull Request

Contribution Guidelines

  • โœ… Follow existing code style and conventions
  • โœ… Add tests for new functionality
  • โœ… Update documentation as needed
  • โœ… Ensure all tests pass
  • โœ… Write clear, descriptive commit messages

Areas We Need Help

  • ๐Ÿ”Œ New Platform Support: Fabric, Forge implementations
  • ๐Ÿ“ Documentation: Improving guides and examples
  • ๐Ÿงช Testing: Expanding test coverage
  • ๐Ÿ› Bug Reports: Finding and reporting issues
  • ๐Ÿ’ก Feature Suggestions: New ideas and improvements

๐Ÿ“„ License

This project is licensed under a very permissive Attribution License. You may use, modify, and distribute the code for any purpose, but you must mention "Synapse by Mevera Studios" in your documentation, source code, or distribution materials if you copy or use substantial portions of this code.

See the LICENSE file for details.


๐Ÿ™ Acknowledgments

  • Thanks to all contributors who have helped shape Synapse
  • Inspired by the need for a modern, type-safe placeholder system
  • Built with โค๏ธ by the Mevera Studios team

๐Ÿ“ž Support


Made with โค๏ธ by iiAhmedYT and the Mevera Studios team

โญ Star this repo โ€ข ๐Ÿ› Report Bug โ€ข ๐Ÿ’ก Request Feature

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages