Files
AI_OJ/CLAUDE.md
2025-12-08 22:51:51 +08:00

2.5 KiB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

This is an AI-integrated OJ (Online Judge) judging system with a microservices architecture. The system allows users to submit code for programming problems, which is then judged automatically. It also includes AI features to assist with problem-solving and code evaluation.

Architecture

The project follows a microservices architecture pattern built with Spring Boot and Spring Cloud Alibaba:

Core Modules:

  1. aioj-backend-common: Common utilities and dependencies shared across all modules.
  2. aioj-backend-gateway: API gateway that routes requests to the appropriate microservices.
  3. aioj-backend-judge-service: Handles code submission, compilation, and judging processes.
  4. aioj-backend-user-service: Manages user accounts, authentication, and authorization.
  5. aioj-backend-question-service: Manages programming problems and test cases.
  6. aioj-backend-ai-service: Provides AI-assisted features such as code analysis and problem-solving.
  7. aioj-backend-auth: Manages authentication and token issuance.
  8. aioj-backend-upms: User Management System for administrative operations.

Database

The system uses SQL databases. Database scripts can be found in the db/ directory.

Build System

The project uses Maven for build and dependency management.

Common Commands:

  • Compile the entire project:

    mvn clean compile
    
  • Compile a specific module:

    mvn clean compile -pl <module-name>
    
  • Package the entire project:

    mvn clean package
    
  • Package a specific module:

    mvn clean package -pl <module-name>
    

Development

Environment Profiles

The project supports different environments (dev, test, prod) with corresponding configuration files:

  • Development: application-dev.yml
  • Test: application-test.yml
  • Production: application-prod.yml

Running a Service

To run a specific microservice, use the Spring Boot Maven plugin:

cd <module-name>
mvn spring-boot:run

Or run the built JAR file:

cd <module-name>/target
java -jar <module-name>-<version>.jar

Technologies Used

  • Java 17: Programming language
  • Spring Boot 3.5.7: Framework for building microservices
  • Spring Cloud Alibaba 2025.0.0.0: Microservices ecosystem
  • Maven: Build tool
  • Lombok: Java library to reduce boilerplate code