中学成绩档案(初中 / 高中)

Secondary School Grade Archive — 多用户 Web 系统:成绩录入、占比趋势分析、错题 OCR + 本地 AI 解法。

版权所有 © 马建军 · 微信 dekun03 · 手机 18364911125

COPYRIGHT.md · LICENSE

仓库: https://git.bz121.com/dekun/secondary-school-grade-archive.git


文档

文档 说明
docs/DEPLOY.md Ubuntu 零 Node 部署systemd + FastAPI 单进程)
docs/USAGE.md 用户使用说明

修改代码后如何发布(必读)

生产服务器不安装 Node.js,也不在服务器上执行 npm build
凡涉及前端或全栈改动的发布,均按以下流程在开发机完成构建后再推送:

开发机改代码 → 本地构建 frontend/dist → git push 远端仓库 → 服务器 git pull + update.sh

仅改后端(backend/

git add backend/
git commit -m "你的说明"
git push

服务器(需代理时先 export http_proxy=http://192.168.8.246:10810 等,见 DEPLOY.md §3):

bash /opt/secondary-school-grade-archive/deploy/update.sh

改前端或同时改前后端(frontend/

必须先本地构建,再把 frontend/dist 一并提交推送:

# Windows
.\deploy\build-frontend.ps1
# Linux / macOS
bash deploy/build-frontend.sh
git add frontend/ frontend/dist
git commit -m "你的说明"
git push

服务器(需代理时先 export http_proxy=http://192.168.8.246:10810 等,见 DEPLOY.md §3):

bash /opt/secondary-school-grade-archive/deploy/update.sh

若只推送源码而未推送 frontend/dist,服务器更新后页面不会变化。详见 docs/DEPLOY.md §2


Ubuntu 一键部署(零 Node

若服务器访问外网需走代理,先设置代理再执行安装

export http_proxy=http://192.168.8.246:10810
export https_proxy=http://192.168.8.246:10810
export HTTP_PROXY="$http_proxy"
export HTTPS_PROXY="$https_proxy"
git clone https://git.bz121.com/dekun/secondary-school-grade-archive.git /opt/secondary-school-grade-archive
cd /opt/secondary-school-grade-archive
chmod +x deploy/*.sh
bash deploy/install.sh

install.sh 会自动将代理用于 aptgitpipcurl。无需代理时可省略 export 步骤。

  • 安装目录:/opt/secondary-school-grade-archive
  • 访问地址:http://<服务器IP>:23566
  • 进程管理:systemctl status grade-archive / journalctl -u grade-archive -f
  • 默认超级管理员:admin / admin123(登录后请在「系统设置」中修改)

前提: 仓库中已包含 frontend/dist/(由开发机构建后推送)。详见 docs/DEPLOY.md反向代理不包含在本项目中。


本地开发

方式一:前后端分离(推荐日常开发)

# PostgreSQL 本地安装后
cp .env.example .env

cd backend
python3 -m venv venv
source venv/bin/activate   # Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reload --host 0.0.0.0 --port 23566

cd frontend
npm install && npm run dev

方式二:模拟生产(单进程 + 静态 dist)

cd frontend && npm run build
cd ../backend
source venv/bin/activate
uvicorn app.main:app --reload --host 0.0.0.0 --port 23566

访问 http://localhost:23566


运维

bash deploy/update.sh    # 拉代码 + 更新依赖 + 重启服务
bash deploy/backup.sh    # 备份
bash deploy/uninstall.sh # 停止并卸载

技术支持

微信 dekun03 · 手机 18364911125

S
Description
初中和高中学生档案 错题库
Readme 18 MiB
Languages
Python 43.7%
TypeScript 42%
Shell 11.4%
CSS 1.5%
JavaScript 0.8%
Other 0.6%