nest登录后端
Go to file
golc 0a7d6c16c9 fix: 配置 Swagger UI 使用 CDN 资源
解决 Vercel serverless 环境中 SwaggerUIBundle 未定义的问题,
使用 jsDelivr CDN 加载 Swagger UI 静态资源。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 11:41:01 +00:00
api fix: 配置 Swagger UI 使用 CDN 资源 2026-03-04 11:41:01 +00:00
docs feat: 整理项目结构 2026-02-21 22:50:02 +08:00
scripts security: 移除所有硬编码的敏感信息 2026-02-24 14:03:57 +00:00
src fix: configure CORS for Vercel frontend domain 2026-02-25 11:53:44 +00:00
test feat: 初始化项目 2025-01-08 19:46:50 +08:00
.dockerignore feat: 添加管理员以及部署内容 2026-02-24 20:17:59 +08:00
.env.example feat: initial commit with Vercel CI/CD 2026-02-25 09:42:55 +00:00
.env.vercel feat: 配置 Vercel serverless 部署支持 2026-03-04 09:19:00 +00:00
.eslintrc.js feat: 初始化项目 2025-01-08 19:46:50 +08:00
.gitignore feat: initial commit with Vercel CI/CD 2026-02-25 09:42:55 +00:00
.prettierrc feat: 初始化项目 2025-01-08 19:46:50 +08:00
Dockerfile feat: 添加管理员以及部署内容 2026-02-24 20:17:59 +08:00
README.md feat: 整理项目结构 2026-02-21 22:50:02 +08:00
nest-cli.json feat: 初始化项目 2025-01-08 19:46:50 +08:00
package.json fix: 修复 Vercel 部署 404 和 Swagger 无法访问 2026-03-04 19:30:07 +08:00
pnpm-lock.yaml fix: 配置 Vercel serverless 部署 2026-03-04 09:58:09 +00:00
tsconfig.build.json feat: 初始化项目 2025-01-08 19:46:50 +08:00
tsconfig.json fix: 修复 Vercel serverless 运行时崩溃 2026-03-04 11:14:09 +00:00
vercel.json fix: 修正 NestJS 构建产物路径为 dist/src 2026-03-04 11:38:05 +00:00

README.md

OAuth NestJS Demo

A NestJS backend with multi-provider OAuth, JWT authentication, task management, and a license/activation key system.

Tech Stack

  • Framework: NestJS 10 + TypeScript
  • Database: MySQL + TypeORM
  • Auth: JWT, GitHub OAuth2, Lark OAuth2
  • API Docs: Swagger (/api)
  • Package Manager: pnpm

Getting Started

# Install dependencies
pnpm install

# Configure environment variables
cp .env.example .env  # then edit .env

# Start in development mode
pnpm run start:dev

See docs/QUICKSTART.md for a detailed setup guide.

Documentation

Document Description
QUICKSTART.md Quick start guide
OAuth-JWT-Integration.md OAuth and JWT integration
database-flow.md Database schema and data flow
LICENSE_SYSTEM.md License system overview
LICENSE_IMPLEMENTATION.md License implementation details
GENERATE_LICENSE_GUIDE.md License generation guide
HOW_TO_GENERATE.md License generation instructions

Scripts

Script Description
scripts/generate-licenses.sh Interactive license key generation
scripts/test-license-system.sh License system integration tests
scripts/check-db-schema.js Database schema validation
# Generate license keys
bash scripts/generate-licenses.sh

# Run license system tests
bash scripts/test-license-system.sh

Running the App

# Development
pnpm run start:dev

# Production build
pnpm run build
pnpm run start:prod

Tests

# Unit tests
pnpm run test

# E2E tests
pnpm run test:e2e

# Coverage
pnpm run test:cov

Project Structure

src/
├── auth/          # JWT auth, strategies, guards
├── common/        # Shared filters, interceptors, guards
├── user/          # User management
├── task/          # Task management
├── license/       # License/activation key system
├── github/        # GitHub OAuth provider
├── lark/          # Lark OAuth provider
├── deepseek/      # DeepSeek AI provider
└── constants/     # Shared constants
docs/              # Project documentation
scripts/           # Utility and test scripts
test/              # E2E tests