├── .github
└── ISSUE_TEMPLATE
│ ├── bug.yaml
│ ├── config.yml
│ └── feature.yaml
├── .gitignore
├── CHANGELOG.md
├── LICENSE
├── README.md
├── app
├── apps.yml
└── bookmarks.yml
├── docker-compose.yml
├── docs
├── advanced-startup.md
├── application-account.md
└── material-design-icons.md
├── example
├── login
│ └── docker-compose.yml
├── private
│ └── docker-compose.yml
└── traefik
│ └── docker-compose.yml
└── screenshots
├── docker-image-size.png
├── docker-pulls.png
├── editor-beta.png
├── flare-guide.png
├── flare-help.png
├── icon-cheat-sheets.png
├── lighthouse.png
└── ui.png
/.github/ISSUE_TEMPLATE/bug.yaml:
--------------------------------------------------------------------------------
1 | name: 错误反馈
2 | description: 反馈一个八阿哥
3 | labels: [八阿哥 🐛, 悬而未决 🥷]
4 | assignees:
5 | - soulteary
6 | body:
7 | - type: markdown
8 | attributes:
9 | value: |
10 | 感谢你对于 Flare 感兴趣,请根据你的想法填写下面的表格。
11 | - type: textarea
12 | id: what-happened
13 | attributes:
14 | label: 你遇到了什么样的麻烦?
15 | description: 除了描述遇到的问题之外,也请描述你预期的功能结果。
16 | validations:
17 | required: true
18 | - type: textarea
19 | id: reproducible
20 | attributes:
21 | label: 如何复现这个问题?
22 | description: 简单描述如何遇到这个问题,你可以在这里添加图片、日志等帮助我来理解你遇到的问题。
23 | validations:
24 | required: true
25 | - type: textarea
26 | id: app-version
27 | attributes:
28 | label: 应用版本
29 | description: 你使用的程序或镜像版本是?
30 | validations:
31 | required: true
32 | - type: checkboxes
33 | id: search
34 | attributes:
35 | label: 搜索
36 | options:
37 | - label: 在提交这个表格之前,我已经进行了相关问题搜索,没有找到相关的问题或解决方案。
38 | required: true
39 | - type: textarea
40 | id: ctx
41 | attributes:
42 | label: 补充描述
43 | description: 可以在这里填写要补充的内容
44 | validations:
45 | required: false
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature.yaml:
--------------------------------------------------------------------------------
1 | name: 功能建议
2 | description: 请求添加一个功能,或者建议对现有功能进行完善
3 | labels: [申请功能 🎁, 悬而未决 🥷]
4 | assignees:
5 | - soulteary
6 | body:
7 | - type: markdown
8 | attributes:
9 | value: |
10 | 感谢你对于 Flare 感兴趣,请根据你的想法填写下面的表格。
11 | - type: textarea
12 | id: is-it-a-problem
13 | attributes:
14 | label: 请描述你为什么要申请这个功能,是在使用的过程中遇到了什么问题嘛?
15 | description: 请对你遇到的问题进行简单、清晰的描述。
16 | validations:
17 | required: true
18 | - type: textarea
19 | id: solution
20 | attributes:
21 | label: 请描述你想要得到的结果
22 | description: 对你想要的结果进行清晰的描述。
23 | validations:
24 | required: true
25 | - type: textarea
26 | id: alternatives
27 | attributes:
28 | label: 请描述你想要的替代方案
29 | description: 对你想要的替代方案进行清晰的描述。
30 | validations:
31 | required: true
32 | - type: checkboxes
33 | id: search
34 | attributes:
35 | label: 搜索
36 | options:
37 | - label: 在提交这个表格之前,我已经进行了相关问题搜索,没有找到相关的问题或解决方案。
38 | required: true
39 | - type: textarea
40 | id: ctx
41 | attributes:
42 | label: 补充描述
43 | description: 可以在这里填写要补充的内容
44 | validations:
45 | required: false
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | app/*.yml
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # 变更记录
2 |
3 | 项目应用中的所有变更记录,将在这个文件中进行存档。
4 |
5 | ## 目录
6 |
7 | * [0.5.1](#050---2024-01-06)
8 | * [0.5.0](#050---2024-01-05)
9 | * [0.4.3](#043---2023-12-07)
10 | * [0.4.2](#042---2023-12-06)
11 | * [0.4.1](#041---2023-05-07)
12 | * [0.4.0](#040---2022-09-17)
13 | * [0.3.3](#033---2022-03-10)
14 | * [0.3.2](#032---2022-02-23)
15 | * [0.3.1](#031---2022-02-23)
16 | * [0.2.10](#027---2022-02-21)
17 | * [0.2.9](#027---2022-02-20)
18 | * [0.2.8](#027---2022-02-18)
19 | * [0.2.7](#027---2022-02-17)
20 | * [0.2.6](#026---2022-02-17)
21 | * [0.2.5](#025---2022-02-16)
22 | * [0.2.4](#024---2022-02-11)
23 | * [0.2.3](#023---2022-02-08)
24 | * [0.2.1](#021---2022-02-07)
25 | * [0.2.0](#020---2022-01-30)
26 | * [0.1.0](#010---2022-01-27)
27 |
28 | # 0.5.1 - 2024-01-06
29 |
30 | - [修正] 修正 .env 文件读取时的逻辑。
31 | - [优化] 完善程序解析参数时的测试覆盖率。
32 |
33 | # 0.5.0 - 2024-01-05
34 |
35 | - [优化] 使用 Go 新版日志工具替换三方日志库,性能提升。
36 | - [修正] 修正一个 HTML Tag 笔误。( 感谢 @LightAPIs 同学 #37 )
37 | - [修正] 修正华为手机访问时的样式问题。( 感谢 @LightAPIs 同学 #38 )
38 | - [修正] 修正一个潜在的程序隐患,让程序运行更加稳定。
39 | - [优化] 完善程序解析参数时的测试覆盖率。
40 |
41 | # 0.4.3 - 2023-12-07
42 |
43 | - [修正] 修正因为 Golang 版本更新,导致的模版解析出现的展示异常。
44 |
45 | # 0.4.2 - 2023-12-06
46 |
47 | 这个版本,特别感谢 @LightAPIs 的提交。
48 |
49 | - [新增] 根据环境,进行动态链接的展示和切换。(感谢 @hanuxxx 、@ztzheng 两位同学的反馈)
50 | - [修正] 修正了一些使用场景下,加密链接转换的问题 https://github.com/soulteary/docker-flare/issues/119 (感谢 @sungamma 的反馈)
51 | - [修正] 编辑器现在可以自由排序内容了 https://github.com/soulteary/docker-flare/issues/124 (感谢 @elvescn 的反馈)
52 | - [修正] 编辑器的标签写反的问题。https://github.com/soulteary/docker-flare/issues/48 (感谢 @shp2814560)反馈
53 | - [修正] 编辑器的展示问题和某些情况下读取 `.env` 文件存在的问题,多实例部署 `session` 干扰的问题,错误提示的一些问题。
54 | - [优化] Golang 版本升级至最新的 1.21,相关依赖进行升级调整,GitHub 构建工具修正。
55 |
56 | # 0.4.1 - 2023-05-07
57 |
58 | - [修正] 感谢 @LightAPIs,修正了 Windows 环境下的 ICON 生成展示问题,及三处界面细节问题。https://github.com/soulteary/flare/releases/tag/0.4.1 https://github.com/soulteary/docker-flare/issues/70 (感谢 @liushuaiiu 的反馈)
59 |
60 | # 0.4.0 - 2022-09-17
61 |
62 | - [新增] 支持关闭程序的 CSP 策略,允许用户自由选择添加“统计脚本”(如GA)。 https://github.com/soulteary/docker-flare/issues/72 (感谢 @onmpen 反馈问题)
63 | - [新增] 支持了新的架构 ARM32v6,现在程序可以跑在更多的设备上了。
64 | - [新增] 新增了 Linux 和 macOS 操作系统可以直接运行的程序。https://github.com/soulteary/flare/releases/tag/0.4.0 https://github.com/soulteary/docker-flare/issues/35 (感谢 @ToSeeAll 的提问)
65 | - [修正] 重新调整了登陆相关逻辑,确保各种浏览器都能够正确处理跳转逻辑。https://github.com/soulteary/docker-flare/issues/68 (感谢 @hzmabin 反馈问题)
66 | - [修正] 修正全站需要登陆的时候,不展示自定义页脚的问题。https://github.com/soulteary/docker-flare/issues/77 (感谢 @404gods 反馈问题)
67 | - [修正] 修正关闭组件时,不展示日期的问题。https://github.com/soulteary/docker-flare/issues/44 (感谢 @shuax 反馈问题)
68 | - [优化] 拆分和重构程序,进行部分功能调整和问题修正,提升项目质量,为接下来支持新功能做准备。 https://github.com/soulteary/flare/compare/v0.0.17...0.4.0
69 | - [优化] 改进构建方式,将构建迁至 GitHub Action,让构建更透明,大家用的更放心。🎉
70 |
71 | 最后,感谢 @@JKnuts 在我不在的日子里,为其他同学解答问题♥️
72 |
73 | # 0.3.3 - 2022-03-10
74 |
75 | - [新增] 支持从 envfile 中设置应用启动选项。
76 | - [修正] 现在支持完全从 env 中设置应用启动配置,实现诸如禁用离线模式,设置用户账号密码等。
77 | - [修正] DockerHub 中镜像版本不是最新内容。https://github.com/soulteary/docker-flare/issues/43 (感谢 @flashliao @shuax @ZhXWei 反馈 )
78 | - [修正] 禁用界面应用选项后,帮助界面不展示内容。 https://github.com/soulteary/docker-flare/issues/39 (感谢 @harrison-guo-chn 反馈)
79 | - [优化] 禁用 Chrome 默认弹出烦人的翻译对话框。 https://github.com/soulteary/docker-flare/issues/41 (感谢 @shuax 反馈)
80 | - [优化] 新增界面选项,不再强制界面中的英文展示为大写。 https://github.com/soulteary/docker-flare/issues/31 (感谢 @llussy @kscu 反馈)
81 | - [优化] 拆分和重构程序构建脚本,为自定义主题做准备。
82 |
83 | # 0.3.2 - 2022-02-23
84 |
85 | - [修正] 解决不能正确设置主题的问题,参考 https://github.com/soulteary/docker-flare/issues/26 感谢 @kx 反馈。
86 |
87 | # 0.3.1 - 2022-02-23
88 |
89 | 当前版本新增了四个功能,并进行了大规模的重构,整理和开放了一部分代码。
90 |
91 | - [新增] 图标支持使用外链、支持针对未填写图标名称或外链图标地址的项目,根据连接主机名称进行 favicon 获取和展示。 https://github.com/soulteary/docker-flare/issues/14 (感谢 @lmm214 @eallion 反馈)
92 | - [新增] 将首页内容设置为登陆后可见。 https://github.com/soulteary/docker-flare/issues/23 ( 感谢 @OTritium 反馈)
93 | - [新增] 将首页左下角的工具按钮(设置、帮助)在界面中进行隐藏。 https://github.com/soulteary/docker-flare/issues/20 (感谢 @fgprodigal 反馈)
94 | - [新增] 支持将页面展示的链接进行简单的编码处理,避免直接被搜索引擎或机器人记录。
95 | - [优化] 重构和持续迭代项目,整理了 10% 左右的代码到 https://github.com/soulteary/flare
96 |
97 | # 0.2.10 - 2022-02-21
98 |
99 | 当前版本主要修正了编辑器的使用问题,以及更新了帮助页面展示的功能链接。
100 |
101 | - [修正] 修正编辑器不能使用的问题。 https://github.com/soulteary/docker-flame/issues/2 (感谢 @Mantyke 反馈)
102 | - [优化] 完善帮助页面的功能链接。
103 |
104 | # 0.2.9 - 2022-02-20
105 |
106 | 当前版本新增了在线编辑功能,以及一个用于聚合内部工具地址的帮助页面,完善了程序启动时和环境变量以及命令行参数的交互,并进行了大量重构工作。
107 |
108 | - [新增] 新增在线编辑器功能,解决一些小伙伴提到的“随时随地”编辑的需求。 https://github.com/soulteary/docker-flare/issues/11
109 | - [新增] 考虑到接下来随着程序功能完善,内部工具链接会越来越多,新增一个“帮助页面”,将程序内置链接集中存放和展示。 https://github.com/soulteary/docker-flare/issues/19 https://github.com/soulteary/docker-flare/issues/14#issuecomment-1044430872 (感谢 @lmm214 提醒 )
110 | - [优化] 调整部分程序内部链接,并新增废弃提醒(可通过命令行或环境变量进行关闭),完善程序日志输出实现,重构部分功能,为之后完全开源做准备。
111 | - [优化] 重构程序初始化相关功能,程序目前支持使用命令行参数和环境变量两种方式来进行初始化。 https://github.com/soulteary/docker-flare/issues/5 (感谢 @flashliao 建议)
112 |
113 | # 0.2.8 - 2022-02-18
114 |
115 | 当前版本优化了三个用户反馈的小细节。
116 |
117 | - [优化] 添加了搜索返回功能。 https://github.com/soulteary/docker-flare/issues/10 (感谢 @eallion 建议)
118 | - [优化] 简单调整了移动端展示,下一步计划先开放模版和自定义主题。 https://github.com/soulteary/docker-flare/issues/6 (感谢 @flashliao 建议)
119 | - [新增] 为容器镜像添加了 `latest` 标签。 https://github.com/soulteary/docker-flare/issues/8 https://github.com/soulteary/docker-flare/issues/7 (感谢 @viticis @eallion 建议)
120 |
121 | ## 0.2.7 - 2022-02-17
122 |
123 | 当前版本优化了一个小细节,以及修正了一个用户反馈的问题。
124 |
125 | - [优化] 在非离线模式下,当用户首次使用程序,或程序配置中的 Location 字段为空的时候,将尝试使用 IPIP 的免费接口来自动进行定位,减少不必要的用户输入操作。(感谢 IPIP.net 高春辉大叔的帮忙!)
126 | - [修正] 程序出现设置选项回显不正确的问题,https://github.com/soulteary/docker-flare/issues/7 (感谢 @viticis 小伙伴的反馈)
127 |
128 | ## 0.2.6 - 2022-02-17
129 |
130 | 当前版本新增了一个简单的功能,“使用向导”,相比较阅读文章,十几秒钟的交互引导会更直观一些。
131 |
132 | - [新增] 用户使用向导,访问 `/guide` 即可使用,如果不需要这个功能,可以在环境变量中配置 `FLARE_GUIDE=0` 来关闭功能。
133 |
134 | ## 0.2.5 - 2022-02-16
135 |
136 | 当前版本调整内容比较多,程序配置文件新增了一些配置项,请留意文档或阅读博客文章。
137 |
138 | 如果你不希望手动调整程序配置文件,可以在备份当前数据目录 `app` 后,将其中的程序配置文件 `app/config.yml` 删除,重启应用,让程序自动生成新版配置文件。
139 |
140 | - [新增] 用户登陆,让公网部署的小伙伴不必担心被陌生人随便修改配置的问题。
141 | - [新增] 免登陆模式,让 HomeLab、本地运行 Flare 的小伙伴,保持使用上的简单。
142 | - [新增] 离线模式,让 Flare 不访问任何公网资源。目前 Flare 仅会调用 issue[#4](https://github.com/soulteary/docker-flare/issues/4) 中提到的 `https://wis.qq.com/weather/common` 接口。
143 | - [新增] 允许用户在页脚自定义展示内容,方便设置诸如个人信息、备案号、用户自己的网站统计脚本等。
144 | - [新增] 允许用户对首页的问候语进行自定义设置,支持设置固定问候语,或根据早晨、中午、下午、晚上几个不同时间段展示不同的内容。
145 | - [优化] 完善应用启动日志输出,方便用户反馈问题。
146 | - [优化] 整理和重构部分代码实现,优化应用渲染性能。
147 |
148 | ## 0.2.4 - 2022-02-11
149 |
150 | 解决用户 @ember-zhang 提出的特殊链接渲染和跳转问题,支持了服务端跳转[#3](https://github.com/soulteary/docker-flare/issues/3)。
151 |
152 | ## 0.2.3 - 2022-02-07
153 |
154 | 针对应用链接的样式进行调整,让“应用”之间的距离稍微大一些。
155 |
156 | 修正了用户 @SandZhSand 反馈的在 Firefox 下“应用”书签的一个样式兼容性问题。
157 |
158 | ## 0.2.1 - 2022-02-07
159 |
160 | 完善构建脚本,支持在常见的 ARM 设备上直接运行。
161 |
162 | ## 0.2.0 - 2022-01-30
163 |
164 | 项目数据存储相关功能重构,使用 yaml 配置进行数据持久化,让应用更加轻量。
165 |
166 | ## 0.1.0 - 2022-01-27
167 |
168 | 项目初始化。编写简单的文档,完成基础展示功能,使用 SQLite 进行数据持久化,添加链接图标辅助工具。
169 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Creative Commons Legal Code
2 |
3 | CC0 1.0 Universal
4 |
5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12 | HEREUNDER.
13 |
14 | Statement of Purpose
15 |
16 | The laws of most jurisdictions throughout the world automatically confer
17 | exclusive Copyright and Related Rights (defined below) upon the creator
18 | and subsequent owner(s) (each and all, an "owner") of an original work of
19 | authorship and/or a database (each, a "Work").
20 |
21 | Certain owners wish to permanently relinquish those rights to a Work for
22 | the purpose of contributing to a commons of creative, cultural and
23 | scientific works ("Commons") that the public can reliably and without fear
24 | of later claims of infringement build upon, modify, incorporate in other
25 | works, reuse and redistribute as freely as possible in any form whatsoever
26 | and for any purposes, including without limitation commercial purposes.
27 | These owners may contribute to the Commons to promote the ideal of a free
28 | culture and the further production of creative, cultural and scientific
29 | works, or to gain reputation or greater distribution for their Work in
30 | part through the use and efforts of others.
31 |
32 | For these and/or other purposes and motivations, and without any
33 | expectation of additional consideration or compensation, the person
34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35 | is an owner of Copyright and Related Rights in the Work, voluntarily
36 | elects to apply CC0 to the Work and publicly distribute the Work under its
37 | terms, with knowledge of his or her Copyright and Related Rights in the
38 | Work and the meaning and intended legal effect of CC0 on those rights.
39 |
40 | 1. Copyright and Related Rights. A Work made available under CC0 may be
41 | protected by copyright and related or neighboring rights ("Copyright and
42 | Related Rights"). Copyright and Related Rights include, but are not
43 | limited to, the following:
44 |
45 | i. the right to reproduce, adapt, distribute, perform, display,
46 | communicate, and translate a Work;
47 | ii. moral rights retained by the original author(s) and/or performer(s);
48 | iii. publicity and privacy rights pertaining to a person's image or
49 | likeness depicted in a Work;
50 | iv. rights protecting against unfair competition in regards to a Work,
51 | subject to the limitations in paragraph 4(a), below;
52 | v. rights protecting the extraction, dissemination, use and reuse of data
53 | in a Work;
54 | vi. database rights (such as those arising under Directive 96/9/EC of the
55 | European Parliament and of the Council of 11 March 1996 on the legal
56 | protection of databases, and under any national implementation
57 | thereof, including any amended or successor version of such
58 | directive); and
59 | vii. other similar, equivalent or corresponding rights throughout the
60 | world based on applicable law or treaty, and any national
61 | implementations thereof.
62 |
63 | 2. Waiver. To the greatest extent permitted by, but not in contravention
64 | of, applicable law, Affirmer hereby overtly, fully, permanently,
65 | irrevocably and unconditionally waives, abandons, and surrenders all of
66 | Affirmer's Copyright and Related Rights and associated claims and causes
67 | of action, whether now known or unknown (including existing as well as
68 | future claims and causes of action), in the Work (i) in all territories
69 | worldwide, (ii) for the maximum duration provided by applicable law or
70 | treaty (including future time extensions), (iii) in any current or future
71 | medium and for any number of copies, and (iv) for any purpose whatsoever,
72 | including without limitation commercial, advertising or promotional
73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74 | member of the public at large and to the detriment of Affirmer's heirs and
75 | successors, fully intending that such Waiver shall not be subject to
76 | revocation, rescission, cancellation, termination, or any other legal or
77 | equitable action to disrupt the quiet enjoyment of the Work by the public
78 | as contemplated by Affirmer's express Statement of Purpose.
79 |
80 | 3. Public License Fallback. Should any part of the Waiver for any reason
81 | be judged legally invalid or ineffective under applicable law, then the
82 | Waiver shall be preserved to the maximum extent permitted taking into
83 | account Affirmer's express Statement of Purpose. In addition, to the
84 | extent the Waiver is so judged Affirmer hereby grants to each affected
85 | person a royalty-free, non transferable, non sublicensable, non exclusive,
86 | irrevocable and unconditional license to exercise Affirmer's Copyright and
87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the
88 | maximum duration provided by applicable law or treaty (including future
89 | time extensions), (iii) in any current or future medium and for any number
90 | of copies, and (iv) for any purpose whatsoever, including without
91 | limitation commercial, advertising or promotional purposes (the
92 | "License"). The License shall be deemed effective as of the date CC0 was
93 | applied by Affirmer to the Work. Should any part of the License for any
94 | reason be judged legally invalid or ineffective under applicable law, such
95 | partial invalidity or ineffectiveness shall not invalidate the remainder
96 | of the License, and in such case Affirmer hereby affirms that he or she
97 | will not (i) exercise any of his or her remaining Copyright and Related
98 | Rights in the Work or (ii) assert any associated claims and causes of
99 | action with respect to the Work, in either case contrary to Affirmer's
100 | express Statement of Purpose.
101 |
102 | 4. Limitations and Disclaimers.
103 |
104 | a. No trademark or patent rights held by Affirmer are waived, abandoned,
105 | surrendered, licensed or otherwise affected by this document.
106 | b. Affirmer offers the Work as-is and makes no representations or
107 | warranties of any kind concerning the Work, express, implied,
108 | statutory or otherwise, including without limitation warranties of
109 | title, merchantability, fitness for a particular purpose, non
110 | infringement, or the absence of latent or other defects, accuracy, or
111 | the present or absence of errors, whether or not discoverable, all to
112 | the greatest extent permissible under applicable law.
113 | c. Affirmer disclaims responsibility for clearing rights of other persons
114 | that may apply to the Work or any use thereof, including without
115 | limitation any person's Copyright and Related Rights in the Work.
116 | Further, Affirmer disclaims responsibility for obtaining any necessary
117 | consents, permissions or other rights required for any use of the
118 | Work.
119 | d. Affirmer understands and acknowledges that Creative Commons is not a
120 | party to this document and has no duty or obligation with respect to
121 | this CC0 or use of the Work.
122 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Flare ✨
2 |
3 | [](https://github.com/soulteary/flare/actions/workflows/codeql-analysis.yml) [](https://github.com/soulteary/flare/actions/workflows/scan.yml) [](https://github.com/soulteary/flare/actions/workflows/release.yml)  [](https://hub.docker.com/r/soulteary/flare)
4 |
5 |
6 | 如果你觉得这个项目有帮到你,欢迎点赞✨(star)给予鼓励;如果你希望收到这个项目的更新推送,可以点击关注 👀(watch)并选择适合自己的关注模式(推荐 release)。
7 |
8 | ---
9 |
10 | 轻量、快速、美观的个人导航页面,适用于 HomeLab 或其他注重私密的场景。
11 |
12 | 无任何数据库依赖,应用数据完全开放透明,100% 属于用户自己。
13 |
14 | 支持在线编辑,内置 Material Design Icons 6k+ 图标,目前累计下载过万,期待你的反馈 :)
15 |
16 | 支持 x86 以及常见的 ARM (ARM32v6、ARM32v7、ARM64v8)设备,应用资源消耗非常低:
17 |
18 | - CPU: < 1%
19 | - MEM: < 30M
20 | - Docker Image: < 10M
21 |
22 |
23 |
24 |
25 | ## 快速上手
26 |
27 | 快速上手 Flare,需要两步:**下载**包含示例的代码、**启动**程序访问浏览器。
28 |
29 | ### 下载包含示例的代码
30 |
31 | 你可以使用 `git clone` 或者选择使用 “Download ZIP” 的方式,下载包含了基础的配置示例(书签和应用)的代码:
32 |
33 | ```bash
34 | git clone https://github.com/soulteary/docker-flare.git
35 | cd docker-flare
36 | ```
37 |
38 | `app/*yml` 目录中包含了你的书签和应用数据,你可以根据你的需求对其进行调整。如果目录中没有配置文件,应用将在首次运行的时候,进行自动创建。
39 |
40 | ### 启动程序访问浏览器
41 |
42 | 启动应用非常简单,如果你习惯使用 Docker,可以执行:
43 |
44 | ```bash
45 | # 可以使用最新镜像
46 | docker pull soulteary/flare
47 | docker run --rm -it -p 5005:5005 -v `pwd`/app:/app soulteary/flare
48 | # 也可以追求明确,使用固定版本
49 | docker pull soulteary/flare:0.5.1
50 | docker run --rm -it -p 5005:5005 -v `pwd`/app:/app soulteary/flare:0.5.1
51 | ```
52 |
53 | 如果你习惯使用 docker-compose,只需要执行:
54 |
55 | ```bash
56 | docker-compose up -d
57 | ```
58 |
59 | 如果你是 Traefik 用户,可以参考 `docker-compose.traefik.yml` 配置文件来使用。
60 |
61 | 不论是哪一种方式,在命令执行完毕之后,默认情况下,我们访问浏览器的 `5005` 端口,就能看到下面的界面啦:
62 |
63 | 
64 |
65 | ### 程序使用向导
66 |
67 | 为了方便你的使用,我制作了一个简单的向导程序,在 flare 启动之后,你可以随时访问 `/guide`,获取 flare 基础界面功能的介绍。
68 |
69 | 
70 |
71 |
72 | ## 程序在线编辑页面
73 |
74 | 为了满足随时随地编辑的需求,程序新增了“在线编辑”的页面。
75 |
76 | 
77 |
78 | 工具页面地址:`/editor`
79 |
80 | ## 程序帮助页面
81 |
82 | 为了减少不必要的地址记忆负担,程序新增了一个“帮助页面”,默认展示所有的程序内的工具页面。
83 |
84 | 
85 |
86 | 工具页面地址:`/help`
87 |
88 | ## 程序性能
89 |
90 | “快”作为 Flare 对主要优势而言,自然是需要“满分”来加持。
91 |
92 | 
93 |
94 | 如果你好奇这是如何实现的,可以阅读这篇文章:[《Flare 制作记录:应用前后端性能优化》](https://soulteary.com/2022/01/19/flare-production-record-application-frontend-and-backend-performance-optimization.html)。
95 |
96 | ## 进阶文档
97 |
98 | - [自定义启动参数](./docs/advanced-startup.md)
99 | - [关闭免登陆模式后,如何设置用户账号](./docs/application-account.md)
100 | - [如何挑选和使用图标](./docs/material-design-icons.md)
101 | - [如何和 Traefik 一起使用](https://github.com/soulteary/traefik-example)
102 |
103 | ## 相比较 Flame
104 |
105 | - 服务资源消耗极低,可以跑在任何规格的机器上,甚至是一台搭载2015年S805芯片的ARM盒子。
106 | - 程序页面性能非常好,渲染速度更快,支持同时渲染大量(数千)书签,而不必担心风扇起飞。
107 | - 使用声明的配置来进行导航内容的管理,无需担心数据迁移问题。
108 | - 简化了天气数据的获取方式,不再需要申请天气网站的 `API_KEY` ,避免了不必要的成本开销。
109 | - 简化了 Flame 中的K8S、Docker 集成等不必要的功能。
110 | - 内置了大量风格统一、高质量的矢量图标,减少选择困难症,确保界面长期“耐看”。
111 | - 默认使用免登陆模式,避免 HomeLab、本地使用的用户有额外的登陆操作。
112 |
113 | ## 关于内置图标
114 |
115 | 程序内置了目前 [materialdesignicons.com](https://materialdesignicons.com/) 中所有的 Material Design Icons,你可以让你的每一个书签都拥有风格统一、高质量的矢量图标。
116 |
117 | 
118 |
119 | 更多信息,可以参考 [如何挑选和使用图标](./docs/material-design-icons.md)。
120 |
121 | ## TODO
122 |
123 | - [ ] 持续完善程序定制化功能
124 | - [ ] 支持使用 API 进行内容管理
125 | - [ ] 支持自定义主题配色
126 |
127 | ## Thanks
128 |
129 | Inspired by https://github.com/pawelmalak/flame
130 |
--------------------------------------------------------------------------------
/app/apps.yml:
--------------------------------------------------------------------------------
1 | links:
2 | - name: "Regexp 101"
3 | link: "https://regex101.com/"
4 | icon: "ladybug"
5 | desc: "在线正则表达式"
6 | - name: "JSON2Go"
7 | link: "https://mholt.github.io/json-to-go/"
8 | icon: "google"
9 | desc: "快速生成结构体"
10 | - name: "Outline"
11 | link: "https://outline.lab.com"
12 | icon: "evernote"
13 | desc: "快速记录"
14 | - name: "任务看板"
15 | icon: "alphaBBoxOutline"
16 | link: "https://board.lab.com/"
17 | - name: "个人知识库"
18 | link: "https://wiki.lab.com"
19 | icon: "wikipedia"
20 | desc: "结构化整理"
21 | - name: "DSU"
22 | link: "https://dsu.lab.com"
23 | icon: "toggleSwitchOffOutline"
24 | desc: "结构化整理"
25 | - name: "Gitea"
26 | link: "https://gitea.lab.com"
27 | icon: "git"
28 | - name: "网页存档"
29 | link: "https://archive.lab.com"
30 | icon: "archive"
31 | - name: "Carbon"
32 | link: "https://carbon.lab.com"
33 | icon: "GamepadVariant"
34 | - name: "云产品倒计时"
35 | link: "https://cd.lab.com"
36 | icon: "update"
37 | - name: "设备: 主路由器"
38 | link: "https://router.lab.com"
39 | icon: "RouterNetwork"
40 | - name: "设备: 群晖 DS918"
41 | link: "https://nas.lab.com"
42 | icon: "nas"
43 | - name: "设备: 光猫"
44 | link: "https://cat.lab.com"
45 | icon: "cat"
46 | - name: "设备: 主交换机"
47 | link: "https://switch.lab.com"
48 | icon: "switch"
49 | - name: "设备: NUC8"
50 | link: "https://nuc.lab.com"
51 | icon: "console"
52 | - name: "设备: ThinkPad14"
53 | link: "https://tp14.lab.com"
54 | icon: "console"
55 | - name: "设备: ThinkBook15"
56 | link: "https://tp15.lab.com"
57 | icon: "console"
58 | - name: "设备: Wi-Fi6 AP"
59 | link: "https://wifi.lab.com"
60 | icon: "routerWireless"
61 |
--------------------------------------------------------------------------------
/app/bookmarks.yml:
--------------------------------------------------------------------------------
1 | categories:
2 | - id: 1
3 | title: 社交媒体
4 | - id: 2
5 | title: 参考资料
6 | - id: 3
7 | title: 在线工具
8 | - id: "string-name"
9 | title: 新分类
10 | - id: "category-name"
11 | title: 新分类
12 |
13 | links:
14 | - name: 微博
15 | link: "https://weibo.com"
16 | icon: "sinaWeibo"
17 | category: 1
18 |
19 | - name: "知乎"
20 | link: "https://zhihu.com"
21 | icon: "commentQuestion"
22 | category: 2
23 |
24 | - name: "链接3"
25 | link: "#"
26 | category: b
27 | - name: "链接4"
28 | link: "#"
29 | - name: "链接5"
30 | link: "#"
31 |
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '3.6'
2 |
3 | services:
4 | flare:
5 | image: soulteary/flare
6 | restart: always
7 | # 默认无需添加任何参数,如有特殊需求
8 | # 可阅读文档 https://github.com/soulteary/docker-flare/blob/main/docs/advanced-startup.md
9 | command: flare
10 | # 启用账号登陆模式
11 | # command: flare --nologin=0
12 | # environment:
13 | # 如需开启用户登陆模式,需要先设置 `nologin` 启动参数为 `0`
14 | # 如开启 `nologin`,未设置 FLARE_USER,则默认用户为 `flare`
15 | # - FLARE_USER=flare
16 | # 指定你自己的账号密码,如未设置 `FLARE_USER`,则会默认生成密码并展示在应用启动日志中
17 | # - FLARE_PASS=your_password
18 | # 是否开启“使用向导”,访问 `/guide`
19 | # - FLARE_GUIDE=1
20 | ports:
21 | - 5005:5005
22 | volumes:
23 | - ./app:/app
24 |
--------------------------------------------------------------------------------
/docs/advanced-startup.md:
--------------------------------------------------------------------------------
1 | # 自定义启动参数
2 |
3 | 程序目前的启动参数,可以从环境变量或从命令行参数中解析获得。
4 |
5 | 默认推荐使用一种方案进行参数配置,如果你有特殊需求,需要混合使用。
6 |
7 | 请注意,命令行参数拥有更高的优先级,会覆盖环境变量中的参数。
8 |
9 |
10 | ## 环境变量
11 |
12 | ```bash
13 | 修改程序监听端口 "FLARE_PORT"
14 | 配置登陆模式下的账号 "FLARE_USER"
15 | 配置登陆模式下的密码 "FLARE_PASS"
16 | 启用或禁用程序向导 "FLARE_GUIDE"
17 | 启用程序废弃功能提示 "FLARE_DEPRECATED_NOTICE"
18 | 启用服务端请求合并功能 "FLARE_MINI_REQUEST"
19 | 禁用登陆模式 "FLARE_DISABLE_LOGIN"
20 | 启用离线模式 "FLARE_OFFLINE"
21 | 启用在线编辑器功能 "FLARE_EDITOR"
22 | 首页是否需要登陆可见 "FLARE_VISIBILITY"
23 | ```
24 |
25 | 环境变量使用示例: `FLARE_OFFLINE=0` 或 `FLARE_OFFLINE=false`
26 |
27 | 完全的环境变量列表,可以[参考这里](https://github.com/soulteary/flare/blob/main/model/cmd.go)。
28 |
29 |
30 | ## 命令行参数
31 |
32 | ```
33 | docker run --rm -it -p 5005:5005 soulteary/flare:0.5.1 flare
34 | 找不到配置文件config,创建默认配置。
35 | [22:49:49.562] INFO: Flare - 🏂 Challenge all bookmarking apps and websites directories, Aim to Be a best performance monster.
36 | [11:23:23.622] INFO: 程序信息: {"GOGS/ARCH":"linux/arm64","commit":"4D2A2143715A30FC1646DE067847322A8C6F91BF","date":"2024-01-06T03:24:10Z","version":"0.5.1"}
37 | [22:49:49.562] INFO: 程序服务端口 {"port":5005}
38 | [22:49:49.562] INFO: 页面请求合并 {"mini_request":false}
39 | [22:49:49.562] INFO: 启用离线模式 {"offline":false}
40 | [22:49:49.562] INFO: 已禁用登陆模式,用户可直接调整应用设置。
41 | [22:49:49.563] INFO: 在线编辑模块启用,可以访问 /editor 来进行数据编辑。
42 | [22:49:49.563] INFO: 向导模块启用,可以访问 /guide 来获取程序使用帮助。
43 | [22:49:49.563] INFO: 程序已启动完毕 🚀
44 |
45 |
46 | 支持命令:
47 | -p, --port int 指定监听端口 (default 5005)
48 | -g, --guide 启用应用向导 (default true)
49 | -s, --visibility string 调整网站整体可见性 (default "DEFAULT")
50 | -m, --mini_request 使用请求最小化模式
51 | -o, --offline 启用离线模式
52 | -l, --disable_login 禁用账号登陆 (default true)
53 | -n, --enable_notice 启用废弃日志警告 (default true)
54 | -e, --enable_editor 启用编辑器 (default true)
55 | -c, --disable_csp 禁用CSP
56 | -v, --version 显示应用版本号
57 | -h, --help 显示帮助
58 | ```
59 |
60 | ## 功能说明
61 |
62 | ### 合并资源请求
63 |
64 | - 环境变量:`FLARE_MINI_REQUEST`
65 | - 命令行:`mini_request` / `m`
66 |
67 | 这个参数的作用是“合并页面请求资源,减少页面资源请求总数量”,在一些书签数据量极大的场景下,可以大幅提升页面渲染性能。
68 |
69 | 小伙伴可以根据自己的情况按需开启,此参数默认关闭。
70 |
71 | 启用方法,在 flare 启动参数后添加 `-m=1` 或者设置环境变量 `FLARE_MINI_REQUEST=1`
72 |
73 | ### 免登陆模式:`disable_login`
74 |
75 | 当这个参数关闭之后,用户需要在登陆之后,才能够对设置页面的内容进行调整,适合 Flare 在公网环境中使用的小伙伴。
76 |
77 | 此参数默认开启,方便在 HomeLab 或本地使用的小伙伴,减少不必要的操作。
78 |
79 | 禁用方法,在 flare 启动参数后添加 `--disable_login=0`
80 |
81 | ### 离线模式:`offline`
82 |
83 | 当这个参数开启之后,flare 所有依赖公网的功能将被停用。
84 |
85 | 目前 flare 仅会调用 issue[#4](https://github.com/soulteary/docker-flare/issues/4) 中提到的 `https://wis.qq.com/weather/common` 接口获取天气数据,和 IPIP 的地理位置接口获取地理信息,开启此参数后,天气将无法获取。
86 |
87 | 此参数默认关闭,开启方法,在 flare 启动参数后添加:`--offline=1`
88 |
89 | ### 指定端口:`port`
90 |
91 | 这个参数用于自定义服务端口,使用 `docker-flare` 的小伙伴可以忽略。
92 |
--------------------------------------------------------------------------------
/docs/application-account.md:
--------------------------------------------------------------------------------
1 | # 用户账号相关
2 |
3 | flare 默认会启动免登陆模式,方便在 HomeLab 或本地使用的小伙伴。
4 |
5 | 然而,有一些小伙伴需要在公网使用,本篇文档就来展示如何设置和获取 flare 的用户和密码。
6 |
7 | ## 设置 Flare 账号和密码
8 |
9 | 我们可以通过在环境变量中设置 `FLARE_USER` 和 `FLARE_PASS` 来指定 flare 的账号和密码,下面是一个容器编排文件示例:
10 |
11 | ```yaml
12 | version: '3.6'
13 |
14 | services:
15 | flare:
16 | image: soulteary/flare
17 | restart: always
18 | # 默认无需添加任何参数,如有特殊需求
19 | # 可阅读文档 https://github.com/soulteary/docker-flare/blob/main/docs/advanced-startup.md
20 | # 启用账号登陆模式
21 | command: flare --nologin=0
22 | environment:
23 | # 如需开启用户登陆模式,需要先设置 `nologin` 启动参数为 `0`
24 | # 如开启 `nologin`,未设置 FLARE_USER,则默认用户为 `flare`
25 | - FLARE_USER=flare
26 | # 指定你自己的账号密码,如未设置 `FLARE_USER`,则会默认生成密码并展示在应用启动日志中
27 | - FLARE_PASS=your_password
28 | ports:
29 | - 5005:5005
30 | volumes:
31 | - ./app:/app
32 | ```
33 |
34 | 更多示例,可以参考[示例文件夹](../example/)。
35 |
36 | 在执行命令前,不妨执行 `docker pull soulteary/flare` 确认使用的应用镜像是新版本。
37 |
38 | 当你使用 `docker-compose up -d` 启动应用之后,接着使用 `docker-compose ps`,就可以看到包含密码的日志输出啦:
39 |
40 | ```bash
41 | INFO[2023-05-07T11:13:13+08:00] Flare v0.4.1-332C2E0E24789AA4D7F578AA14E7BA6F62970ADA linux/amd64 BuildDate=2023-05-07T03:06:36Z
42 | INFO[2023-05-07T11:13:13+08:00]
43 | INFO[2023-05-07T11:13:13+08:00] 程序服务端口 5005
44 | INFO[2023-05-07T11:13:13+08:00] 页面请求合并 false
45 | INFO[2023-05-07T11:13:13+08:00] 启用离线模式 false
46 | INFO[2023-05-07T11:13:13+08:00] 已禁用登陆模式,用户可直接调整应用设置。
47 | INFO[2023-05-07T11:13:13+08:00] 在线编辑模块启用,可以访问 /editor 来进行数据编辑。
48 | INFO[2023-05-07T11:13:13+08:00] 向导模块启用,可以访问 /guide 来获取程序使用帮助。
49 | INFO[2023-05-07T11:13:13+08:00] 程序已启动完毕 🚀
50 | ```
--------------------------------------------------------------------------------
/docs/material-design-icons.md:
--------------------------------------------------------------------------------
1 | # Material Design Icons 使用
2 |
3 | 为了方便小伙伴使用 flare,程序内置了来自 [materialdesignicons.com](https://materialdesignicons.com/) 中所有的 Material Design Icons,你可以让你的每一个书签都拥有风格统一、高质量的矢量图标。
4 |
5 | 在示例的书签配置文件中,我们可以看到如何为应用配置图标。
6 |
7 | ```yaml
8 | links:
9 | - name: "Regexp 101"
10 | link: "https://regex101.com/"
11 | icon: "ladybug"
12 | desc: "在线正则表达式"
13 | - name: "JSON2Go"
14 | link: "https://mholt.github.io/json-to-go/"
15 | icon: "google"
16 | desc: "快速生成结构体"
17 | ```
18 |
19 | 启动 flare 之后,使用浏览器访问 `/icons/` 可以打开图标列表页面。
20 |
21 | 在页面中选择你喜欢的图标,鼠标点击之后,默认会将程序可以直接使用的“图标名称”保存在剪贴板,然后粘贴到配置文件中,flare 就会自动更新书签的图标啦。
22 |
23 | (图标名称无需使用 `-` 连字符,并且大小写不敏感)
24 |
--------------------------------------------------------------------------------
/example/login/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '3.6'
2 |
3 | services:
4 | flare:
5 | image: soulteary/flare
6 | restart: always
7 | # 默认无需添加任何参数,如有特殊需求
8 | # 可阅读文档 https://github.com/soulteary/docker-flare/blob/main/docs/advanced-startup.md
9 | command: flare
10 | environment:
11 | # 开启登陆
12 | - FLARE_DISABLE_LOGIN=0
13 | # 设置登陆账号
14 | - FLARE_USER=flare
15 | # 指定你自己的账号密码,如未设置 `FLARE_USER`,则会默认生成密码并展示在应用启动日志中
16 | - FLARE_PASS=your_password
17 | ports:
18 | # 根据自己需求设置端口,如需调整访问端口为 8080,
19 | # 可参考修改为 `- 8080:5005`
20 | - 5005:5005
21 | volumes:
22 | - ./app:/app
23 |
--------------------------------------------------------------------------------
/example/private/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '3.6'
2 |
3 | services:
4 | flare:
5 | image: soulteary/flare
6 | restart: always
7 | # 默认无需添加任何参数,如有特殊需求
8 | # 可阅读文档 https://github.com/soulteary/docker-flare/blob/main/docs/advanced-startup.md
9 | command: flare --disable_login=0 --visibility=private
10 | environment:
11 | # 开启登陆
12 | - FLARE_DISABLE_LOGIN=0
13 | # 设置登陆账号
14 | - FLARE_USER=flare
15 | # 指定你自己的账号密码,如未设置 `FLARE_USER`,则会默认生成密码并展示在应用启动日志中
16 | - FLARE_PASS=your_password
17 | ports:
18 | # 根据自己需求设置端口,如需调整访问端口为 8080,
19 | # 可参考修改为 `- 8080:5005`
20 | - 5005:5005
21 | volumes:
22 | - ./app:/app
23 |
--------------------------------------------------------------------------------
/example/traefik/docker-compose.yml:
--------------------------------------------------------------------------------
1 | # Traefik 快速上手和使用,可参考 https://github.com/soulteary/traefik-example/
2 | version: '3.6'
3 |
4 | services:
5 | flare:
6 | image: soulteary/flare
7 | restart: always
8 | # 默认无需添加任何参数,如有特殊需求
9 | # 可阅读文档 https://github.com/soulteary/docker-flare/blob/main/docs/advanced-startup.md
10 | command: flare
11 | labels:
12 | - "traefik.enable=true"
13 | - "traefik.docker.network=traefik"
14 |
15 | - "traefik.http.routers.traefik-flare-http.middlewares=https-redirect@file"
16 | - "traefik.http.routers.traefik-flare-http.entrypoints=http"
17 | - "traefik.http.routers.traefik-flare-http.rule=Host(`flare.example.com`)"
18 | - "traefik.http.routers.traefik-flare-http.service=dashboard@internal"
19 |
20 | - "traefik.http.routers.traefik-flare-https.entrypoints=https"
21 | - "traefik.http.routers.traefik-flare-https.rule=Host(`flare.example.com`) && PathPrefix(`/`)"
22 | - "traefik.http.routers.traefik-flare-https.tls=true"
23 |
24 | - "traefik.http.services.traefik-flare-backend.loadbalancer.server.scheme=http"
25 | - "traefik.http.services.traefik-flare-backend.loadbalancer.server.port=5005"
26 | networks:
27 | - traefik
28 | expose:
29 | - 5005
30 | volumes:
31 | - ./app:/app
32 |
33 | networks:
34 | traefik:
35 | external: true
--------------------------------------------------------------------------------
/screenshots/docker-image-size.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soulteary/docker-flare/a5696b891c9ff53218ba75af72575fdfb27669d5/screenshots/docker-image-size.png
--------------------------------------------------------------------------------
/screenshots/docker-pulls.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soulteary/docker-flare/a5696b891c9ff53218ba75af72575fdfb27669d5/screenshots/docker-pulls.png
--------------------------------------------------------------------------------
/screenshots/editor-beta.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soulteary/docker-flare/a5696b891c9ff53218ba75af72575fdfb27669d5/screenshots/editor-beta.png
--------------------------------------------------------------------------------
/screenshots/flare-guide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soulteary/docker-flare/a5696b891c9ff53218ba75af72575fdfb27669d5/screenshots/flare-guide.png
--------------------------------------------------------------------------------
/screenshots/flare-help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soulteary/docker-flare/a5696b891c9ff53218ba75af72575fdfb27669d5/screenshots/flare-help.png
--------------------------------------------------------------------------------
/screenshots/icon-cheat-sheets.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soulteary/docker-flare/a5696b891c9ff53218ba75af72575fdfb27669d5/screenshots/icon-cheat-sheets.png
--------------------------------------------------------------------------------
/screenshots/lighthouse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soulteary/docker-flare/a5696b891c9ff53218ba75af72575fdfb27669d5/screenshots/lighthouse.png
--------------------------------------------------------------------------------
/screenshots/ui.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soulteary/docker-flare/a5696b891c9ff53218ba75af72575fdfb27669d5/screenshots/ui.png
--------------------------------------------------------------------------------