Changelog
Changelog
This documentation corresponds to CSMS v0.3.2.
v0.3.2 (Current)
- External Open API (v1): added
/api/v1/**endpoints physically isolated from internal APIs, letting third parties CRUD school / grade / class business data viaapi_token. - Credential system: added
api_tokens/api_audit_logsto the main DB andapi_idempotencyto per-school DBs; tokens stored assha256hashes, plaintext visible only once at issuance. - Scope + permission control: credentials bind a "school / grade / class" scope + 12 fine-grained permissions (2 dangerous perms off by default); writes strictly limited to scope; issuance scope forced to not exceed the issuer's own scope.
- Three iron rules: system data not operable externally; writes limited to school-level and below; every request must carry
api_token. - Write idempotency:
Idempotency-Keyheader prevents duplicate score adds / account creation on retry (concurrent conflict returns 409). - Token rate limiting: 600/min total + 120/min writes, returns
429+Retry-Afterwhen exceeded. - Full call audit: every v1 call (including auth failures / rate limits) written to
api_audit_logswithX-Request-Id, retained 30 days. - Credential management UI:
/admin/api-tokensto issue / edit / disable / revoke credentials and view call logs; issue and revoke both require re-authentication. - Added the external Open API integration doc (see ).
v0.3.1
- Admin auth enhancements: email + password login, email code login, forgot password (email code) recovery.
- New super-admin "User Management" module: centrally manage all admin accounts and the cross-school student list.
- Admin affiliation (school / grade / class) is editable, options constrained by management level (
super_adminnone;school_adminschool only;grade_adminschool+grade;class_adminschool+grade+class). - Student side supports email binding and email code password recovery.
- DB files live under
data/(main DBdata/csms.db);.gitignoreignores*.db/*.sqliteand other runtime files. - School list shows school ID; onboarding application has real-time school-name validation (debounced duplicate check, red hint, disabled submit / code button, re-validated on submit).
- Duplicate-school check relaxed: deleted / rejected schools don't count as duplicates, re-application allowed.
- Approved-then-deleted schools are marked with a yellow "deleted" tag on the application page; deleted schools still show the original school ID (new
deleted_school_idsnapshot column). - Approval email includes school ID (added
schoolIdvariable to mail template). - Application "Contact" column shows two lines: phone on top, email below (missing shows
-). - Email notification system: onboarding result emails, editable mail templates (variable placeholders), mail service config (SMTP / Resend).
v0.3.0
A complete rebuild of CSMS, moving from the legacy PHP + jQuery stack to a modern Nuxt full-stack framework:
- 🏫 Multi-school multi-class hierarchical management
- 🔐 Four-level role system
- 📢 Announcement system
- 🏫 School onboarding application
- 👨🎓 Student self-service query
- 🎨 Modern dark-theme UI
- ⚡ Nuxt full-stack rebuild
- 📱 Responsive design
- 🔒 XSS security filtering
- 📝 TypeScript type safety
- 🤖 QQ-bot integration (⚠️ temporarily unavailable after the v0.3.0 rebuild)
