The original design intent came from the fact that many page-based site setups are complicated and hard to operate. Important site files get lost due to operator mistakes, and commercial hosts go under or become unstable. Common blog projects are also single-purpose and don't work for multiple users sharing one site. This project aims to solve all of that in one place: video storage, blogs, e-book sharing, personal business sites, file backups, email setup, page color and image customization, translation, member registration management, site bookmark syncing, and other common needs.
The project is basically developed, still being tweaked. If I open-source it, I'll add it to this post or announce it separately.
But I can talk about the design philosophy first — welcome to borrow from it or point out issues.
Continuing from last time, we worked out how to use AI prompts and troubleshoot more effectively.
Today I'll focus on the design philosophy.
First decide the deployment platform and applicable architecture. Of course, the more deployment methods and platforms supported, the easier it is to promote. But once the architecture is set, it's very hard to change or replace.
Language architecture:
This project prioritizes Cloudflare D1 and R2. D1 stores structured data like articles, comments, categories, tags, and file metadata; R2 stores large files like images, videos, audio, and attachments. KV is only used for caching and config, not as primary data storage. If D1 or R2 isn't configured, some upload, file management, and content publishing features won't work.
Login system
The admin password is the login variable — that's the most common password setup. Standard practice is no default production admin password, and unauthenticated front-end pages must not be able to modify admin credentials. Sure, if you insist on leaving a default password, the AI will do it, but it doesn't meet the security requirements for building a project. Due to security restrictions, Cloudflare Pages deployment environment variables must be modified in the Cloudflare deployment settings dashboard; the site's front-end pages can't write back to them directly.
The super admin account (e.g. fox) self-registers and is authenticated directly via environment variables; regular users can register openly. If anyone tries to register the reserved admin name (fox/admin), it's not allowed; when not logged in you're in regular user mode, and logging in as admin unlocks publish, edit, and delete article permissions.
Image storage notes
First you need to know how image characteristics affect the site environment. If they're thumbnails, that saves more traffic — turn on real-time traffic in your phone settings to check. If a site burns hundreds of KB per second when opened, and keeps wasting traffic continuously even after loading finishes, that's because syncing wasn't written properly or some other issue. Under 20KB per second is fairly normal. Common photos are jpg and png. Images in the file list after upload are compressed, saving more traffic — this design makes pages open faster. They're generally smaller than the actual dimensions.
Thumbnail format Use case Features
WebP First choice for web thumbnails 25%~35% smaller than JPG at the same quality, supports transparency, supported by all mainstream browsers
JPG/JPEG Photo thumbnails Best compatibility, small size, good for colorful images
PNG Thumbnails with transparent backgrounds or text Lossless compression, sharp edges, but larger size
AVIF For maximum compression About 30% smaller than WebP, but slow to encode and only partly supported by browsers.
Images are converted to local Base64 / Data URL format and saved in local storage so they can load and display at any time.
Sync area
This is cross-device cloud primary database (D1/Sync API) syncing. Cloud sync solves the problem of photos not displaying across devices. Enables online music and video playback. Adaptive video aspect ratio. Adds video download. Solves file upload issues.
Password area
Needs to be stated in the repo: the variable name is PASSWORD. Should the password be set by the admin themselves, or should it be a strengthened password?
It should explain that after adding the variable and deploying, you can log in with the variable's password.
Connection area
You can connect KV, database, and storage buckets to achieve syncing. D1 database and R2 storage bucket are preferred.
Decide on the mapping between these and files after you have some understanding, to avoid mismatches.
Translation area
Add a close button to the registration panel. Implement the ability to save external translation API config for normal in-site use, with a save button.
Upload area
The file list modes for blog, bookshelf, album, and media all support four view options: large image, medium image, small image, and details, plus the original layout mode. Blog, bookshelf, album, and media support batch upload, download, and delete. Blog adds a favorites area.
Fix uploads getting stuck and inaccurate progress bars.
Finally, check the whole project for unknown errors and fix them.
Private area
Make the backup area, backup area email hub, system settings, and site image hosting section visible only to admins.
Clear permissions
Uniqueness of the admin account — a project can't have multiple super admins. Designate the super admin name as fox.
Registered users can't delete or edit e-books, images, videos, or blogs. Registered users can only delete and publish blogs, and the publish page shows their name marked as a registered user.
Complete the registered user list feature in the settings area.
Site features area
Can save and delete any internet site as image hosting; sites display as posters with a jump link, and custom site descriptions can be saved under the address. Defaults to https://123456. The site features area is admin-only. Note in the bottom page area which sections are admin-only.
Guide area
Cloudflare D1 (database), R2 (image storage bucket), and KV integration specs, binding variable documentation, and extension guide.
Update the repo README to match the latest branch, in clearer, more precise, simpler, and easier-to-understand language. Include deployment guide variables and other info. Email area, API area.
Supports CF Pages pull deployment and upload deployment.
Can bind R2 and KV directly in the CF dashboard. Effective real-time sync. Add D1 database and R2 object storage usage instructions to the in-site deployment guide.
A blog project named fox3 — write the project intro, deployment guide, build instructions, and variables in the repo. Support deployment via various methods and platforms, including Tencent Cloud and Alibaba Cloud. CF one-click pull deployment is preferred; for Pages one-click file upload deployment, explain how to get the upload package. Beautiful interface.
Email area:
Implement sending with third-party email services that support saved API config.
Implement "register email/verification code" sending.
Implement auto-reply for verification codes.
Receiving via Cloudflare Email Routing or other. Reserve and display saved config; implement admin replying to user emails from within the site. Complete mail management area: admins can send, view, delete, reply, and batch manage mail in-site, with a mail recycle bin. Have send/receive limit switches, with a 3,000-email cap. Prioritize storing email info in the database; if unavailable, also support KV.
Homepage intro area:
After customizing images in the homepage intro area, implement the image background visually.
Backup area:
Add a Nutstore or other WebDAV file management area to the external backup management section. After connecting Nutstore or another cloud drive via WebDAV in settings, visually manage uploaded files and enable selective blog backup and restore to prevent server operational risks. Consider your own technical situation — if you don't have an environment for timely troubleshooting, don't add too many features.
Product area
Add a product area; the display area can upload and delete multiple images, manage multiple product display areas, set prices and product descriptions, and include reserved interfaces for various payment methods including PayPal, WorldFirst, WeChat, and Alipay. Settings and orders, and payment method interfaces are admin-only (and note this). Users can submit orders and choose quantities. Submitted orders must include contact address, phone, and email. Implement a chat window on the product showcase so admins can talk with users in the backend. Admins can view orders in the backend, split into paid and unpaid.
Other:
Upload and download progress bars appear during operations. E-book mobile interface supports fullscreen viewing without blocking the top of the phone display. Logout button and function work properly. Implement login and registration panels. Header can be opened and collapsed. Custom site-wide background photo and custom site-wide avatar; the photo homepage intro area photos all support setting local image uploads. System management area options are admin-only.
Settings area:
Add a login panel. Can edit articles, publish and delete articles. Articles can upload local images. Can favorite articles, change avatar and theme name. Date is real-time network time, timezone adjustable. Can set local images as background.
Theme color and global background customization section, from top to bottom includes these buttons: custom site name, theme color button (one-click quick color scheme), custom background color palette, custom avatar, site-wide background photo, homepage intro area photo.
All sections can be opened and collapsed. Add one-click toggle between mobile and desktop interface.
Registered user management list section.
Registration and privacy area notes:
Enable site-wide privacy protection (unregistered visitors can only see blogs), email-only registration, and open registration policy.
Site-wide privacy switch (unregistered visitors only see blogs)
When enabled, external visitors who aren't logged in can only browse blog articles; sections like cloud drive, bookshelf, media, album, and AI programming will be strictly hidden from visitors.
Email-only registration (forced email identity verification)
When enabled, new users must provide a valid email and verify it, preventing fake bots from mass-registering.
Repo README:
"Brief description"
In-site deployment guide, repo deployment guide, must match the latest situation. Supports CF Pages pull deployment and upload deployment.
Can bind R2 and KV directly in the CF dashboard. Effective real-time sync. Add D1 database and R2 object storage usage instructions to the in-site deployment guide.
A blog project named fox3 — write the project intro, deployment guide, build instructions, and variables in the repo. Support deployment via various methods and platforms, including Tencent Cloud and Alibaba Cloud. CF one-click pull deployment is preferred; for Pages one-click file upload deployment, explain how to get the upload package.
Multiple themes, beautiful interface.
Global fix prompt
Please check the global project and find issues. Or find issues in a specific area.
(Syncing works, file display works, file upload and download work, file saving works, database/KV/storage bucket usage works, connections work, settings info works, status lights work, email send/receive works, product area works)
设计初衷源于许多页面网站配置复杂,难以操作。运营商误操作造成的网站重要文件丟失,商业运营商跑路不稳定等问题。常见博客项目又功能单一,不适用多用户共用的问题。一站解决影视保存,博客,电子书分享,个人商业站,文件备份,邮箱配制,页面调色和配图,翻译,注册会员管理,网站书签同步等常见问题。
项目已基本开发完成,还在修改。如果开源我会加到此文中或另行通知。
但设计理念可以先讲,欢迎大家借鉴或指正。
接上期内容,我们梳理出了如何较有效的AI提示词使用和排错办法。
今天重点讲设计理念。
先确定部署平台和适用架构,当然支持越多部署方式和平台越好推广。但架构一旦确定就很难更改和替换。
语言架构:
本项目优先依赖 Cloudflare D1 和 R2。D1 用于存储文章、评论、分类、标签、文件元数据等结构化数据;R2 用于存储图片、视频、音频和附件等大文件实体。KV 仅用于缓存和配置,不作为主数据存储。如果未配置 D1 或 R2,部分上传、文件管理和内容发布功能将不可用。
登录系统
管理员密码就是登录变量,这是最常见的密码设置。常规操作是不能有生产管理员默认密码,也不能让未验证身份的前台页面修改管理员凭据。当然你一定要留个默认密码ai也会照做,但不符合写项目的安全性要求。由于安全限制问题Cloudflare Pages 的部署环境变量必须在 Cloudflare 部署设置仪表板中修改,网站前端页面无法直接写回它们。
超级管理员账号(如fox)自行注册直接由环境变量鉴权登录;普通用户开放注册。若任何人尝试注册管理员保留名称(fox/ admin)则不允许注册;未登录时为普通用户模式,登录管理员后解锁发布、编辑、删除文章权限。
图片的存储须知
需要先知道的图片性质对网站环境的影响,如果为缩略图则更为省流量,打开手机设置中的实时流量。研究,如果一个站点打开后,流量每秒上百个kb的跑掉,而且在加载完的情况下,流量不停的持续浪费。这就是写项目时没有把同步写好或其它问题。每秒20kb以下则较为正常。常见的照片为jpg和png。上传后在文件列表的图片是经过压缩的,更省流,这种设计让打开网页比较快。一般比实际尺寸小。
缩略图格式 适用场景 特点
WebP 网页缩略图首选 同画质下比 JPG 小 25%~35%,支持透明,主流浏览器均已支持
JPG/JPEG 照片类缩略图 兼容性最强,体积小,适合色彩丰富的图片
PNG 带透明背景或含文字的缩略图 无损压缩、边缘锐利,但体积较大
AVIF 追求极致压缩 比 WebP 还能再小约 30%,但编码慢、部分浏览器支持。
图片转换为本地Base64 / Data URL格式保存在本地存储中,以便随时加载显示。
同步区
是跨设备云端主数据库(D1/Sync API)同步。云端同步解决跨设备照片不能显示的问题。实现网络播放音乐和视频。视频画幅的自适应。增加视频下载功能。解决上传文件的问题。
密码区
需要在仓库说明:变量名称为PASSWORD。密码为管理员自己设定,还是加强密码?
要说明添加变量部署后,可用变量的密码登录。
连接区
可以连接kv,数据库和存储桶实现同步。优先d1数据库和r2存储桶。
这此和和文件的对应关系要在有一定了解后做决定。避免错配。
翻译区
注册面板增加关闭按钮。保存外部翻译 API 配置的可站内正常使用的功能实现,有保存按键。
上传区
博客,书架,相册,影音的文件列表模式都支持选择大图,中图,小图详情四种,和原布局模式。博客,书架,相册,影音实现文件批量上传,下载,删除功能。博客增加收藏区。
上传卡住,进度条不准确的问题。
最后全项目检查未知错误并修复。
私密区
备份区、备份区邮箱中枢、系统设置、网站图床专区仅管理员可见的实现。
权限明确
管理员账号的唯一性,一个项目不能有多个超级管理员。指定超级管理员名称为fox。
注册用户不可删除和编辑电子书,图片,视频和博客。注册用户仅限删除和发布博客的权利,并在发布页显示标记为注册用户的名称。
设置区注册用户列表的功能的完整。
网站功能区
可保存和删除图床任何互联网网站,网站以海报显示,有跳转地址,地址下面可保存自定义网站说明。默认为https://123456这个站点。网站功能区仅管理员可见。在底部页面区说明仅管理员可见的区。
指南区
Cloudflare D1(数据库)、R2(图片存储桶)与 KV 的对接规范、绑定变量说明及扩展指南。
修改仓库自述文件信息要符合最新分支,为更清晰明确的语言,更简单易懂。包括部署指南变量和其他信息。邮箱区,API区
可cf的pages拉取部署和上传部署。
可直接在cf后台绑定和R2和kv的实现。有效实时同步功能。在站内部署指南增加d1数据库和r2对象存储的使用说明。
一个名为fox3的博客项目,在仓库写出项目介绍,部署指南,构建说明,变量。实现各种方式和平台的部署。含腾讯云和阿里云。cf的一键拉取部署优先,pages一键上传文件部署要说明获取上传包的方式。漂亮的界面。
邮箱区:
实现发信功能有使用支持 保存API 的第三方邮件服务。
实现“注册邮箱/验证码”发信功能。
验证码自动回复的实现。
收信方式用Cloudflare Email Routing或其他。有保存配置的预留和显示,实现管理员可站内向用户邮箱回信。完整的信件管理功能区,管理员可以站内发信,查看,删除,回复,批量管理,有信件回收站功能。有收发限制开关,超3千封限制。邮箱的信息如果优先存数据库,没有也支持kv。
首页介绍区:
首页介绍区自定义图片后,图片背景的可视化实现。
备份区:
外接备份管理区增加坚果云或其它WebDAV文件管理区,但在设置的WebDAV接入坚果云或其它网盘后,可视化管理已上传的文件,实现可选择博客备份和恢复,预防服务器运营风险。要考虑自己的技术问题,如果没有及时排错的环境,不建议过多的功能加入。
商品区
新增商品区,展示区可上传和删除多张图片,可管理多个商品展示区,可设定价格和商品说明,可接入各种收费方式的预留接口实现,包括paypal,万里汇,微信,支付宝。设定和订单,收费方式接口仅管理员可见仅管理员可见并说明。可提交订单选择数量。提交的订单必须填写联系地址和电话,邮箱。商品展台聊天窗口的实现,管理员在可以在后台和用户对话。管理员可后台查看订单,分为已支付和未支付。
其它:
上传和下载进度条在操作时出现。 电子书手机界面支持全屏观看,不挡住手机上方显示。 退出按钮和功能的正常。登录和注册面板的实现。页眉可打开和收拢。可自定义全站背景照片和自定义全站头像,照片首页介绍区照片都支持本地图片上传设定。系统管理区选项仅管理员可见。
设置区:
增加登录面板。可以编辑文章,可以发布和删除文章。文章可以上传本地配图。可以收藏文章,可以修改头像和主题名称。日期为实时网络时间,可修改时区。可自定义本地图片为背景。
主题调色与全局背景自定义选区,选区从上到下包含以下功能按键:自定义网站名称,主题调色按键 (一键快速配色),自定义背景调色板,自定义头像,全站背景照片,首页介绍区照片。
所有选区可打开和收拢。增加一键切换手机和电脑界面。
已注册用户管理列表选区。
注册和隐私区说明:
开启全站隐私保护(未注册游客仅可看博客)、仅限邮箱注册与注册开放策略
全站隐私开关 (未注册访客仅看博客)
开启后,未登录的外部访客仅能浏览博客文章,网盘、书架、影音、相册、AI编程等分区将严格对游客隐藏
仅限邮箱注册 (强制邮箱身份验证)
开启后新用户注册必须提供有效邮箱并验证,杜绝虚假机器人批量注水。
仓库自述文件:
《简述》
站内部署指南,仓库部署指南,要符合最新情况。可cf的pages拉取部署和上传部署。
可直接在cf仪表板绑定和R2和kv的实现。有效实时同步功能。在站内部署指南增加d1数据库和r2对象存储的使用说明。
一个名为fox3的博客项目,在仓库写出项目介绍,部署指南,构建说明,变量。实现各种方式和平台的部署。含腾讯云和阿里云。cf的一键拉取部署优先,pages一键上传文件部署要说明获取上传包的方式。
多种主题,漂亮的界面。
全局修复提示词
请检查全局项目找出问题。或在某一个区找问题。
(同步的正常,文件显示的正常,文件上传和下传的正常,文件保存的正常。,数据库,kv,存储桶使用的正常,连接的正常,设置信息的正常,状态灯的正常,收发邮件的正常,商品区的正常)
Translated by AI from 简体中文Original (简体中文)

可以共享、可以push的免费邮箱,更可使用自定义域名,完美契合您的各项需求。
4 replies
Sort order