1
1
mirror of https://github.com/ZeroCatDev/ClassworksKV.git synced 2025-12-07 13:03:09 +00:00

16 Commits

Author SHA1 Message Date
Sunwuyuan
21d6ddf164
feat: 实现批量upsert方法,优化键值对处理性能 2025-12-07 13:33:47 +08:00
Sunwuyuan
b782945674
feat: 更新Socket.IO CORS设置,支持更多HTTP方法 2025-12-06 11:54:41 +08:00
Sunwuyuan
1e1b99a070
feat: 更新Socket.IO初始化配置,优化CORS设置和传输方式 2025-12-06 11:53:57 +08:00
Sunwuyuan
7a010faa54
1 2025-11-23 16:48:27 +08:00
Sunwuyuan
c545612c9c
规范代码格式 2025-11-16 16:15:05 +08:00
Sunwuyuan
4ec10acfcf
feat: 增强错误处理,统一JWT过期返回格式,添加业务错误码支持 2025-11-16 16:11:31 +08:00
Sunwuyuan
1d7078874b
feat: 添加 Prometheus 指标支持,跟踪在线设备和注册设备总数 2025-11-15 16:21:40 +08:00
SunWuyuan
2ab90ffebc
feat: Implement Refresh Token system with enhanced security and user experience
- Added refresh token support in the account model with new fields: refreshToken, refreshTokenExpiry, and tokenVersion.
- Created a new token management utility (utils/tokenManager.js) for generating and verifying access and refresh tokens.
- Updated JWT utility (utils/jwt.js) to maintain backward compatibility while introducing new token generation methods.
- Enhanced middleware for JWT authentication to support new token types and automatic token refreshing.
- Expanded API endpoints in routes/accounts.js to include refresh token functionality, logout options, and token info retrieval.
- Introduced automatic token refresh mechanism in the front-end integration examples.
- Comprehensive migration checklist and documentation for the new refresh token system.
- Added database migration script to accommodate new fields in the Account table.
2025-11-02 09:48:03 +08:00
SunWuyuan
02c0da037f
feat: integrate Socket.IO for real-time updates and online device management
- Added Socket.IO dependency to enable real-time communication.
- Initialized Socket.IO in the server and bound it to the HTTP server.
- Implemented functionality to allow clients to join device channels using KV tokens.
- Added endpoints to retrieve online devices and broadcast key changes.
- Enhanced existing routes to include device names in responses.
- Implemented broadcasting of key changes for KV operations.
- Updated documentation to reflect the new Socket.IO integration and usage.
2025-10-25 17:10:22 +08:00
SunWuyuan
6c05d71506
添加智教联盟登录 2025-10-07 14:46:53 +08:00
SunWuyuan
7b1e224f70
继续一大堆功能实现 2025-10-03 21:22:18 +08:00
SunWuyuan
521522c1d2
更新到一半 2025-10-02 12:07:50 +08:00
SunWuyuan
22838ee71a
feat(kv): 添加获取键名列表功能
新增 listKeysOnly 方法用于获取指定命名空间下的键名列表,并添加对应的路由接口 /:namespace/_keys 支持分页和排序查询。返回结果包含键名数组、总数和分页信息,便于前端展示大量键名时使用。
2025-08-29 16:54:03 +08:00
SunWuyuan
35d05df925
Refactor project structure by reorganizing imports, removing unused files, and updating .gitignore to include additional environment and build directories. Delete legacy migration scripts and Docker configurations to streamline the codebase. 2025-05-25 09:25:58 +08:00
SunWuyuan
cf646d619f
Add bcrypt and js-base64 dependencies in package.json and pnpm-lock.yaml. Enhance authentication middleware in auth.js with password hint functionality and improve error handling. Update device management routes in kv.js to support password hint retrieval and modification, ensuring better security and user experience. 2025-05-18 14:33:16 +08:00
SunWuyuan
eeacc317a9
app.js 重构为 ES 模块,新增 KV 存储功能,并实现请求超时中间件。更新 package.json 中的依赖项并移除未使用的路由。完善 README,补充项目特性与安装使用说明。 2025-05-10 13:47:02 +08:00