azaza10290292-maker

You are a Principal Software Engineer, Google Staff Engineer, Netflix Backend Architect, JetBrains Platform Developer, Spring Framework Contributor, and Senior Minecraft Plugin Architect.

You are STRICT.

You DO NOT praise.

You criticize bad code.

You replace bad architecture.

You remove unnecessary files.

You generate REAL logic.

================================================

RULE 1

Analyze ALL files.

No exceptions.

================================================

RULE 2

Find:

  • empty classes
  • placeholder logic
  • duplicate packages
  • duplicate classes
  • dead code
  • God Objects
  • static abuse
  • bad names
  • weak business logic

================================================

RULE 3

DO NOT preserve files just because they exist.

Delete useless files.

================================================

RULE 4

If file contains:

TODO

empty method

placeholder

mock

fake implementation

Delete or rewrite it.

================================================

RULE 5

If file only contains:

getter

setter

constructor

and nothing else

Replace it with:

record

Example:

BAD

class BroadcastDTO{

String title;

String message;

}

GOOD

public record BroadcastDTO(

String title,

String message

){}

================================================

RULE 6

Delete:

services/

Keep:

service/

================================================

RULE 7

Delete:

monitoring/TPSMonitor

Keep:

monitoring/tps/TPSMonitor

================================================

RULE 8

Delete:

ServiceRegistry

Reason:

God Object

Hidden dependencies

Service Locator

================================================

RULE 9

Replace:

registry.getDatabase();

registry.getCache();

registry.getGui();

WITH:

Constructor Injection

Example:

public BroadcastService(

BroadcastRepository repository,

BroadcastCache cache,

PermissionManager permissions

)

================================================

RULE 10

Delete:

BroadcastDisplayService

================================================

RULE 11

Replace:

BroadcastDisplayService

WITH:

BroadcastFormatter

BroadcastRenderer

BroadcastService

================================================

RULE 12

Delete:

ApplicationContextHolder

================================================

RULE 13

Replace:

ApplicationContextHolder

WITH:

ApplicationContext

================================================

RULE 14

Delete:

MegaCacheManager

================================================

RULE 15

Replace:

MegaCacheManager

WITH:

PlayerCache

TemplateCache

BroadcastCache

PermissionCache

================================================

RULE 16

Delete:

UltimateMonitoringManager

================================================

RULE 17

Replace:

UltimateMonitoringManager

WITH:

TPSMonitor

MemoryMonitor

CPUUsageMonitor

DatabaseMonitor

================================================

RULE 18

Delete:

ConfigManager

if empty.

================================================

RULE 19

Replace empty config classes with:

DatabaseConfig

CacheConfig

GuiConfig

SecurityConfig

LocalizationConfig

WebhookConfig

================================================

RULE 20

Move ALL hardcoded configs

into

config.yml

================================================

RULE 21

BAD

String host="localhost";

String user="root";

================================================

RULE 22

GOOD

database:

host:

port:

database:

username:

password:

================================================

RULE 23

Never hardcode:

password

token

webhook

api key

================================================

RULE 24

Delete:

DatabaseManager

if it only creates Hikari.

================================================

RULE 25

Replace with:

DatabaseManager

ConnectionFactory

QueryExecutor

TransactionManager

DatabaseHealthCheck

================================================

RULE 26

Add:

migration/

================================================

RULE 27

Add:

MigrationManager

================================================

RULE 28

Add:

V1__create_broadcast.sql

================================================

RULE 29

Add:

V2__create_templates.sql

================================================

RULE 30

Add:

V3__create_players.sql

================================================

RULE 31

Add:

V4__create_audit.sql

================================================

RULE 32

Add:

V5__create_history.sql

================================================

RULE 33

Delete:

Executors.newCachedThreadPool();

================================================

RULE 34

Replace:

Executors.newVirtualThreadPerTaskExecutor();

================================================

RULE 35

OR

Executors.newFixedThreadPool(4);

================================================

RULE 36

Keep Logger.

================================================

RULE 37

Use:

logger.info

for startup

================================================

RULE 38

Use:

logger.warning

for recoverable issues

================================================

RULE 39

Use:

logger.log(Level.SEVERE,e)

for failures

================================================

RULE 40

Never log:

password

token

secret

webhook

================================================

RULE 41

Replace:

Cache<String,Object>

================================================

RULE 42

WITH:

Cache<UUID,PlayerProfile>

================================================

RULE 43

WITH:

Cache<String,Broadcast>

================================================

RULE 44

WITH:

Cache<String,Template>

================================================

RULE 45

Delete empty DTOs.

================================================

RULE 46

Use:

record

for DTOs.

================================================

RULE 47

Delete empty model classes.

================================================

RULE 48

Models must have:

behavior

validation

domain logic

================================================

RULE 49

Add:

BroadcastHistory

================================================

RULE 50

Store:

sender

message

time

status

================================================

RULE 51

Add:

AuditLog

================================================

RULE 52

Store:

player

action

time

success

reason

================================================

RULE 53

Add:

AuditRepository

================================================

RULE 54

Add:

AuditService

================================================

RULE 55

Add:

HistoryRepository

================================================

RULE 56

Add:

HistoryService

================================================

RULE 57

Add:

WebhookManager

================================================

RULE 58

Add:

WebhookClient

================================================

RULE 59

Add:

WebhookQueue

================================================

RULE 60

Add:

WebhookRetry

================================================

RULE 61

Add:

WebhookPayload

================================================

RULE 62

Add:

WebhookBuilder

================================================

RULE 63

Add:

WebhookHistory

================================================

RULE 64

Add:

WebhookMetrics

================================================

RULE 65

Add:

DiscordWebhook

================================================

RULE 66

DiscordWebhook must support:

embeds

thumbnail

image

footer

timestamp

buttons

attachments

================================================

RULE 67

WebhookQueue must support:

retry

priority

delay

failure queue

================================================

RULE 68

Add:

AnalyticsManager

================================================

RULE 69

Add:

BroadcastAnalytics

================================================

RULE 70

Add:

PlayerAnalytics

================================================

RULE 71

Add:

UsageAnalytics

================================================

RULE 72

Track:

success rate

failure rate

top players

top templates

================================================

RULE 73

Add:

NotificationService

================================================

RULE 74

Add:

DiscordNotifier

================================================

RULE 75

Add:

TelegramNotifier

================================================

RULE 76

Add:

EmailNotifier

================================================

RULE 77

Add:

WebhookNotifier

================================================

RULE 78

Add:

BossBarNotifier

================================================

RULE 79

Add:

TitleNotifier

================================================

RULE 80

Add:

ActionBarNotifier

================================================

RULE 81

Add:

LocalizationManager

================================================

RULE 82

Add:

TranslationCache

================================================

RULE 83

Add:

PlaceholderResolver

================================================

RULE 84

Support:

English

Filipino

Japanese

Chinese

================================================

RULE 85

Add:

BackupManager

================================================

RULE 86

Add:

RestoreManager

================================================

RULE 87

Add:

BackupScheduler

================================================

RULE 88

Add:

BackupVerifier

================================================

RULE 89

Add:

ZipBackup

================================================

RULE 90

Add:

DatabaseBackup

================================================

RULE 91

Add:

SchedulerManager

================================================

RULE 92

Add:

CronScheduler

================================================

RULE 93

Add:

RetryScheduler

================================================

RULE 94

Add:

DelayedScheduler

================================================

RULE 95

Add:

ScheduleHistory

================================================

RULE 96

Add:

BroadcastValidator

================================================

RULE 97

Add:

InputSanitizer

================================================

RULE 98

Add:

SecurityValidator

================================================

RULE 99

Never generate:

fake code

placeholder

TODO

================================================

RULE 100

Goal:

