# 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: ```bash mvn clean compile ``` - Compile a specific module: ```bash mvn clean compile -pl ``` - Package the entire project: ```bash mvn clean package ``` - Package a specific module: ```bash mvn clean package -pl ``` ## 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: ```bash cd mvn spring-boot:run ``` Or run the built JAR file: ```bash cd /target java -jar -.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