初始化 pay-bridge 项目:PRD、需求文档和项目框架
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
51
CLAUDE.md
Normal file
51
CLAUDE.md
Normal file
@@ -0,0 +1,51 @@
|
||||
# CLAUDE.md
|
||||
|
||||
本文件为 Claude Code (claude.ai/code) 在此仓库中工作时提供指导。
|
||||
|
||||
## 项目概述
|
||||
|
||||
**pay-bridge** 是一个前后端一体的全栈应用,前端使用 React,后端使用 Go。目前处于早期/模板阶段。
|
||||
|
||||
- **前端**: React
|
||||
- **后端**: Go (Go 1.25)
|
||||
|
||||
## 构建与运行命令
|
||||
|
||||
### 后端
|
||||
|
||||
```bash
|
||||
# 运行
|
||||
go run main.go
|
||||
|
||||
# 构建
|
||||
go build -o pay-bridge .
|
||||
|
||||
# 测试
|
||||
go test ./...
|
||||
|
||||
# 运行单个测试
|
||||
go test -run TestName ./path/to/package
|
||||
|
||||
# 代码检查
|
||||
go vet ./...
|
||||
```
|
||||
|
||||
### 前端
|
||||
|
||||
```bash
|
||||
# 安装依赖
|
||||
cd frontend && npm install
|
||||
|
||||
# 开发服务器
|
||||
cd frontend && npm run dev
|
||||
|
||||
# 构建
|
||||
cd frontend && npm run build
|
||||
```
|
||||
|
||||
## 架构
|
||||
|
||||
前后端一体的 monorepo 项目。
|
||||
|
||||
- **后端**: Go 模块 (`module pay-bridge`),提供 API 服务并托管前端静态资源。遵循 Go 标准目录结构 (`cmd/`, `internal/`, `pkg/`)。
|
||||
- **前端**: React 应用,位于 `frontend/` 目录。
|
||||
Reference in New Issue
Block a user