1.9 KiB
Workbench Deploy Tool Design
Goal
Build a Python desktop tool that helps deploy separated Spring Boot + Vue projects. The user selects one folder, then the tool detects backend, frontend, SQL files, required local environments, configurable deployment settings, and deployment command steps.
Interface
Use a workbench layout:
- Left navigation for Project, Environment, Database, Deployment, Logs.
- Top action bar with folder selection, scan, environment check, and deploy actions.
- Main dashboard cards for backend, frontend, SQL, and environment status.
- Configuration fields for backend port, frontend build directory, MySQL connection, and deployment output directory.
- Log panel for command output and status messages.
Architecture
Use Python standard library only for the first version. Keep business logic outside the GUI:
deploy_tool/scanner.pydetects Spring Boot, Vue, and SQL files.deploy_tool/environment.pychecks commands such as Java, Maven, Gradle, Node, npm, Vue CLI, and MySQL.deploy_tool/deployer.pybuilds deployment steps and can run shell commands with streamed output.deploy_tool/gui.pyimplements the tkinter/ttk workbench.main.pystarts the application.
Behavior
The scanner walks the selected folder and recognizes:
- Spring Boot backend by
pom.xml,build.gradle,src/main/java, and Spring Boot dependency text. - Vue frontend by
package.jsoncontaining Vue dependencies or scripts plus common Vue config files. - SQL files by
.sqlextension.
Environment checks run non-destructive version commands and report installed/missing states.
Deployment starts with a dry, visible command plan. The first version focuses on local build/import/start orchestration and clear logs rather than remote server provisioning.
Testing
Use unittest from the standard library. Tests cover scanner detection, environment command handling with injected runners, and deployment plan generation.