logo
0
0
WeChat Login

Afilmory

现代化高性能照片画廊,基于 React + TypeScript + Cloudflare Pages 构建。

特性

  • 🖼️ 高性能 WebGL 图片查看器
  • 📱 响应式瀑布流布局
  • 📷 完整 EXIF 信息展示
  • 🗺️ GPS 坐标地图展示
  • 🌐 多语言支持
  • ⚡ 增量同步,只处理新照片

快速部署到 Cloudflare Pages

1. Fork 项目

点击右上角 Fork 到你的 GitHub 仓库

2. 配置

创建 configs/你的客户名.json

{ "name": "Gallery Name", "title": "My Photo Gallery", "description": "Capturing beautiful moments", "url": "https://your-project.pages.dev/", "accentColor": "#fb7185", "author": { "name": "Your Name", "url": "https://example.com", "avatar": "https://example.com/avatar.jpg" }, "social": { "github": "username" }, "map": ["maplibre"], "mapStyle": "builtin", "mapProjection": "mercator" }

3. Cloudflare Pages 配置

配置项
生产分支main
构建命令cp configs/你的客户名.json config.json && pnpm install && pnpm --filter web build
输出目录apps/web/dist

4. 环境变量

在 Cloudflare Pages 设置以下变量:

变量名说明
S3_ENDPOINTS3 端点
S3_ACCESS_KEY_IDAccess Key
S3_SECRET_ACCESS_KEYSecret Key
S3_BUCKET存储桶名称
S3_REGION区域
S3_PREFIX照片路径前缀

本地开发

# 安装依赖 pnpm install # 复制配置 cp config.example.json config.json # 修改 config.json 和 builder.config.ts # 开发模式 pnpm --filter web dev

多客户部署

同一仓库支持多个客户:

configs/ ├── muti.json # muti 客户 ├── iu.json # IU 客户 └── xxx.json # 新客户

每个客户创建独立的 Cloudflare Pages 项目,构建命令指定对应的配置文件即可。

License

MIT

About

No description, topics, or website provided.
10.25 MiB
0 forks0 stars1 branches0 TagREADMEOther license
Language
TypeScript98.2%
MDX0.9%
JavaScript0.4%
CSS0.3%
Others0.2%