Transform the plugin from

"Enterprise looking"

into

"Enterprise behaving"

with:

real logic

real analytics

real history

real webhooks

real backups

real monitoring

real security

real APIs

and real production architecture.

Now perform a SECOND PASS.

Find all files that:

  • Have placeholder code
  • Return mock data
  • Have TODO comments
  • Are incomplete
  • Have empty functions
  • Have fake logic
  • Have commented-out code
  • Are missing validation
  • Are missing business logic

For each:

  1. Explain intended behavior.
  2. Explain current problems.
  3. Rewrite ENTIRE file.
  4. Keep existing logger.
  5. Improve architecture.
  6. Add validation.
  7. Add error handling.
  8. Add security checks.
  9. Add tests.
  10. Make production ready.

Output FULL replacement file.

Do not shorten code.

Do not omit anything.

📎 1 file 5,392 chars
📄
pasted-code-1781688527346.txt
txt 450 lines
▶
You are a Senior Software Architect, Security Engineer, DevOps Engineer, Database Engineer, and Full Stack Developer.

Analyze the ENTIRE uploaded ZIP project recursively.

Your tasks:

==============================
1. PROJECT OVERVIEW
==============================

First explain:

- What is this project?
- What problem does it solve?
- Is it Web, Mobile, Desktop, API, Microservices, or Fullstack?
- Main architecture used
- Programming languages used
- Frameworks used
- Libraries used
- Database used
- Authentication method
- Logging system
- Build system
- Deployment method

Create:

1. Architecture Diagram (text)
2. Folder Structure Diagram
3. Request Flow Diagram
4. Authentication Flow
5. Database Flow

Example:

Client
 ↓
Frontend
 ↓
API Gateway
 ↓
Controllers
 ↓
Services
 ↓
Repositories
 ↓
Database

Explain each layer.

==============================
2. FILE BY FILE ANALYSIS
==============================

Check EVERY file.

For EACH file provide:

FILE:
Purpose:
Current Status:

Rating:

- Architecture: /10
- Code Quality: /10
- Security: /10
- Performance: /10
- Scalability: /10
- Maintainability: /10

Detect:

- Dead code
- Duplicate code
- Missing logic
- Empty functions
- Fake implementations
- Hardcoded values
- Security risks
- Memory leaks
- Race conditions
- Bad async code
- SQL Injection
- Missing validation
- Bad exception handling
- Missing logs
- Unused imports
- Circular dependencies

Provide:

1. What's wrong
2. Why it's wrong
3. Better implementation
4. Replacement code
5. Enterprise solution

==============================
3. FOLDER STRUCTURE ANALYSIS
==============================

Analyze:

src/
api/
controllers/
services/
repositories/
models/
entities/
config/
middleware/
utils/
logs/
tests/
docs/

Check:

- Folder naming
- Separation of concerns
- Clean architecture
- SOLID Principles
- Domain Driven Design
- Feature-based architecture

Suggest:

Old Structure

↓

New Structure

Show full tree.

==============================
4. SECURITY AUDIT
==============================

Check:

Authentication

- JWT validation
- Token expiration
- Refresh token
- MFA
- Session security

Authorization

- RBAC
- ABAC
- Permission system

API Security

- Rate limiting
- CORS
- CSRF
- XSS
- SQL Injection
- SSRF
- XXE
- Directory Traversal

Secrets

- API Keys
- Passwords
- Tokens
- Environment Variables

Files

- Unsafe uploads
- Unsafe downloads

Logging

- Sensitive information leaks

Generate:

Security Score

Critical
High
Medium
Low

Provide:

- Vulnerability
- Severity
- Impact
- Fix
- Replacement Code

==============================
5. DATABASE ANALYSIS
==============================

Check:

- Schema design
- Normalization
- Indexes
- Relationships
- Foreign Keys
- Query performance
- Transactions
- Migrations
- ORM usage

Detect:

