Skip to content

Latest commit

 

History

History
195 lines (152 loc) · 6.03 KB

File metadata and controls

195 lines (152 loc) · 6.03 KB

Pemburu Komen Judol

A comprehensive application for YouTube content creators to manage their videos, analyze channel statistics, and moderate comments with automated spam detection capabilities.

Application Overview

This platform consists of two main components:

  • Backend (Go): RESTful API service handling YouTube Data API integration, authentication, and database operations.
  • Frontend (React): Modern UI for interacting with YouTube channel data, videos, and comments.

Key Features

Authentication

  • Google OAuth 2.0 integration for secure YouTube account access
  • JWT-based session management

Video Management

  • List and filter all videos and shorts from your YouTube channel
  • Access detailed video statistics (views, likes, comments, etc.)
  • View and analyze video performance metrics

Comment Moderation System

  • View, add, update, and delete comments
  • Reply to comments directly from the dashboard
  • Report inappropriate comments
  • Bulk moderate multiple comments

Advanced Spam Detection

  • Automatic detection of potential spam comments based on multiple criteria:
    • Stylized text detection (unicode characters used to bypass filters)
    • Blacklisted word detection
    • Similar comment detection (identifies duplicated spam comments)
    • Obfuscated text detection

Blacklist Management

  • Maintain a custom list of blacklisted words/phrases
  • Automatically add detected spam patterns to blacklist
  • Edit and remove blacklisted terms

Channel Analytics

  • Comprehensive channel statistics dashboard
  • Video performance metrics and trends
  • Comment engagement analysis

Technical Stack

Backend

  • Language: Go 1.24+
  • Database: PostgreSQL 14+
  • API Integration: YouTube Data API v3
  • Authentication: OAuth 2.0, JWT
  • Architecture: RESTful API with repository pattern

Frontend

  • Framework: React 19 with TypeScript
  • Build Tool: Vite
  • UI Components: ShadCN UI
  • Styling: TailwindCSS
  • State Management: Custom stores
  • Routing: React Router

Documentation

For detailed information on how to install, configure, and use the platform, please refer to our comprehensive documentation:

Quick Start

Prerequisites

  • Go 1.24+
  • Node.js and npm/yarn
  • PostgreSQL 14+
  • Google Developer Account with YouTube Data API v3 enabled

Backend Setup

  1. Navigate to the server directory:

    cd server
  2. Copy the example environment file and update with your credentials:

    cp .env.example .env
  3. Set up the database:

    psql -U postgres -d postgres -c "CREATE DATABASE pemburu_komen_judol;"
    psql -U postgres -d pemburu_komen_judol -f migrations/001_initial_schema.sql
  4. Install dependencies:

    go mod download
  5. Build and run the application:

    go build -o pemburu-komen-judol ./cmd/server
    ./pemburu-komen-judol

Go Application Structure

The Go backend is organized into several components:

  • cmd/server: Main API server that handles all backend operations including YouTube API integration and database operations.
  • cmd/app: Serves the compiled frontend application with embedded static files.
  • cmd/logtest: Utility for testing and debugging logging functionality.
  • internal/: Contains all internal packages organized by functionality:
    • app: Core application logic
    • auth: Authentication and authorization
    • handlers: HTTP request handlers
    • models: Data models
    • repository: Database access layer
    • services: Business logic and external service integrations

Frontend Setup

  1. Navigate to the client directory:

    cd client
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev
  4. For production build:

    npm run build
    npm run cp-build  # copies build to server directory

React Application Details

The frontend is built with React 19 and TypeScript, offering a modern and responsive user interface:

  • Component Structure: Organized into reusable UI components, layouts, and feature-specific components
  • State Management: Uses custom stores for efficient state handling across components
  • Styling: Implements TailwindCSS with ShadCN UI components for a consistent design system
  • Routing: Leverages React Router for navigation between different sections of the application

Building and Serving the Application

For a complete production deployment:

  1. Build the React frontend:

    cd client
    npm run build
  2. Build the Go server application:

    cd server
    go build -o pemburu-komen-judol ./cmd/app
  3. Run the application:

    ./pemburu-komen-judol

This will serve the React frontend from the Go application on the configured port (default: 8080).

Docker Deployment

The application can be run using Docker Compose:

docker-compose up -d

This will start both the backend service and PostgreSQL database in containers.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT