Nav apraksta

bob d035306afd feat: 新增产品落地页MarketingPage,完善个人中心Profile与帮助中心交互 1 nedēļu atpakaļ
deployment 0fd737b845 Update codebase 2 nedēļas atpakaļ
docs 0fd737b845 Update codebase 2 nedēļas atpakaļ
public ec39a2e209 feat: 优化UI界面与样式,新增帮助中心、页脚及联系客服交流群功能 1 nedēļu atpakaļ
sample 4671e08feb Initial commit 2 nedēļas atpakaļ
server d035306afd feat: 新增产品落地页MarketingPage,完善个人中心Profile与帮助中心交互 1 nedēļu atpakaļ
src d035306afd feat: 新增产品落地页MarketingPage,完善个人中心Profile与帮助中心交互 1 nedēļu atpakaļ
uploads 4671e08feb Initial commit 2 nedēļas atpakaļ
.dockerignore 0fd737b845 Update codebase 2 nedēļas atpakaļ
.env.example 4671e08feb Initial commit 2 nedēļas atpakaļ
.gitignore ac4e6e36ff feat: 完善课程制作进度、课程信息编辑与后台管理功能,优化UI交互 1 nedēļu atpakaļ
Dockerfile 0fd737b845 Update codebase 2 nedēļas atpakaļ
README.md 4671e08feb Initial commit 2 nedēļas atpakaļ
deploy.sh 0fd737b845 Update codebase 2 nedēļas atpakaļ
docker-compose.prod.yml 0fd737b845 Update codebase 2 nedēļas atpakaļ
docker-compose.yml 4671e08feb Initial commit 2 nedēļas atpakaļ
index.html 4671e08feb Initial commit 2 nedēļas atpakaļ
package-lock.json ac4e6e36ff feat: 完善课程制作进度、课程信息编辑与后台管理功能,优化UI交互 1 nedēļu atpakaļ
package.json 0fd737b845 Update codebase 2 nedēļas atpakaļ
tsconfig.app.json 4671e08feb Initial commit 2 nedēļas atpakaļ
tsconfig.json 4671e08feb Initial commit 2 nedēļas atpakaļ
tsconfig.node.json 4671e08feb Initial commit 2 nedēļas atpakaļ
tsconfig.node.tsbuildinfo 0fd737b845 Update codebase 2 nedēļas atpakaļ
vite.config.ts 0fd737b845 Update codebase 2 nedēļas atpakaļ

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:手动初始化数据库