官网 初版

This commit is contained in:
rucky
2026-03-18 17:13:27 +08:00
parent 879c4bdfc8
commit 241a76caeb
95 changed files with 8889 additions and 113 deletions

View File

@@ -1,36 +1,74 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
# Nanami Web - WoW Addon Platform
## Getting Started
World of Warcraft 插件发布与下载平台。
First, run the development server:
## 技术栈
- **框架**: Next.js 16 (App Router)
- **语言**: TypeScript
- **UI**: TailwindCSS + shadcn/ui
- **数据库**: PostgreSQL + Prisma ORM
- **认证**: NextAuth.js (Credentials Provider)
- **部署**: Docker + docker-compose
## 本地开发
### 前置条件
- Node.js 20+
- PostgreSQL 16+
### 安装
```bash
npm install
cp .env.example .env
# 编辑 .env 中的 DATABASE_URL 和其他配置
```
### 数据库设置
```bash
# 推送 schema 到数据库
npm run db:push
# 初始化管理员账号和示例数据
npm run db:seed
```
### 启动开发服务器
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
访问 http://localhost:3000 查看前台,http://localhost:3000/admin 进入后台管理。
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
默认管理员账号:`admin` / `admin123`
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
## Docker 部署
## Learn More
```bash
# 启动所有服务
docker compose up -d
To learn more about Next.js, take a look at the following resources:
# 初始化数据库
docker compose exec app npx prisma db push
docker compose exec app npx tsx prisma/seed.ts
```
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
## 项目结构
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
## Deploy on Vercel
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
```
src/
├── app/
│ ├── (public)/ # 前台页面
│ ├── admin/ # 后台管理
│ └── api/ # API 路由
├── components/
│ ├── ui/ # shadcn/ui 组件
│ ├── public/ # 前台组件
│ └── admin/ # 后台组件
├── lib/ # 工具库
└── types/ # 类型定义
```