From 909a169373c3cdb417c76563c33e7938554c60a6 Mon Sep 17 00:00:00 2001 From: FatttSnake Date: Wed, 4 Sep 2024 17:34:42 +0800 Subject: [PATCH] Docs(README): Add README.md and README_zh.md --- README.md | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++ README_zh.md | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/logo.svg | 1 + 3 files changed, 161 insertions(+) create mode 100644 README.md create mode 100644 README_zh.md create mode 100644 doc/logo.svg diff --git a/README.md b/README.md new file mode 100644 index 0000000..e979450 --- /dev/null +++ b/README.md @@ -0,0 +1,80 @@ +
+

+ Logo +
+ API of Oxygen Toolbox +

+
+ +--- + +
+ + Build + + + Release + + + LICENSE + +
+ +# Overview ([ZH](README_zh.md), EN) + +This project is the backend API of Oxygen Toolbox. Provides tool store, tool management, authentication, user management and other functions. + +# Requires + +- Java 17+ +- MySQL +- Redis + +# Related projects + +[Web UI of Oxygen Toolbox](https://github.com/FatttSnake/oxygen-ui) + +[Desktop Client of Oxygen Toolbox](https://github.com/FatttSnake/oxygen-desktop) + +[Android Client of Oxygen Toolbox](https://github.com/FatttSnake/oxygen-android) + +# Quick Start + +1. First run, generate configuration file template + +```shell +java -jar oxygen-api.jar +``` + +2. Copy the `application-config.example.yml` file in the `data` directory to the running directory and rename it to `application-config.yml` + +```shell +cp ./data/application-config.example.yml application-config.yml +``` + +3. Edit the content of the configuration file `application-config.yml` + + +4. Run again + +```shell +java -jar oxygen-api.jar +``` + +# Security + +Integration with Spring Security and add other filter for jwt token process. The secret key is stored in `application-config.yml`. + +# Database + +Two databases, MySQL + SQLite, are used. MySQL is used to store key data, and SQLite is used to store logs and other data that require a large amount of reading and writing. + +# Q&A + +> **Q: What is the default administrator account and password?** +> +> A: If configured in `application-config.yml` before initializing the database, use the specified account and password. If not configured, a random password will be generated by default. See the console output for details. + +> **Q: Do I need to initialize the database?** +> +> A: This project uses `Flyway` to automatically initialize the database without manually defining the data table structure. To ensure data security, please back up the database before upgrading. diff --git a/README_zh.md b/README_zh.md new file mode 100644 index 0000000..5860633 --- /dev/null +++ b/README_zh.md @@ -0,0 +1,80 @@ +
+

+ Logo +
+ API of Oxygen Toolbox +

+
+ +--- + +
+ + Build + + + Release + + + LICENSE + +
+ +# 概述 (ZH, [EN](README.md)) + +本项目为 Oxygen Toolbox 的后端 API。提供工具商店、工具管理、认证鉴权、用户管理等功能。 + +# 环境要求 + +- Java 17+ +- MySQL +- Redis + +# 关联项目 + +[Web UI of Oxygen Toolbox](https://github.com/FatttSnake/oxygen-ui) + +[Desktop Client of Oxygen Toolbox](https://github.com/FatttSnake/oxygen-desktop) + +[Android Client of Oxygen Toolbox](https://github.com/FatttSnake/oxygen-android) + +# 快速开始 + +1. 初次运行,生成配置文件模板 + +```shell +java -jar oxygen-api.jar +``` + +2. 将 `data` 目录下的 `application-config.example.yml` 文件复制到运行目录下,并重命名为 `application-config.yml` + +```shell +cp ./data/application-config.example.yml application-config.yml +``` + +3. 编辑配置文件 `application-config.yml` 内容 + + +4. 再次运行 + +```shell +java -jar oxygen-api.jar +``` + +# 安全 + +集成 Spring Security 并采用 jwt 令牌, 密钥存储在 `application-config.yml` 中。 + +# 数据库 + +采用 MySQL + SQLite 双数据库,MySQL 用于存放关键数据,SQLite 用于存放日志等需要大量读写的数据。 + +# Q&A + +> **Q: 默认管理员账号和密码是什么?** +> +> A: 初始化数据库前配置在 `application-config.yml` 中,则使用所指定账号密码。未配置则默认生成随机密码,详见控制台输出。 + +> **Q: 是否需要初始化数据库?** +> +> A: 本项目采用 `Flyway` 自动初始化数据库,无需手动定义数据表结构。为保证数据安全,升级时请先备份数据库。 diff --git a/doc/logo.svg b/doc/logo.svg new file mode 100644 index 0000000..6b67342 --- /dev/null +++ b/doc/logo.svg @@ -0,0 +1 @@ +