Commit Graph
35 Commits
Author SHA1 Message Date
MythEclipse d41c086253 chore: session auto-commit 2026-06-02 18:34:55 +07:00
MythEclipseandClaude Opus 4.6 5e3c2dddb9 fix(discord-gateway): add missing dependencies (axios, ws, @types/pg, @types/ws)
After removing root package deps, discord-gateway service was missing:
- axios (used in indonesianTextNormalizer.ts)
- ws (used in broadcaster.ts)
- @types/pg (needed for TypeScript pg declarations)
- @types/ws (needed for ws types)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-01 22:55:30 +07:00
MythEclipse baa652ffeb chore: regenerate pnpm-lock.yaml after removing root package dependencies 2026-06-01 22:49:25 +07:00
MythEclipseandClaude Opus 4.8 c48a0c5e3b refactor: split monolith into 3 microservices (frontend, backend, discord-gateway)
- Extract services into services/{frontend,backend,discord-gateway}
- Create packages/shared/ for shared logger, errors, utils, types
- Setup Modular MVC pattern in backend (controller→service→repository)
- Setup event-driven architecture in discord-gateway with Redis pub/sub
- Move Docker files to infra/docker/ with per-service Dockerfiles
- Update docker-compose.yml to use Traefik-only routing (no port exposes)
- Update GitHub Actions deploy workflow for multi-service matrix build
- Fix all import paths and resolve type errors across all services
- All 3 services pass tsc --noEmit clean

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 21:44:29 +07:00
MythEclipseandClaude Opus 4.8 a643125c7b refactor(moderation): improve LLM moderation client - 10 recommendations
- Add XML delimiters to prevent prompt injection (R1)
- Use JSON Schema response format instead of json_object (R2)
- Add concurrency limiter via p-limit (R3)
- Add timeout per media analysis call (R4)
- Resize images with sharp before vision API (R5)
- Split text batches when exceeding batch size limit (R6)
- Add few-shot examples to system prompt (R7)
- Modularize system prompt builder (R8)
- Enhance deferral detection regex with exception patterns (R9)
- Sanitize error messages to avoid leaking internals (R10)

New files: concurrencyLimiter.ts, imageResizer.ts, moderationPrompt.ts
Updated: llmModerationClient.ts, config.ts, package.json, tests

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 18:50:05 +07:00
MythEclipse 8a712cff9b Refactor database handling to exclusively support PostgreSQL
- Removed SQLite support from the configuration and database initialization logic.
- Updated database migration scripts to focus solely on PostgreSQL migrations.
- Simplified logging messages to reflect PostgreSQL usage.
- Adjusted database schema definitions to remove SQLite-specific types and structures.
- Modified tests to ensure compatibility with PostgreSQL, including changes to table creation and data types.
- Cleaned up unused imports and code related to SQLite.
2026-05-31 15:46:18 +07:00
MythEclipse d1ef036358 feat(redis): integrate Redis for job queue management and persistent storage 2026-05-31 14:21:43 +07:00
MythEclipse 48b4123f58 chore: remove recharts dependency and clean up pnpm-lock.yaml
- Removed "recharts" from package.json and its associated entries from pnpm-lock.yaml.
- Cleaned up unnecessary dependencies and peer dependencies related to recharts and other unused packages.
2026-05-31 01:04:26 +07:00
MythEclipse 71e240c1e7 feat(analytics): add daily trend and activity heatmap endpoints, and implement corresponding frontend components
- Added new API endpoints for daily trend data and activity heatmap in analyticsRoutes.ts.
- Created new frontend components: ActivityChart, ControlBar, Heatmap, SummaryCards, TopicList, TrendChart, UserTable, and ViolatorTable for displaying analytics data.
- Implemented loading and empty states in the new components.
- Enhanced the existing moderation tests with remote fallback handling for Indonesian text normalization.
2026-05-31 00:41:34 +07:00
MythEclipse c9e79c8c7c feat: refactor database access in analyticsStore to use executeAll and executeGet for improved query handling 2026-05-30 20:40:33 +07:00
MythEclipse 8f6a35f591 feat: integrate NVIDIA Nemotron-3 Content Safety API for Indonesian badword detection
- Added configuration options for NVIDIA Nemotron API key, model, and base URL.
- Refactored badword detection to utilize NVIDIA API, with a fallback to a local badword list.
- Updated moderation functions to handle asynchronous operations for text evidence generation.
- Removed dependency on the `indonesian-badwords` package and implemented custom detection logic.
- Enhanced tests to accommodate asynchronous behavior and validate new detection methods.
2026-05-30 14:48:50 +07:00
MythEclipse 8c3bb77984 feat: add analytics hooks and routes for moderation statistics
- Implemented `useAnalytics` hook for fetching and managing analytics data.
- Created `analyticsStore.ts` to handle database queries for hourly stats, topic trends, user leaderboard, and moderation stats.
- Added Express routes for analytics endpoints including overview, hourly stats, topic trends, user leaderboard, moderation stats, and top violators.
- Introduced a utility function `filterHits` for filtering specific terms in text.
2026-05-29 19:37:08 +07:00
MythEclipseandClaude Opus 4.8 fb09ac81c5 feat(moderation): Indonesian slang normalizer and false-positive prevention
- Add indonesian-badwords dependency for local lexical signal
- Add Indonesian slang lexicon with woy/woi/hadeh as safe casual terms
- Normalize Discord custom emoji <:name:id> to [emoji:name] in prompts
- Wire normalization evidence into both conversationContext and llmModerationClient prompts
- Harden system prompt: woy/woi are casual greetings, not SARA/hate
- Add tests for emoji normalization, slang mapping, badword detection

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 18:39:10 +07:00
MythEclipse cc2ee84c3b refactor(ai-analyzer): fix resource leaks, OOM risk, and strict structured outputs 2026-05-25 22:14:05 +07:00
MythEclipse c32b5274e9 chore: update dependencies and configuration
- Added @discordjs/opus and opusscript to package.json and pnpm-lock.yaml.
- Updated pnpm-workspace.yaml to allow builds for @discordjs/opus.
- Imported dotenv in config.ts for environment variable management.
- Created .npmrc to manage npm configurations.
2026-05-24 20:06:36 +07:00
Asep Haryana Saputra 6a5bbf99d6 feat(dependencies): add TypeScript 5.9.3 and update vitest to 4.1.7 2026-05-21 10:37:03 +00:00
MythEclipse 5588ece6c7 feat(moderation): normalize JSON response handling and enhance test coverage for moderation analysis 2026-05-21 03:52:51 +07:00
MythEclipse 7eb01606b7 feat(moderation): enhance attachment handling and AI analysis integration 2026-05-21 02:39:28 +07:00
MythEclipse 3d64228d6a feat(config): add AI analysis tuning parameters and update related logic 2026-05-21 01:55:50 +07:00
MythEclipse 480bcff5e2 feat(logging): add error serialization and log metadata formatting
- Introduced `loggerSerialization.ts` to handle error serialization and log metadata formatting.
- Added `serializeError` function to convert Error objects into a structured format.
- Implemented `serializeLogValue` to handle various data types including Errors, Dates, RegExps, and plain objects.
- Created `formatLogMetadata` to format log metadata using the serialization functions.

feat(pagination): implement cursor encoding and decoding

