Files
oxygen-api/README.md

78 lines
2.4 KiB
Markdown

<div align="center">
<h1>
<img alt="Logo" src="doc/logo.svg" width="128">
<br>
<span>API of Oxygen Toolbox</span>
</h1>
</div>
<div align="center">
<a href="https://ci.fatweb.top/job/Oxygen%20Toolbox%20API/">
<img alt="Build" src="https://ci.fatweb.top/job/Oxygen%20Toolbox%20API/badge/icon">
</a>
<a href="https://github.com/FatttSnake/oxygen-api/releases/latest">
<img alt="Release" src="https://img.shields.io/github/v/release/FatttSnake/oxygen-api">
</a>
<a href="LICENSE">
<img alt="LICENSE" src="https://img.shields.io/github/license/FatttSnake/oxygen-api">
</a>
</div>
# 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.