Neditor is a rich text editor based on Ueditor’s modern interface

Neditor is a rich text editor based on Ueditor’s modern interface

2022-09-14 0 1,280
Resource Number 38490 Last Updated 2025-02-24
¥ 0HKD Upgrade VIP
Download Now Matters needing attention
Can't download? Please contact customer service to submit a link error!
Value-added Service: Installation Guide Environment Configuration Secondary Development Template Modification Source Code Installation

In this issue, we recommend Hcode Online Judge, an online evaluation platform based on SpringCloud and Vue that separates the front-end and back-end.

Neditor is a rich text editor based on Ueditor’s modern interface插图

Hcode Online Judge (HOJ): Based on the separation of front-end and back-end, online evaluation platform (hoj) with distributed architecture, the front-end uses vue, the back-end mainly uses springboot, redis, mysql, nacos and other technologies, supports HDU, POJ, Codeforces (including GYM) vjudge judgment, and adapts to mobile phone and computer browsing, has a discussion area and an on-site message system, supports private training, Open training (question list), as well as perfect question judgment mode (ordinary assessment, special assessment, interactive evaluation) and perfect competition functions (star team, follow team, external list).

characteristic
Distributed: Supports the flexible increase or decrease of multiple judgment services
Efficient: Front-end and back-end separation is adopted, rapid development is adopted, and high-performance reusable question judgment sandbox is used
Customization: The website is highly centralized and supports customized modification
Security: The problem is judged by using cgroup to isolate user programs, and the website permission control is perfect
Diversification: Exclusive self-judgment service, and support the submission of other well-known OJ questions
Screenshot of the page

The following screenshot pages all support Chinese and English internationalization, click Convert at the bottom to convert the whole website, including background management, and the browser will remember the language selected this time.

Home page

Neditor is a rich text editor based on Ueditor’s modern interface插图1

  • The first page is in EnglishNeditor is a rich text editor based on Ueditor’s modern interface插图2

 

  • On-site messaging system

 

Neditor is a rich text editor based on Ueditor’s modern interface插图3 Neditor is a rich text editor based on Ueditor’s modern interface插图4

  • Question list page

Neditor is a rich text editor based on Ueditor’s modern interface插图5

  • Question details page

Neditor is a rich text editor based on Ueditor’s modern interface插图6

  • Training list page

Neditor is a rich text editor based on Ueditor’s modern interface插图7

  • Training question list page

Neditor is a rich text editor based on Ueditor’s modern interface插图8

  • Tournament list page

 

Neditor is a rich text editor based on Ueditor’s modern interface插图9

  • Tournament leaderboards

 

Neditor is a rich text editor based on Ueditor’s modern interface插图10 Neditor is a rich text editor based on Ueditor’s modern interface插图11

Rapid deployment

Environment preparation: docker and docker-compose

1. Stand-alone deployment

1. Select the location where you want to install it and run the following command:

git clone https://gitee.com/himitzh0730/hoj-deploy.git && cd hoj-deploy

2. Go to the folder and use docker-compose to start each container service:

cd standAlone

The standAlone folder file has the following:

├── docker-compose.yml
├── .env

For the main configuration, please modify the .env file, which is as follows:

Note: It is best not to change the IP address of each service and keep it on the Docker network in the 172.20.0.0/16 network segment

# Folder location of all hoj data storage (the current path generates hoj folder by default)
HOJ_DATA_DIRECTORY=./hoj

# Redis configuration
REDIS_HOST=172.20.0.2
REDIS_PORT=6379
REDIS_PASSWORD=hoj123456

# MySQL configuration
MYSQL_HOST=172.20.0.3
# If the judgment service is distributed, please provide the public IP address of the server where MySQL is located
MYSQL_PUBLIC_HOST=172.20.0.3
MYSQL_PORT=3306
MYSQL_ROOT_PASSWORD=hoj123456

# Configuration of NACOS
NACOS_HOST=172.20.0.4
NACOS_PORT=8848
NACOS_USERNAME=root
NACOS_PASSWORD=hoj123456

