This issue features torna, an enterprise interface documentation solution.
Torna is an enterprise interface document solution that aims to make document management easier and faster. Torna uses a team approach to manage and maintain project API documentation, incorporating different forms of documentation to form a unified maintenance approach.
Torna compensates for the shortcomings of traditional document generation tools such as swagger, enriching and enhancing some useful features while maintaining the original functionality:
Basics: Add, delete, modify, preview documents, import and export, document sorting, dictionary management
Enhancements: multi-environment debugging, Mock data, document aggregation, document sharing, rights management, global Settings, docker running, Chinese/English switching, User Center
Extensions: Smart-doc push, swagger plugin push, external document access, OpenAPI/SDK push
Login: third-party interface login, LDAP login, OAuth login, Nailing password free login
Use steps:
Method 1: Download the zip file and run it locally
1. Prepare
Java environment. The minimum requirement is Java8
MySQL 5.6.5 and later. For versions earlier than 5.6.5, see: Support MySQL | Torna
2. Go to Links, download the latest version, and decompress zip
3. Import the database and run mysql.sql · tanghc/ torna-Gitee.com
4. Open the application.properties configuration file and modify the database connection configuration
5. Run sh startup.sh to start the startup. (Run startup.bat on Windows.)
6. Visit http://ip:7700 with your browser
7. There are no special instructions for subsequent upgrade. You only need to overwrite the torna.jar file and dist folder, and then restart
Method 2: docker run
1. Download the public image
docker pull tanghc2020/torna:latest
2
Import the database and run mysql.sql · tanghc/ torna-Gitee.com
3. The replication server/boot/SRC/main/resources/application. The properties files into the/opt/torna/config, change the database connection configuration
4. Perform docker run – name torna -p 7700:7700 – v/opt/torna/config: / torna/config – d < mirror ID >
5. Visit http://ip:7700 with your browser
Development and deployment:
1. Development environment
Before embarking on development, please install/learn the following environment in advance
Java8, Torna requires a minimum Java version of Java8
Maven3, package management and build tools, minimum version required maven3
nodejs12: Front-end development requires nodejs installation. The recommended version is NodeJS12
Mysql5.7(Recommended)
Engineering description
front: Front-end engineering
plugin: plugin
script: auxiliary script
sdk: indicates the SDK corresponding to OpenAPI
server: Server project
mysql: database script
2. Import the project
This project is developed using IDEA, and Eclipse can theoretically support it.
Because Torna is based on SpringBoot, it can be developed using the community version of IDEA.
The import procedure is as follows:
Run the mysql.sql script in MySQL5.6.5 and later versions. For versions earlier than 5.6.5, see: MySQL | Torna is supported
The IDE installs the lombok plugin, then opens the project (you can open the root pom.xml under IDEA, then open as project), the first import will download the dependency package, please be patient
Open the server/boot/SRC/main/resources/application properties, change the database configuration
Run server/boot/SRC/main/Java/cn/torna TornaApplication. Java
At this point, the server is started, and the following explains the front-end project
Running front end
cd front, jump the command prompt to the front directory
Run npm install
This step is to download the nodejs dependencies
run npm run dev and go to http://localhost:9530/
At this point, the front end starts up
The server address for the front-end request is configured in the.env.development file, which defaults to http://localhost:7700
The IDE opens the front-end project
Use WebStorm or VSCode to open the front folder, if you are a backend Java developer, WebStorm is recommended, the interface is a little familiar, and the family bucket shortcut is the same.
Interface preview:
Document management
document editing
Document preview
interface debugging
upload files
You can read more on your own.
Open source address: Click download
If you need project recommendations and resources, please send private letters to the author