Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Sample (Rednote Demo)

一个类小红书的图文笔记发布与查看 Demo。支持快速创建包含标题、正文及图片的笔记,并生成公开访问链接进行在线查看。

🛠️ 技术栈

  • 前端 (Frontend): React 18, TypeScript, Vite, React Router
  • 后端 (Backend): Go (原生 HTTP 服务)

📁 目录结构

.
├── cmd/             # Go 后端入口 (main.go)
├── internal/        # 后端核心业务逻辑 (handler, service, repository, model)
├── frontend/        # React 前端工程
├── uploads/         # 本地图片上传存储目录
├── docs/            # 设计与开发文档
└── start.sh         # 一键启动脚本

🚀 快速开始

方式一:一键脚本启动

在根目录下直接运行:

chmod +x start.sh
./start.sh

脚本将自动完成以下操作:

  1. 启动 Go 后端服务(运行于 http://localhost:8080
  2. 安装前端依赖并启动 Vite 开发服务器(运行于 http://localhost:5173

方式二:手动分步启动

1. 启动后端服务

go run cmd/main.go

后端服务默认监听端口:8080

2. 启动前端服务

cd frontend
npm install
npm run dev

前端服务默认监听端口:5173

📖 核心功能路径

  1. 发布笔记:进入首页 http://localhost:5173/,填写标题、正文并上传 1 张图片,点击发布。
  2. 生成链接:发布成功后获取公开访问链接(如 http://localhost:5173/notes/:id)。
  3. 查看笔记:在任意浏览器窗口中打开链接,即可体验只读笔记页面。

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages