Skip to content

Repository files navigation

校园助手 · Campus Assistant

学生课程、作业与学校学习资料桌面助手

中文 · English


中文

项目简介

校园助手是一款面向学生的 Windows 桌面应用,将课程表、手动作业和学校学习资料集中到一个清晰的界面中。

本项目默认使用学校网站的授权学生接口。请仅在获得授权的账号和符合学校规定的情况下使用。

功能

  • 校园账号登录:通过学校 HTTPS 接口登录;会话令牌使用 Electron safeStorage 加密保存,不保存密码。
  • 实时课程状态:显示当天全部课程,并自动标记“已完成”“正在上课”和“下一节”;每 30 秒更新一次。
  • 课程表:同步当前周课程,显示时间、教师和教室。
  • 手动作业:用户自己添加作业、学科、截止日期和备注,完成后手动勾选。
  • 资料浏览器:按照 Windows 文件资源管理器风格逐层浏览学校网站的远程目录,不下载或复制 PDF;双击文件可在线打开原始资料。
  • 外观设置:支持预设/自定义配色、本地背景图片、本地头像和恢复默认设置。
  • 本地数据:作业和外观设置保存在本机,不上传到学校网站。

技术栈

  • Electron
  • React + TypeScript
  • Vite
  • Electron Builder
  • Lucide React

开发环境

需要:

  • Node.js 22+
  • npm
  • Windows(当前桌面打包配置面向 Windows)

安装依赖:

npm install

启动开发模式:

npm run dev

构建前端:

npm run build

生成 Windows 安装包:

npm run dist

项目结构

src/
  App.tsx              主界面与课程/作业页面
  ExplorerLibrary.tsx  Windows 风格远程资料浏览器
  SettingsModal.tsx    外观设置
  styles.css           全局样式
  main.tsx             React 入口

electron/
  main.cjs             Electron 主进程、学校接口和本地数据
  preload.cjs          安全 IPC 桥接

隐私与安全

  • 不要把学校账号、密码、Cookie、Token 或本地用户数据提交到 Git。
  • .gitignore 已排除 .envnode_modulesdist、本地数据库、用户数据和凭据文件。
  • 应用只访问 https://www.huayaopudong.com 的允许接口和资料地址。
  • PDF 资料只在线打开,不在应用中批量下载或镜像保存。
  • 提交到公开仓库前,请再次检查 Git 历史中没有敏感信息。

真实接口

应用使用学校网站现有接口完成:

  • /api/login
  • /api/public/user_info
  • /api/students/schedule/{studentId}/{week}
  • /api/library/get_all_pastpaper

接口结构可能随学校网站更新而变化。如果登录、课程表或资料目录发生变化,需要同步调整 electron/main.cjs

返回顶部


English

Overview

Campus Assistant is a Windows desktop application for students. It brings the timetable, manually managed homework, and school learning resources into one clear workspace.

This project is intended to use authorized student accounts and existing school APIs only. Please follow your school's policies and terms of use.

Features

  • School account login: Connects through the school's HTTPS endpoints. Session tokens are encrypted with Electron safeStorage; passwords are not stored.
  • Live class status: Shows all classes for today and labels them as Completed, In progress, or Next. The status refreshes every 30 seconds.
  • Weekly timetable: Displays synchronized class times, teachers, and rooms.
  • Manual homework tracking: Add your own homework, subject, due date, and notes, then check items off manually.
  • Resource explorer: Browse the school's remote directory like Windows File Explorer. PDFs are not downloaded or copied; double-clicking opens the original remote file online.
  • Appearance settings: Preset/custom colors, a local background image, a local avatar, and reset-to-default support.
  • Local data: Homework and appearance preferences stay on the local computer and are not uploaded to the school website.

Tech Stack

  • Electron
  • React + TypeScript
  • Vite
  • Electron Builder
  • Lucide React

Requirements

  • Node.js 22+
  • npm
  • Windows for the current desktop packaging configuration

Install dependencies:

npm install

Start development mode:

npm run dev

Build the frontend:

npm run build

Build a Windows installer:

npm run dist

Project Structure

src/
  App.tsx              Main UI and timetable/homework pages
  ExplorerLibrary.tsx  Windows-style remote resource explorer
  SettingsModal.tsx    Appearance settings
  styles.css           Global styles
  main.tsx             React entry point

electron/
  main.cjs             Electron main process, school APIs, and local data
  preload.cjs          Secure IPC bridge

Privacy and Security

  • Never commit school usernames, passwords, cookies, tokens, or local user data.
  • .gitignore excludes .env, node_modules, dist, local databases, user data, and credential files.
  • The application only accesses allowlisted HTTPS endpoints and resource URLs on www.huayaopudong.com.
  • PDFs are opened online and are not bulk-downloaded or mirrored by the application.
  • Check Git history for sensitive data before making the repository public.

School API Integration

The application currently uses these existing school endpoints:

  • /api/login
  • /api/public/user_info
  • /api/students/schedule/{studentId}/{week}
  • /api/library/get_all_pastpaper

The website may change its API structure. If login, timetable, or resource browsing changes, update electron/main.cjs accordingly.

Back to top

About

让你更轻松地查看本校课表和资料

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages