Нема описа

bob 4671e08feb Initial commit пре 2 недеља
sample 4671e08feb Initial commit пре 2 недеља
server 4671e08feb Initial commit пре 2 недеља
src 4671e08feb Initial commit пре 2 недеља
uploads 4671e08feb Initial commit пре 2 недеља
.env.example 4671e08feb Initial commit пре 2 недеља
.gitignore 4671e08feb Initial commit пре 2 недеља
Dockerfile 4671e08feb Initial commit пре 2 недеља
README.md 4671e08feb Initial commit пре 2 недеља
docker-compose.yml 4671e08feb Initial commit пре 2 недеља
index.html 4671e08feb Initial commit пре 2 недеља
package-lock.json 4671e08feb Initial commit пре 2 недеља
package.json 4671e08feb Initial commit пре 2 недеља
tsconfig.app.json 4671e08feb Initial commit пре 2 недеља
tsconfig.app.tsbuildinfo 4671e08feb Initial commit пре 2 недеља
tsconfig.json 4671e08feb Initial commit пре 2 недеља
tsconfig.node.json 4671e08feb Initial commit пре 2 недеља
tsconfig.node.tsbuildinfo 4671e08feb Initial commit пре 2 недеља
vite.config.ts 4671e08feb Initial commit пре 2 недеља

README.md

星痕 · 智能课程工坊

首版 MVP 包含课程创建、PPT 课件上传、素材确认和提交制作。课程提交后进入“等待制作”状态。

技术组成

  • React + Vite + TypeScript
  • Fastify Server
  • PostgreSQL
  • PPT 文件保存在服务器本地持久目录,PostgreSQL 保存课程和文件元数据

本地启动

  1. 复制环境配置:cp .env.example .env
  2. 启动 PostgreSQL:docker compose up -d postgres
  3. 安装依赖:npm install
  4. 启动前后端:npm run dev
  5. 打开 http://localhost:5173

Server 启动时会自动创建所需的数据表。

公网部署

推荐在带持久磁盘的 Linux 云服务器运行:

docker compose up -d --build

应用默认监听 3001 端口。生产环境应使用 Caddy 或 Nginx 配置域名、HTTPS 和反向代理,并修改 docker-compose.yml 中的 PostgreSQL 密码。

postgres_datauploads_data 都是持久卷。部署时必须备份这两个卷;若使用无状态或 Serverless 平台,本地上传文件可能在重启时丢失,应先迁移至对象存储。

常用命令

  • npm run dev:开发模式
  • npm run build:生产构建
  • npm run check:TypeScript 检查
  • npm start:启动生产 Server
  • npm run db:migrate:手动初始化数据库