1
1
mirror of https://github.com/ZeroCatDev/ClassworksKV.git synced 2025-10-22 10:23:12 +00:00
ClassworksKV/README.md
2025-10-07 14:46:53 +08:00

52 lines
1.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Classworks KV
[Classworks](https://cs.houlangs.com)用于班级大屏的作业板小工具
ClassworksKV 是 Classworks 的后端实现这是一个KV存储服务用于存储和查询数据信息如作业、花名册等也可以用于其他用途。
此项目由[厚浪云](https://houlangs.com)提供,访问公开实例零配置使用 [Classworks](https://cs.houlangs.com)
[![通过雨云一键部署](https://rainyun-apps.cn-nb1.rains3.com/materials/deploy-on-rainyun-cn.svg)](https://app.rainyun.com/apps/rca/store/6229/wuyuan_)
## 文档
[Classworks 文档](https://docs.wuyuan.dev)
## 许可证
This project is licensed under the **GNU AGPL v3.0**.
Copyright (C) 2025 **Sunwuyuan** (<https://wuyuan.dev>)
See [LICENSE](./LICENSE) for details.
## 配置OAuth / JWT
在根目录创建或编辑 `.env`
- 基础地址(用于回调):
- `BASE_URL`: `http://localhost:3030`
- `FRONTEND_URL`: `http://localhost:5173`
- STCNCasdoorOIDC
- `STCN_CLIENT_ID`: `53e65cfd81232e729730`
- `STCN_CLIENT_SECRET`: `e1b1277f8906e5df162b1d2f2eb3692182dd2920`
- 回调地址:`${BASE_URL}/accounts/oauth/stcn/callback`
- 其他可选提供者GitHub、ZeroCat、厚浪云Logto
- JWT
- 默认 HS256提供 `JWT_SECRET`
- 如需 RS256请设置
- `JWT_ALG=RS256`
- `JWT_PRIVATE_KEY`PEM\n 转义)
- `JWT_PUBLIC_KEY`PEM\n 转义)
- `JWT_EXPIRES_IN=7d`
完成后启动服务并访问:
- GET /accounts/oauth/providers 列出可用登录方式
- 浏览器打开 /accounts/oauth/stcn 发起 STCN 登录