1
1
mirror of https://github.com/ZeroCatDev/ClassworksKV.git synced 2025-12-07 13:03:09 +00:00
SunWuyuan bb61e6e6f5
feat: Add AutoAuth functionality and enhance Apps API
- Introduced AutoAuth model to manage automatic authorization configurations for devices.
- Added new endpoint to obtain token via namespace and password for automatic authorization.
- Implemented functionality to set student names for student-type tokens.
- Enhanced AppInstall model to include deviceType and isReadOnly fields.
- Updated device creation to allow custom namespaces and ensure uniqueness.
- Added routes for managing AutoAuth configurations, including CRUD operations.
- Implemented checks for read-only tokens in KV operations.
- Created detailed API documentation for AutoAuth and new Apps API endpoints.
- Added migration scripts to accommodate new database schema changes.
2025-11-01 19:31:46 +08:00
2025-10-02 12:07:50 +08:00
2025-10-03 21:22:18 +08:00
2025-10-02 12:07:50 +08:00
2025-10-03 21:22:18 +08:00
2025-10-06 11:10:54 +08:00
2025-10-06 11:10:54 +08:00
2025-10-07 14:46:53 +08:00

Classworks KV

Classworks用于班级大屏的作业板小工具

ClassworksKV 是 Classworks 的后端实现这是一个KV存储服务用于存储和查询数据信息如作业、花名册等也可以用于其他用途。

此项目由厚浪云提供,访问公开实例零配置使用 Classworks

通过雨云一键部署

文档

Classworks 文档

许可证

This project is licensed under the GNU AGPL v3.0.

Copyright (C) 2025 Sunwuyuan (https://wuyuan.dev) See 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_KEYPEM\n 转义)
      • JWT_PUBLIC_KEYPEM\n 转义)
      • JWT_EXPIRES_IN=7d

完成后启动服务并访问:

  • GET /accounts/oauth/providers 列出可用登录方式
  • 浏览器打开 /accounts/oauth/stcn 发起 STCN 登录
Description
作业板后端服务器
Readme AGPL-3.0 3.7 MiB
Languages
JavaScript 93.4%
HTML 6.1%
EJS 0.2%
Dockerfile 0.2%