A simple code similarity detection tool that allows you to compare and analyze code snippets for similarities using advanced algorithms.
- Vue.js - A progressive JavaScript framework for building user interfaces.
- Spring Boot - A Java framework to create stand-alone, production-grade Spring-based applications.
To deploy the web application locally, follow these steps:
-
Get a Tongyi API key:
The tongyi method used in the project is powered by 通义千问, you should get an API key from their website first.
After that, you can change the
ALI_API_KEY
to your API key inbackend/src/main/resources/application.properties
or use environment variable to implement it accordingly. -
Install Frontend Dependencies:
Run the following command in the frontend directory to install necessary dependencies:
npm install
-
Run the Vue Development Server:
After the dependencies are installed, you can start the frontend server:
npm run serve
This will start the Vue.js development server on your local machine.
-
Build the Backend (Spring Boot):
Now, move to the backend directory and build the Spring Boot application:
mvn clean package
-
Run the Spring Boot Application:
Once the application is built, you can run the backend server with the following command:
mvn spring-boot:run
Your backend server will now be running on your local machine!
To use the Python frontend script, follow the steps below:
-
Run the Python Script:
Execute the script to start the code similarity detection process:
python core.py "/path/to/your_file1" "/path/to/your_file2" --protocol=http --method=tongyi
-
For more information:
Execute the script with
--help
parameter to show help information:python core.py --help
Feel free to fork the repository, make changes, and create pull requests to improve this tool! We'd love to accept contributions from the community. 💻
If you have any questions or feedback, feel free to reach out to us!