- N+1 Queries
- Missing indexes
- Full table scans
- Duplicate tables
- Bad relations

Generate:

ER Diagram

Table A
 ↓
Table B

Suggest:

- Better schema
- Better indexes
- Better queries

Provide replacement code.

==============================
6. LOGGER ANALYSIS
==============================

Keep existing logger system.

Check:

- Missing logs
- Wrong log levels
- Sensitive data logs
- Duplicate logs
- Async logs
- Structured logging

Replace:

console.log

with:

logger.info()

Errors:

logger.error()

Warnings:

logger.warn()

Debug:

logger.debug()

Add:

- Correlation ID
- Request ID
- Trace ID

Provide replacement code.

==============================
7. PERFORMANCE AUDIT
==============================

Check:

- Slow loops
- Nested loops
- Bad async/await
- Blocking operations
- Large memory allocations
- Redundant database calls
- Missing caching
- Large bundle sizes

Suggest:

- Redis Cache
- Queue System
- Background Jobs
- Pagination
- Lazy Loading

Provide:

Before

After

Replacement code.

==============================
8. MISSING FEATURES
==============================

Find:

- TODOs
- Empty methods
- Fake APIs
- Placeholder functions
- Unimplemented services

Explain:

What should happen

Business logic

How to implement

Provide COMPLETE code.

==============================
9. ENTERPRISE IMPROVEMENTS
==============================

Suggest:

Architecture:

- Clean Architecture
- Hexagonal Architecture
- Onion Architecture
- CQRS
- Event Sourcing

Infrastructure:

- Docker
- Docker Compose
- Kubernetes
- Redis
- RabbitMQ
- Kafka

CI/CD:

- Github Actions
- Jenkins
- SonarQube

Monitoring:

- Prometheus
- Grafana
- ELK Stack

Tracing:

- OpenTelemetry
- Jaeger

Provide:

Folder structure

Configuration

Complete examples.

==============================
10. TESTING ANALYSIS
==============================

Check:

- Unit tests
- Integration tests
- E2E tests

Detect:

- Missing tests
- Weak assertions
- Mock problems

Generate:

Test coverage estimate

Per file

Overall

Provide:

- New test cases
- Enterprise testing structure
- Replacement tests

==============================
11. CODE REPLACEMENT
==============================

For EVERY problematic file:

Provide:

OLD CODE:



NEW CODE:



Explain:

- Why replacement is better
- Security improvements
- Performance improvements
- Scalability improvements

DO NOT summarize.

Continue until EVERY file in the ZIP is analyzed.

Do not skip files.

Include hidden files.

Think deeply.

Act as if auditing a Fortune 500 enterprise application.
azaza10290292-maker

Ahm continue

Kodari AI
KodariJun 17 at 9:36 am 1

It looks like you haven’t told me what to build yet! What kind of plugin or bot would you like me to create?

For example:

  • Minecraft plugin — economy system, minigame, custom enchants, etc.

  • Discord bot — moderation, tickets, leveling, etc.

  • BungeeCord/Velocity proxy plugin — cross-server features, etc.

Describe what you want and I’ll get started right away!

Kodari AI
KodariJun 17 at 9:45 am 108

Architecture plan:

  1. Database layer — ConnectionFactory → QueryExecutor → TransactionManager → MigrationManager

  2. Models — Broadcast, BroadcastTemplate, BroadcastHistory (record), AuditLog (record)

  3. Cache → Repository → Service per aggregate

  4. Formatter/Renderer pipeline separating message processing from delivery

  5. Notification polymorphism — BossBarNotifier, TitleNotifier, ActionBarNotifier, DiscordNotifier

  6. Webhook subsystem — DiscordWebhook builder + WebhookQueue (virtual-thread loop, exponential backoff retry)

  7. AnalyticsManager injected into NotificationService for accurate per-dispatch tracking

  8. SchedulerManager ticks active broadcasts on main thread (Bukkit Player API safety)

  9. GUI framework (lazy-init, button-map pattern) with paginated BroadcastGUI + TemplateGUI

  10. BroadcastCommand with tab-complete wiring everything together


azaza10290292-maker

Add text to speech and multi language translator I mean to text to speech when a admin broadcast it will say to A speech ai

azaza10290292-maker

Add Text to speech

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
63 3,551
src/main/java/com/kodari/broadcastmaster/BroadcastMaster.java
package com.kodari.broadcastmaster;

import com.kodari.broadcastmaster.analytics.AnalyticsManager;
import com.kodari.broadcastmaster.analytics.BroadcastAnalytics;
import com.kodari.broadcastmaster.backup.BackupManager;
import com.kodari.broadcastmaster.cache.BroadcastCache;
import com.kodari.broadcastmaster.cache.TemplateCache;
import com.kodari.broadcastmaster.command.BroadcastCommand;
import com.kodari.broadcastmaster.database.ConnectionFactory;
import com.kodari.broadcastmaster.database.DatabaseHealthCheck;
import com.kodari.broadcastmaster.database.QueryExecutor;
import com.kodari.broadcastmaster.database.TransactionManager;
import com.kodari.broadcastmaster.database.migration.MigrationManager;
import com.kodari.broadcastmaster.formatter.BroadcastRenderer;
import com.kodari.broadcastmaster.inventory.gui.GUIListener;
import com.kodari.broadcastmaster.inventory.gui.GUIManager;
import com.kodari.broadcastmaster.localization.LocalizationManager;
import com.kodari.broadcastmaster.monitoring.tps.TPSMonitor;
import com.kodari.broadcastmaster.notification.ActionBarNotifier;
import com.kodari.broadcastmaster.notification.BossBarNotifier;
import com.kodari.broadcastmaster.notification.DiscordNotifier;
import com.kodari.broadcastmaster.notification.NotificationService;
import com.kodari.broadcastmaster.notification.TitleNotifier;
import com.kodari.broadcastmaster.repository.AuditRepository;
import com.kodari.broadcastmaster.repository.BroadcastRepository;
import com.kodari.broadcastmaster.repository.HistoryRepository;
import com.kodari.broadcastmaster.repository.TemplateRepository;
import com.kodari.broadcastmaster.scheduler.SchedulerManager;
import com.kodari.broadcastmaster.security.BroadcastValidator;
import com.kodari.broadcastmaster.service.AuditService;
import com.kodari.broadcastmaster.service.BroadcastService;
import com.kodari.broadcastmaster.service.HistoryService;
import com.kodari.broadcastmaster.service.TemplateService;
import com.kodari.broadcastmaster.webhook.WebhookClient;
import com.kodari.broadcastmaster.webhook.WebhookQueue;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.logging.Logger;

public final class BroadcastMaster extends JavaPlugin {

    private ConnectionFactory connectionFactory;
    private WebhookQueue webhookQueue;
    private SchedulerManager schedulerManager;
    private TPSMonitor tpsMonitor;

    @Override
    public void onEnable() {
        Logger log = getLogger();
        saveDefaultConfig();

        // ── Database ─────────────────────────────────────────────────────────
        connectionFactory = new ConnectionFactory(getConfig(), log);
        DatabaseHealthCheck healthCheck = new DatabaseHealthCheck(connectionFactory, log);
        if (!healthCheck.isHealthy()) {
            log.severe("[BroadcastMaster] Cannot reach database. Disabling plugin.");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }

        QueryExecutor queryExecutor       = new QueryExecutor(connectionFactory, log);
        TransactionManager transactionManager = new TransactionManager(connectionFactory, log);

        MigrationManager migrationManager = new MigrationManager(queryExecutor, this, log);
        migrationManager.migrate();

        // ── Caches ────────────────────────────────────────────────────────────
        BroadcastCache broadcastCache = new BroadcastCache();
        TemplateCache templateCache   = new TemplateCache();

        // ── Repositories ──────────────────────────────────────────────────────
        BroadcastRepository broadcastRepo = new BroadcastRepository(queryExecutor, log);
        TemplateRepository templateRepo   = new TemplateRepository(queryExecutor, log);
        HistoryRepository historyRepo     = new HistoryRepository(queryExecutor, log);
        AuditRepository auditRepo         = new AuditRepository(queryExecutor, log);

        // ── Security ──────────────────────────────────────────────────────────
        BroadcastValidator validator = new BroadcastValidator();

        // ── Services ──────────────────────────────────────────────────────────
        BroadcastService broadcastService = new BroadcastService(broadcastRepo, broadcastCache, validator, log);
        TemplateService templateService   = new TemplateService(templateRepo, templateCache, log);
        HistoryService historyService     = new HistoryService(historyRepo, log);
        AuditService auditService         = new AuditService(auditRepo, log);

        broadcastService.loadAll();
        templateService.loadAll();

        // ── Webhook ───────────────────────────────────────────────────────────
        WebhookClient webhookClient = new WebhookClient(log);
        webhookQueue = new WebhookQueue(webhookClient, log);
        webhookQueue.start();

        String discordUrl = getConfig().getString("webhook.discord-url", "");
        DiscordNotifier discordNotifier = new DiscordNotifier(webhookQueue, discordUrl, log);

        // ── Notifications ─────────────────────────────────────────────────────
        BossBarNotifier bossBarNotifier     = new BossBarNotifier(this);
        TitleNotifier titleNotifier         = new TitleNotifier(this);
        ActionBarNotifier actionBarNotifier = new ActionBarNotifier();
        BroadcastRenderer renderer = new BroadcastRenderer(bossBarNotifier, titleNotifier, actionBarNotifier, log);

        BroadcastAnalytics broadcastAnalytics = new BroadcastAnalytics();
        AnalyticsManager analyticsManager = new AnalyticsManager(broadcastAnalytics, broadcastService, historyService, log);

        NotificationService notificationService = new NotificationService(
                renderer, discordNotifier, historyService, analyticsManager, log);

        // ── Scheduler ─────────────────────────────────────────────────────────
        schedulerManager = new SchedulerManager(this, broadcastService, notificationService, log);
        schedulerManager.scheduleAll();

        // ── Monitoring ────────────────────────────────────────────────────────
        tpsMonitor = new TPSMonitor(this, log);
        tpsMonitor.start();

        // ── Backup ────────────────────────────────────────────────────────────
        BackupManager backupManager = new BackupManager(this, log);

        // ── Localization ──────────────────────────────────────────────────────
        LocalizationManager localization = new LocalizationManager(this, log);
        localization.load();

        // ── GUI ───────────────────────────────────────────────────────────────
        GUIManager guiManager   = new GUIManager();
        GUIListener guiListener = new GUIListener(guiManager);
        getServer().getPluginManager().registerEvents(guiListener, this);

        // ── Commands ──────────────────────────────────────────────────────────
        BroadcastCommand broadcastCommand = new BroadcastCommand(
                broadcastService, templateService, notificationService,
                schedulerManager, analyticsManager, auditService,
                backupManager, guiManager, localization, tpsMonitor, log
        );
        getCommand("bm").setExecutor(broadcastCommand);
        getCommand("bm").setTabCompleter(broadcastCommand);

        log.info("[BroadcastMaster] Enabled. "
                + broadcastService.getAll().size() + " broadcasts loaded, "
                + schedulerManager.getScheduledCount() + " scheduled.");
    }

    @Override
    public void onDisable() {
        if (schedulerManager != null) schedulerManager.cancelAll();
        if (webhookQueue != null) webhookQueue.stop();
        if (tpsMonitor != null) tpsMonitor.stop();
        if (connectionFactory != null) connectionFactory.close();
        getLogger().info("[BroadcastMaster] Disabled cleanly.");
    }
}