# Configure the backend service
BACKEND_HOST=172.20.0.5
BACKEND_PORT=6688
# Token encryption key The default is to generate a 32-bit random key
JWT_TOKEN_SECRET=default
# The token expiration time is 86400s in 24 hours by default
JWT_TOKEN_EXPIRE=86400
# The token can be automatically refreshed every 12 hours by default
JWT_TOKEN_FRESH_EXPIRE=43200
# The token that calls the judgment server will generate a 32-bit random key by default
JUDGE_TOKEN=default
# Please use the domain name or IP address of the mail service
EMAIL_SERVER_HOST=smtp.qq.com
EMAIL_SERVER_PORT=465
EMAIL_USERNAME=your_email_username
EMAIL_PASSWORD=your_email_password
# To enable virtual judgment, please provide the account and password corresponding to OJ in the format of
# username1,username2,…
# password1,password2,…
HDU_ACCOUNT_USERNAME_LIST=
HDU_ACCOUNT_PASSWORD_LIST=
CF_ACCOUNT_USERNAME_LIST=
CF_ACCOUNT_PASSWORD_LIST=
POJ_ACCOUNT_USERNAME_LIST=
POJ_ACCOUNT_PASSWORD_LIST=

# JudgeServer configuration
JUDGE_SERVER_IP=172.20.0.7
JUDGE_SERVER_PORT=8088
JUDGE_SERVER_NAME=judger-alone
# -1 indicates that the maximum number of tasks that can be accepted is the number of CPU cores + 1
MAX_TASK_NUM=-1
# Whether the remote virtual question judgment function is enabled on the current question judgment server
REMOTE_JUDGE_OPEN=true
# -1 indicates that the maximum number of remote judgment tasks that can be received is the number of CPU cores × 2+1
REMOTE_JUDGE_MAX_TASK_NUM=-1
# The default number of sandbox parallel judgment programs is the number of CPU cores
PARALLEL_TASK=default

# Docker Network configuration
SUBNET=172.20.0.0/16

Tip: If the memory of the server is 4G or above, please remove the JVM limit to greatly increase the concurrency, and perform the following steps:

vim docker-compose.yml

Comment or omit the selected row from the diagram:

(1) hoj-back module

Neditor is a rich text editor based on Ueditor’s modern interface插图12

② hoj-judgeservermodule

Neditor is a rich text editor based on Ueditor’s modern interface插图13

If it is not changed, it will be started with the default parameters (the test can not be changed, but please modify the password of the default configuration for official deployment!) )

docker-compose up -d

Depending on the network speed, it takes about 10 to 20 minutes to pull the image without manual intervention, and after the pull is completed, the container service will be automatically started, which will take about 1 to 2 minutes to initialize.

After the command is executed, check the container status:

docker ps -a

When you see that the status of all containers is UP or healthy, it means that OJ has been successfully started.

The following default parameters are described:

Default super administrator account and password: root / hoj123456

Default Redis password: hoj123456 (please modify for official deployment)

Default MySQL account and password: root/hoj123456 (please modify for official deployment)

Default NACOS administrator account and password: root/hoj123456 (please modify for official deployment)

HTTPS is not enabled by default, and the file to be modified is enabled and the certificate file is provided

By default, the number of concurrent CPUs is +1

VJ judgment is enabled by default, you need to manually modify and add the account and password, if you don’t add it, you can’t VJ judgment!

The default number of concurrent VJ judgments is the number of CPU cores x 2+1

Log in to the root account to check the service status in the background and modify the service configuration in http://ip/admin/conf!

Note: The email system is required for website registration and user account related operations, so please configure your own SMTP email service in the system configuration.

If you have already configured the mail service in the .env file at startup, you do not need to modify it again.

Host: smtp.qq.com
Port: 465
Username: qq email account
Password: A random authorization code generated after the SMTP service is enabled

2. Distributed deployment

For the firewall of the primary server (running nacos, backend, frontend, and redis), please open port number 8848, 3306, and 873

From the server firewall of the server (running judgeserver), open port 8088

1. Select the location where you want to install it and run the following command:

git clone https://gitee.com/himitzh0730/hoj-deploy.git && cd hoj-deploy

2. Go to the folder:

cd distributed

The distributed folder has the following:

├── judgeserver
├── main

3. Deploy the main service, which is DataBackup.

cd main

The folder has:

├── docker-compose.yml
├── .env

Modify the configuration in the .env file

vim .env

Note: It is best not to change the IP address of each service and keep it on the Docker network in the 172.20.0.0/16 network segment

# Folder location of all hoj data storage (the current path generates hoj folder by default)
HOJ_DATA_DIRECTORY=./hoj

# Redis configuration
REDIS_HOST=172.20.0.2
REDIS_PORT=6379
REDIS_PASSWORD=hoj123456

# MySQL configuration
MYSQL_HOST=172.20.0.3
# Please provide the public IP address of the server where MySQL resides
MYSQL_PUBLIC_HOST=172.20.0.3
MYSQL_PORT=3306
MYSQL_ROOT_PASSWORD=hoj123456

# Configuration of NACOS
NACOS_HOST=172.20.0.4
NACOS_PORT=8848
NACOS_USERNAME=root
NACOS_PASSWORD=hoj123456

# Configure the backend service
BACKEND_HOST=172.20.0.5
BACKEND_PORT=6688
# Token encryption key The default is to generate a 32-bit random key
JWT_TOKEN_SECRET=default
# The token expiration time is 86400s in 24 hours by default
JWT_TOKEN_EXPIRE=86400
# The token can be automatically refreshed every 12 hours by default
JWT_TOKEN_FRESH_EXPIRE=43200
# The token that calls the judgment server will generate a 32-bit random key by default
JUDGE_TOKEN=default
# Please use the domain name or IP address of the mail service
EMAIL_SERVER_HOST=smtp.qq.com
EMAIL_SERVER_PORT=465
EMAIL_USERNAME=your_email_username
EMAIL_PASSWORD=your_email_password
# To enable virtual judgment, please provide the account and password corresponding to OJ in the format of
# username1,username2,…
# password1,password2,…
HDU_ACCOUNT_USERNAME_LIST=username1,username2
HDU_ACCOUNT_PASSWORD_LIST=password1,password2
CF_ACCOUNT_USERNAME_LIST=
CF_ACCOUNT_PASSWORD_LIST=
POJ_ACCOUNT_USERNAME_LIST=
POJ_ACCOUNT_PASSWORD_LIST=

# Evaluate the configuration of data synchronization
# Please change the data synchronization password
RSYNC_PASSWORD=hoj123456

# Docker Network configuration
SUBNET=172.20.0.0/16

After the configuration modifications are saved, the service is started in the current path

docker-compose up -d

Depending on the internet speed, it can be installed in about 10 minutes, without human intervention.

After the command is executed, check the container status

docker ps -a

When you see that the status of all containers is UP or healthy, it means that OJ has been successfully started.

4. Then, on another server, still git clone the folder, then go to the judgeserver folder and modify the configuration of the .env

# Folder location of all hoj data storage (default current path generates judge folder)
HOJ_JUDGESERVER_DATA_DIRECTORY=./judge

# Configuration of NACOS
# Changed to the IP address of the service where Nacos resides
NACOS_HOST=NACOS_HOST
# Changed to Nacos startup port number, which is 8848 by default
NACOS_PORT=8848
# Changed to the administrator account of Nacos
NACOS_USERNAME=root
# Change the administrator password of Nacos
NACOS_PASSWORD=hoj123456

# JudgeServer configuration
#修改服务器公网ip
JUDGE_SERVER_IP=172.20.0.7
JUDGE_SERVER_PORT=8088
JUDGE_SERVER_NAME=judger-1
# -1 indicates that the maximum number of tasks that can be accepted is the number of CPU cores + 1
MAX_TASK_NUM=-1
# Whether the remote virtual question judgment function is enabled on the current question judgment server
REMOTE_JUDGE_OPEN=true
# -1 indicates that the maximum number of remote judgment tasks that can be received is the number of CPU cores × 2+1
REMOTE_JUDGE_MAX_TASK_NUM=-1
# The default number of sandbox parallel judgment programs is the number of CPU cores
PARALLEL_TASK=default