- Added `pagination.ts` to manage cursor-based pagination.
- Implemented `encodeCursor` to convert cursor data into a base64 string.
- Developed `decodeCursor` to parse base64 strings back into cursor data, with error handling for invalid inputs.
2026-05-21 00:34:30 +07:00
MythEclipse 12424e5391 chore: update pnpm workspace configuration and vendor subproject
- Added allowBuilds for specific packages in pnpm-workspace.yaml
- Excluded certain minimum release ages for packages
- Updated onlyBuiltDependencies list
- Marked discord.js-selfbot-v13 subproject as dirty
2026-05-19 16:48:06 +07:00
MythEclipse e8e0697a84 chore: clean dependencies and format restructure 2026-05-19 15:12:09 +07:00
MythEclipseandClaude Opus 4.7 2ab097a0c3 chore: switch logging dependency to winston
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 02:20:03 +07:00
MythEclipse eda32720c8 a 2026-05-17 19:39:46 +07:00
MythEclipseandClaude Opus 4.7 82025a19b2 feat: migrate and redesign dashboard to modern React
- Full rewrite of legacy vanilla JS UI into React SPA
- Implement modern design system using Tailwind CSS and shadcn/ui primitives
- Create typed API modules and hooks for voice, media, and moderation
- Add new features: separated Music and Screen Share panels, Image Grid
- Implement unified WebSocket hook for real-time state and PCM audio
- Improve visualizer with smooth CSS transitions and live state sync
- Add __dirname polyfill for ES module compatibility
- Ensure responsive layout for mobile and desktop

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 19:17:34 +07:00
MythEclipseandClaude Opus 4.7 8e1f5adaa4 feat: implement session-level recording with self/bot audio filtering
- Add RecordingSession tracking for guild-level audio mixing
- Filter out self user and bot users before subscribing to audio streams
- Register segments with session metadata for post-processing
- Finalize recording sessions on connection destroy or explicit stop
- Update test mocks to properly simulate stream chain and constructors
- Remove mock-crc import (no longer needed with current dependencies)
- Add 'type: module' to package.json for ES module support

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 18:15:18 +07:00
MythEclipseandClaude Opus 4.7 6aeabc690f feat: prepare media resolver source kinds
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 19:11:23 +07:00
MythEclipseandClaude Opus 4.7 12fdc713d9 feat: vendor Discord video stream workspace
Add Discord-video-stream as a vendored workspace dependency and wire it to use the local selfbot package for development.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 09:01:38 +07:00
MythEclipse 958a6d7236 feat: implement vendor selfbot dependency modernization plan
- Update submodule `discord.js-selfbot-v13` to latest commit.
- Create implementation plan for modernizing the vendored dependency, focusing on toolchain replacement with Biome and runtime dependency auditing.
- Establish a design document outlining goals, scope, approach, toolchain design, runtime dependency design, and validation steps.
- Ensure public API compatibility and maintain existing functionality during modernization efforts.
2026-05-15 06:26:22 +07:00
MythEclipse bbd65d369e feat: implement selfbot workspace submodule
- Add `discord.js-selfbot-v13` as a git submodule in `vendor/`
- Update `pnpm-workspace.yaml` to include the new submodule path
- Modify `.gitmodules` to track the submodule repository
- Change `discord.js-selfbot-v13` dependency in `package.json` to use `workspace:*`
- Create implementation and design documents for the submodule integration
2026-05-15 05:45:19 +07:00
MythEclipseandClaude Opus 4.7 0060d1ba95 chore: modernize dependency set
- Remove deprecated packages: class-transformer, class-validator, fluent-ffmpeg, @types/fluent-ffmpeg
- Update remaining packages to latest versions via pnpm update --latest
- @discordjs/voice: ^0.19.1 → ^0.19.2
- @snazzah/davey: ^0.1.10 → ^0.1.11
- libsodium-wrappers: ^0.8.2 → ^0.8.4
- p-retry: ^6.2.0 → ^8.0.0
- pino: ^9.4.0 → ^10.3.1
- sodium-native: ^4.3.2 → ^5.1.0
- @types/node: ^24.10.1 → ^25.8.0
- pino-pretty: ^10.3.1 → ^13.1.3
- tsx: ^4.20.6 → ^4.22.0
- vitest: latest (preserved)
- @biomejs/biome: latest (preserved)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 04:18:33 +07:00
MythEclipse 71a28085d2 feat: scaffold react dashboard 2026-05-14 20:24:41 +07:00
MythEclipse b833b6d978 feat: add drizzle-orm and drizzle-kit dependencies 2026-05-14 15:31:08 +07:00
MythEclipse 818a059121 feat: add PostgreSQL config and dependencies 2026-05-14 14:44:01 +07:00
MythEclipse a02d1fb7c0 chore: add pnpm workspace configuration with only built dependencies 2026-05-14 01:07:50 +07:00