Backend Execution - qModel Open-Source Edition
I. Prerequisites (Required Environment)
Before running the system, ensure the following software and tools are installed:
| Software/Tool | Version Requirement | Recommended Version |
|---|---|---|
| >= 1.8 | 1.8 | |
| >= 5.7.0 | 5.7 | |
| >= 5.0 | 5.0 | |
| >= 3.6 | 3.6 | |
| >= 16 | 16 |
Tip: After installing
Node.js, it's recommended to set the Taobao NPM registry mirror to speed up dependency downloads. Avoid usingcnpmas it may introduce unforeseen issues.npm config set registry https://registry.npmmirror.com
II. Obtain Project Code (Download and Extract)
Visit the 【qModel Gitee Download Page】 to download the project and extract it into your working directory.
III. Project Structure
1. Project Directory Structure
├─qmodel-framework # Common configuration module
├─ ├─qmodel-auth # OAuth2 module
├─ ├─qmodel-common # Common utilities module
├─ ├─qmodel-config # Configuration module
├─ ├─qmodel-file # File management module
├─ ├─qmodel-generator # Code generator
├─ ├─qmodel-mybatis # MyBatis configuration
├─ ├─qmodel-quartz # Scheduled task module
├─ ├─qmodel-redis # Redis module
├─ ├─qmodel-security # Security module
├─qmodel-module-system # System management module
├─qmodel-module-model # Model management module
├─qmodel-server # Main startup module
├─qmodel-ui # Frontend module
├─sql # SQL scripts
├─README.md # Project introduction
├─QUICKSTART.md # Quick start guide2. Frontend Structure
├─qmodel-ui # Frontend module
├─ ├─public # Static resources directory
├─ ├─src
├─ | ├─api # API interfaces
├─ | ├─assets # Images, styles, etc.
├─ | ├─components # Reusable components
├─ | ├─layout # Layout components
├─ | ├─plugins # Plugins
├─ | ├─router # Routing
├─ | ├─store # State management
├─ | ├─utils # Utility functions
├─ | ├─views # Page views
├─ | | ├─system # System management module
├─ | | ├─model # Model management module
├─ ├─.env.development # Development environment config
├─ ├─.env.production # Production environment config
├─ ├─vite.config.js # Vite configuration fileIV. Essential Configuration (Database and Service Setup)
1. Create MySQL Database and Import Data
- Create a MySQL database:
qmodel_dev - Import SQL scripts:
qmodel_YYYYMMDD.sql,quartz.sql
2. Modify MySQL Database Connection Configuration
Path: qModel/qmodel-server/src/main/resources/application-dev.yml
datasource:
type: mysql
mysql:
driver-class-name: com.mysql.cj.jdbc.Driver
url: your_database_host
username: your_database_username
password: your_database_password3. Configure Redis Connection
Path: qModel/qmodel-framework/qmodel-redis/src/main/resources/application-redis-dev.yml
redis:
host: your_redis_host
port: your_redis_port
password: your_redis_password4. Configure Server Port and Access Path
Path: qModel/qmodel-server/src/main/resources/application.yml
server:
port: port_number # Default is 8090
servlet:
context-path: /app_path # Application access path, default is emptyV. Run Backend (Start Server)
- Import the project using IntelliJ IDEA or Eclipse.
- The IDE will automatically load Maven dependencies (initial load may take time).
- Run
tech.qiantong.qmodel.server.QModelApplication.java. After successful startup, access the backend service athttp://localhost:8090. - The following message indicates successful backend startup:
qModel Algorithm Model Platform started successfullyNote: Starting only the backend will not display static pages. Proceed to deploy the frontend service.
Tips: If you encounter missing dependency packages (aspose-words-java, aspose-cells-java), import the two JAR files from the
libdirectory in the project root by running the following commands:
mvn install:install-file -Dfile=lib/aspose-cells-21.8.cracked.jar -DgroupId=com.aspose-cells -DartifactId=aspose-cells-java -Dversion=21.8 -Dpackaging=jar
mvn install:install-file -Dfile=lib/aspose-words-15.8.0-jdk16.jar -DgroupId=com.aspose-words -DartifactId=aspose-words-java -Dversion=15.8.0 -Dpackaging=jarVI. Run Frontend (Start Frontend Service)
1. Modify Backend Service Port Configuration as Needed
// Vite configuration
server: {
port: 80,
host: true,
open: true,
proxy: {
"/dev-api": {
target: "http://localhost:8090",
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, ""),
},
}
}2. Start Frontend Service
Step 1: Navigate to Project Directory
First, go to the qmodel-ui directory:
# Enter project directory
cd qmodel-uiStep 2: Install Dependencies
Next, install project dependencies. Use the Taobao mirror to speed up downloads:
# Install dependencies (using Taobao mirror recommended)
npm install --registry=https://registry.npmmirror.comStep 3: Start Development Server
Finally, run the following command to start the frontend development server:
# Start project in development mode
npm run dev3. Test Frontend Service
Open a browser and navigate to http://localhost. The default login credentials are qModel/qModel123. If the login page displays correctly, you can log in successfully, and menus and pages appear as expected, the environment setup is complete.
Tip: Since this project uses a fully separated frontend-backend architecture, both services must be running for full functionality.
We hope this documentation helps you better understand and operate the qModel Algorithm Model Platform!
Done!