# rsync evaluates the configuration of data synchronization
# Write to the IP address of the primary server
RSYNC_MASTER_ADDR=127.0.0.1
# The rsync password is the same as that of the primary server
RSYNC_PASSWORD=hoj123456

After the configuration modifications are saved, the service is started in the current path

docker-compose up -d

Tip: You need to turn on multiple machines, just like the operation in step 4 at the moment, and perform the above operations on each server.

5. After both services are started, enter the main service IP or domain name in the browser to access, log in to the root account to check the service status in the background.

This project uses the MIT open source license, and you can read more about it by yourself.

资源下载此资源为免费资源立即下载
Telegram:@John_Software

Disclaimer: This article is published by a third party and represents the views of the author only and has nothing to do with this website. This site does not make any guarantee or commitment to the authenticity, completeness and timeliness of this article and all or part of its content, please readers for reference only, and please verify the relevant content. The publication or republication of articles by this website for the purpose of conveying more information does not mean that it endorses its views or confirms its description, nor does it mean that this website is responsible for its authenticity.

Ictcoder Free Source Code Neditor is a rich text editor based on Ueditor’s modern interface https://ictcoder.com/neditor-is-a-rich-text-editor-based-on-ueditors-modern-interface/

Share free open-source source code

Q&A
  • 1. Automatic: After making an online payment, click the (Download) link to download the source code; 2. Manual: Contact the seller or the official to check if the template is consistent. Then, place an order and make payment online. The seller ships the goods, and both parties inspect and confirm that there are no issues. ICTcoder will then settle the payment for the seller. Note: Please ensure to place your order and make payment through ICTcoder. If you do not place your order and make payment through ICTcoder, and the seller sends fake source code or encounters any issues, ICTcoder will not assist in resolving them, nor can we guarantee your funds!
View details
  • 1. Default transaction cycle for source code: The seller manually ships the goods within 1-3 days. The amount paid by the user will be held in escrow by ICTcoder until 7 days after the transaction is completed and both parties confirm that there are no issues. ICTcoder will then settle with the seller. In case of any disputes, ICTcoder will have staff to assist in handling until the dispute is resolved or a refund is made! If the buyer places an order and makes payment not through ICTcoder, any issues and disputes have nothing to do with ICTcoder, and ICTcoder will not be responsible for any liabilities!
View details
  • 1. ICTcoder will permanently archive the transaction process between both parties and snapshots of the traded goods to ensure the authenticity, validity, and security of the transaction! 2. ICTcoder cannot guarantee services such as "permanent package updates" and "permanent technical support" after the merchant's commitment. Buyers are advised to identify these services on their own. If necessary, they can contact ICTcoder for assistance; 3. When both website demonstration and image demonstration exist in the source code, and the text descriptions of the website and images are inconsistent, the text description of the image shall prevail as the basis for dispute resolution (excluding special statements or agreements); 4. If there is no statement such as "no legal basis for refund" or similar content, any indication on the product that "once sold, no refunds will be supported" or other similar declarations shall be deemed invalid; 5. Before the buyer places an order and makes payment, the transaction details agreed upon by both parties via WhatsApp or email can also serve as the basis for dispute resolution (in case of any inconsistency between the agreement and the description of the conflict, the agreement shall prevail); 6. Since chat records and email records can serve as the basis for dispute resolution, both parties should only communicate with each other through the contact information left on the system when contacting each other, in order to prevent the other party from denying their own commitments. 7. Although the probability of disputes is low, it is essential to retain important information such as chat records, text messages, and email records, in case a dispute arises, so that ICTcoder can intervene quickly.
View details
  • 1. As a third-party intermediary platform, ICTcoder solely protects transaction security and the rights and interests of both buyers and sellers based on the transaction contract (product description, agreed content before the transaction); 2. For online trading projects not on the ICTcoder platform, any consequences are unrelated to this platform; regardless of the reason why the seller requests an offline transaction, please contact the administrator to report.
View details

Related Source code

ICTcoder Customer Service

24-hour online professional services