Skip to content

Commit

Permalink
docs: 完善 README
Browse files Browse the repository at this point in the history
  • Loading branch information
wanglu committed Apr 12, 2022
1 parent b2ee50f commit c398547
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 26 deletions.
63 changes: 38 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,46 @@
# Van Nav
一个轻量的私人导航站 / 工具站。

![预览](images/website.png)
![后台设置](images/admin-overview.png)

## 故事
作为一个喜欢折腾的人,总会时不时的发现什么好项目,尤其是每当 web 项目,第一个想法就是把他拔下来,放到自己的服务器上。23333。
一个轻量的导航站。

但是网站和项目越来越多,网址太多了记不住,放收藏夹换设备和浏览器或者给别人发的时候不方便(我设备比较多)。
<div style="display:flex; justify-content: center;" ><img src="images/pc-light.png" alt="预览 PC "/></div>
<div style="display:flex; justify-content: center;" ><img src="images/pc-dark.png" alt="预览 PC "/></div>
<div style="display:flex; justify-content: center;" ><img src="images/pad-light.png" alt="预览 PAD "/></div>
<div style="display:flex; justify-content: center;" ><img src="images/pad-dark.png" alt="预览 PAD "/></div>
<div style="display: flex; justify-content: center;"><img width=450 src="images/phone-light.png"/></div>
<div style="display: flex; justify-content: center;"><img width=450 src="images/phone-dark.png"/></div>

所以就想着做一个自己的导航站(我更想称之为“应用面板”)

于是就有了这个玩意,最开始没想开源写着练手玩的,和我的博客管理面板深度耦合了。后来想解耦,用了 `strapi` 方案,但是有个缺点,打包成镜像太大了,`1.7GB`啊。就一个增删改查的导航站,咱至于吗?
![后台设置](images/admin-overview.png)

后来用 node 其他框架实现,但是逐渐发现打包和分发不太方便。
## 使用方法
### Docker

那用 go 写?——某一天突发奇想。
```
docker run -d --name tools --restart always -p 6412:6412 -v /path/to/your/data:/app/data mereith/van-nav:latest
```

于是就有了这个项目~
打开浏览器 [http://localhost:6412](http://localhost:6412) 即可访问。

单独一个二进制文件,支持各种平台,直接运行就搞定,数据库为 `sqlite`,可迁移性很赞。打包成容器也美滋滋,所以就开源咯。
- 默认端口 6412
- 默认账号密码 admin admin ,第一次运行后请进入后台修改
- 数据库会自动创建在当前文件夹中: `nav.db`

但是因为 go 是刚学的,踩了不少坑,我会慢慢优化代码结构的,暂时就一个 `main.go` 吧。。。

### 可执行文件

## 使用方法
下载 release 文件夹里面对应平台的二进制文件,直接运行即可。

打开浏览器 [http://localhost:8233](http://localhost:8233) 即可访问。
打开浏览器 [http://localhost:6412](http://localhost:6412) 即可访问。

- 默认端口 8233
- 默认账号密码 admin admin ,第一次运行后请进入后台修改
- 默认端口 6412
- 默认账号密码 admin admin ,第一次运行后请进入后台修改
- 数据库会自动创建在当前文件夹中: `nav.db`

## nginx 反向代理

参考配置

> 其中 `<yourhost>``<your-cert-path>` 替换成你自己的。
```
server {
listen 80;
Expand All @@ -51,7 +57,7 @@ server {
ssl_verify_client off;
proxy_ssl_verify off;
location / {
proxy_pass http://127.0.0.1:8233;
proxy_pass http://127.0.0.1:6412;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Expand All @@ -61,15 +67,22 @@ server {
}
}
```
## API
本导航站支持 API,可以用自己的方法添加工具。

文档待完成...
## 状态

## 参与项目
可以优化的点太多了,慢慢完善吧……

- [x] 多平台构建流水线
- [x] 定制化 logo 和标题
- [x] 导入导出功能
- [ ] 私有分类功能,对外隐藏
- [x] 主题切换
- [x] 暗色主题切换
- [x] 移动端优化


- [x] 自动获取网站 logo
- [x] 拼音匹配的模糊搜索功能
- [x] 按键直接搜索,搜索后回车直接打开第一项
- [ ] 国际化
- [ ] 浏览器插件
- [ ] 网站状态检测
Binary file removed images/add-tool.png
Binary file not shown.
Binary file removed images/admin-overview.png
Binary file not shown.
Binary file removed images/login.png
Binary file not shown.
Binary file added images/pad-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/pad-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/pc-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/pc-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/phone-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/phone-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/setting.png
Binary file not shown.
Binary file removed images/website.png
Binary file not shown.
2 changes: 1 addition & 1 deletion ui/website/src/components/SearchBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const SearchBar = (props: SearchBarProps) => {
<input
id="search-bar"
type="search"
placeholder="按回车键聚焦并搜索应用"
placeholder="按任意键开始搜索应用"
value={props.searchString}
onChange={(ev) => {
const v = ev.target.value.trim();
Expand Down

0 comments on commit c398547

Please sign in to comment.