go wvp 是 Go 语言实现的开源 GB28181 解决方案,基于GB28181-2022标准实现的网络视频平台,支持 rtmp/rtsp,客户端支持网页版本和安卓 App。支持rtsp/rtmp等视频流转发到国标平台,支持rtsp/rtmp等推流转发到国标平台。
Golang 服务端实现 gb28181
当前项目是由 React 实现的 web 管理平台
前置要求: node.js > 20.x
- React 19
- TanStack Router
- shadcn/ui
- Vite 7
- Tailwind CSS 4 - 使用 @tailwindcss/vite 插件
- React Query
- TypeScript
- Biome - 代码格式化和 lint
路由跳转
import { useNavigate } from "@tanstack/react-router";
const navigate = useNavigate();
const handleClick = () => {
navigate({ to: '/about' });
}
// 带搜索参数的导航
navigate({ to: '/zones', search: { cid: '123' } });vite 配置代理
server: {
proxy: {
"/api": {
target: "http://localhost:18081",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ""),
},
},
},开发模式下,Vite 默认的开发服务器是以 / 为根路径运行的,而生产环境会以设置的 base 作为根路径。为了兼容开发模式和生产模式,可以按以下方式进行配置。
值为 ./ 会导致开发模式下出错
- 更新 vite.config.ts
base: mode === "development" ? "/" : "/web/",- 其它静态文件
<img src={`${import.meta.env.BASE_URL}assets/logo.avif`} alt="Logo" />yarn dev 加载 .env.development 环境变量
yarn build 加载 .env.production 环境变量
drawer 背景动画 需要使用 DrawerCSSProvider 包裹父组件,动画才生效
react-resizable-panels
导入 shadcn-ui 的 resizable ,需要额外执行
yarn add react-resizable-panels
vite.config.ts 需要增加以下配置,否则模块加载会出问题
ssr: {
// 外部化会导致问题的依赖项
noExternal: ["react-resizable-panels"],
},Start the development server with HMR:
npm run devYour application will be available at http://localhost:5173.
Create a production build:
npm run buildThis template includes three Dockerfiles optimized for different package managers:
Dockerfile- for npmDockerfile.pnpm- for pnpmDockerfile.bun- for bun
To build and run using Docker:
# For npm
docker build -t my-app .
# For pnpm
docker build -f Dockerfile.pnpm -t my-app .
# For bun
docker build -f Dockerfile.bun -t my-app .
# Run the container
docker run -p 3000:3000 my-appThe containerized application can be deployed to any platform that supports Docker,


