GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - shao-ye/class-calendar: 孩子每日课程、课包消耗和上课记录的小型日历工具

BranchesTags
Open more actions menu

Latest commit

 

History

16 Commits
16 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
doc
doc
 
 
functions
functions
 
 
migrations
migrations
 
 
prototype
prototype
 
 
public
public
 
 
scripts
scripts
 
 
src
src
 
 
worker-holidays
worker-holidays
 
 
.gitignore
.gitignore
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
index.html
index.html
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
schema.sql
schema.sql
 
 
seed.example.sql
seed.example.sql
 
 
vite.config.js
vite.config.js
 
 
wrangler.toml.example
wrangler.toml.example
 
 

Repository files navigation

课程小日历 class-calendar

孩子每日课程、课包消耗、上课记录和照片归档的小型日历工具。

License: MIT Vue 3 Vite Cloudflare Telegram

技术栈:Vue 3 + Vite、Cloudflare Pages Functions、Cloudflare D1、Cloudflare R2,以及一个可选的 Cloudflare Worker 用于节假日同步。

在线体验:https://class.shaoruiyi.com 公开体验账号:用户名 parent / 密码 123456(仅供试用,数据可能被随时清理,请勿录入真实隐私信息)

功能概览

  • 日历视图:按日期查看课程安排、上课记录和请假/补课信息
  • 课程管理:维护课程、课包、剩余课时和备注
  • 记录统计:查看近期课程消耗和上课趋势
  • 照片归档:通过 R2 保存课程相关照片
  • 账号登录:基于用户名密码和签名 Cookie 的轻量认证
  • 节假日同步:可选 Worker 定时同步法定节假日

界面预览

日历视图 统计分析
日历视图 统计分析
课程库 当日记录
课程库 当日记录

开源与安全声明

本仓库不包含可直接使用的生产密钥、真实数据库 ID、真实口令哈希或本地调试环境变量。以下文件只应保留在本地,已经被 .gitignore 排除:

  • .dev.vars
  • wrangler.toml
  • worker-holidays/wrangler.toml
  • seed.sql

请从对应的 .example 文件复制后填入自己的配置:

  • wrangler.toml.example
  • worker-holidays/wrangler.toml.example
  • seed.example.sql

公开部署前请重新生成 SESSION_SECRET、SYNC_KEY、用户密码哈希,并确认 Cloudflare D1/R2 资源归属于你自己的账号。

快速开始

npm install

cp wrangler.toml.example wrangler.toml
cp worker-holidays/wrangler.toml.example worker-holidays/wrangler.toml
cp seed.example.sql seed.sql

node -e "console.log('SESSION_SECRET=' + require('crypto').randomBytes(32).toString('hex'))" > .dev.vars
node scripts/gen-hash.mjs "你的登录密码"

把生成的密码哈希写入 seed.sql 后初始化本地 D1:

npm run db:init
npm run db:seed

本地开发通常需要两个终端:

npm run build
npm run server
npm run ui

访问 http://localhost:5173。

常用脚本

命令 说明
npm run ui 启动 Vite 开发服务
npm run build 构建前端静态资源
npm run server 启动 Cloudflare Pages Functions 本地服务
npm run deploy 构建并部署 Cloudflare Pages
npm run db:init 初始化本地 D1 表结构
npm run db:seed 写入本地种子用户
npm run db:init:remote 初始化远程 D1 表结构
npm run db:seed:remote 写入远程种子用户
npm run genhash 生成密码哈希

文档

  • 需求设计文档
  • 项目架构文档
  • 开发设计文档
  • 部署说明文档

早期可点击原型位于 prototype/。

部署摘要

完整步骤见 部署说明文档。概要如下:

  1. 创建 D1:wrangler d1 create class_calendar
  2. 将自己的 database_id 写入本地 wrangler.toml 和 worker-holidays/wrangler.toml
  3. 初始化远程表结构和种子数据:npm run db:init:remote、npm run db:seed:remote
  4. 创建 R2 bucket:wrangler r2 bucket create class-photos
  5. 在 Cloudflare Pages 配置 SESSION_SECRET
  6. 部署 Pages:npm run deploy
  7. 如需节假日同步,部署 worker-holidays/ 并配置 SYNC_KEY

贡献

欢迎通过 Issue 和 Pull Request 参与改进。提交前请阅读 CONTRIBUTING.md,并确保没有提交本地密钥、真实配置、真实账号数据或个人隐私数据。

交流与反馈

欢迎加入 Telegram 交流群,讨论使用问题、功能建议和项目更新。

❤️ 赞助支持

开源不易,如果这个项目帮到了你,可以请作者喝杯咖啡 ☕

国际用户可以通过 GitHub Sponsors 支持项目:

GitHub Sponsors

中国大陆用户可以使用微信或支付宝:

请我喝杯咖啡

📱 点击展开微信赞赏码 / 支付宝收款码

微信赞赏码 支付宝收款码

许可证

本项目基于 MIT License 开源。

About

孩子每日课程、课包消耗和上课记录的小型日历工具

class.shaoruiyi.com

Topics

cloudflare-d1cloudflare-pagescloudflare-r2course-calendarcourse-trackervitevue

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.