Skip to content

hellof20/mihoyo-cs-tickets

Repository files navigation

CS Tickets System

A full-stack application for managing and analyzing customer service tickets for Mihoyo. The system provides automated ticket clustering, issue summarization, and FAQ generation capabilities.

Features

  • Ticket Clustering: Automatically groups similar customer service tickets using advanced clustering algorithms
  • Issue Summarization: Generates concise summaries of ticket clusters to identify common patterns
  • FAQ Generation: Automatically creates FAQ entries based on common issues
  • Interactive UI: React-based frontend for easy ticket management and analysis
  • Real-time Processing: Handles ticket processing through Google Cloud PubSub
  • Data Analytics: Leverages BigQuery for efficient data analysis

Project Structure

.
├── mihoyo-cs-tickets-ui/    # React TypeScript frontend
├── sql/                     # SQL scripts for data processing
├── bq_handler.py           # BigQuery integration handler
├── cluster_issue.py        # Ticket clustering logic
├── config.toml             # Configuration file
├── main.py                 # Main application entry point
├── pubsub_handler.py       # PubSub message handling
└── summary_issue.py        # Issue summarization logic

Prerequisites

  • Python 3.x
  • Node.js and npm
  • Google Cloud Platform account with BigQuery and PubSub enabled

Setup

  1. Backend Setup

    # Install Python dependencies
    pip install -r requirements.txt
    
    # Configure the application
    # Edit config.toml with your settings
  2. Frontend Setup

    cd mihoyo-cs-tickets-ui
    npm install

Running the Application

  1. Start the Backend

    uvicorn main:app --reload --port 8000
  2. Start the Frontend

    cd mihoyo-cs-tickets-ui
    npm start

The application will be available at http://localhost:3000

Development

Backend Development

The backend is built with Python and consists of several key components:

  • main.py: Application entry point and API endpoints
  • bq_handler.py: Handles BigQuery operations
  • cluster_issue.py: Implements ticket clustering logic
  • pubsub_handler.py: Manages PubSub message processing
  • summary_issue.py: Handles ticket summarization

Frontend Development

The frontend is built with React and TypeScript, located in the mihoyo-cs-tickets-ui directory:

  • /src/components: React components
  • /src/services: API service integrations
  • /src/types: TypeScript type definitions

Database

SQL scripts in the sql/ directory handle:

  1. View creation
  2. Issue summarization
  3. Embedding generation
  4. FAQ generation

Configuration

Edit config.toml to configure:

  • Database connections
  • GCP settings
  • Application parameters
  • API endpoints

Demo

image

image

image

image

License

[Add your license information here]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors