Skip to content

Commit e79bb12

Browse files
committed
Merge branch 'develop'
2 parents a6f2ef9 + c39064d commit e79bb12

90 files changed

Lines changed: 21742 additions & 7853 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/copilot-instructions.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Skyshare
2+
3+
Skyshareは、以下の機能を持ちます
4+
5+
- Blueskyクライアント
6+
- Blueskyに投稿されたイメージを用いたOGP画像の生成
7+
- OGP画像が設定されたページの動的作成および共有

.github/workflows/manual_build_and_deploy.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ jobs:
4848
npm install && npm run build
4949
working-directory: ./astro
5050
env:
51-
PUBLIC_CREATEPAGES_ENDPOINT: ${{ vars.PUBLIC_CREATEPAGES_ENDPOINT }}
52-
PUBLIC_DELETEPAGE_ENDPOINT: ${{ vars.PUBLIC_DELETEPAGE_ENDPOINT }}
53-
PUBLIC_GETPAGES_ENDPOINT: ${{ vars.PUBLIC_GETPAGES_ENDPOINT }}
54-
PUBLIC_IS_NOT_PRODUCTION: ${{ vars.PUBLIC_IS_NOT_PRODUCTION }}
51+
PUBLIC_BACKEND_ENDPOINT: ${{ vars.PUBLIC_BACKEND_ENDPOINT }}
5552

5653
- name: Publish to Cloudflare Pages
5754
id: publish

astro/.astro/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"devToolbar": {
33
"enabled": false
4+
},
5+
"_variables": {
6+
"lastUpdateCheck": 1766732404983
47
}
58
}

astro/.env.development

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
PUBLIC_CREATEPAGES_ENDPOINT="http://192.168.3.151:5000/ogp-generator-5f516/asia-northeast1/dev_ogp_generator"
2-
PUBLIC_DELETEPAGE_ENDPOINT="http://192.168.3.151:5000/ogp-generator-5f516/asia-northeast1/dev_editdb_endpoint"
3-
PUBLIC_GETPAGES_ENDPOINT="http://localhost:8087"
4-
PUBLIC_IS_NOT_PRODUCTION=${PUBLIC_IS_NOT_PRODUCTION:-true}
1+
PUBLIC_BACKEND_ENDPOINT="http://192.168.3.151:3000/api/v1"

astro/.env.template

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
PUBLIC_CREATEPAGES_ENDPOINT="createpages_endpoint" # set firebase fucntion endpoint
2-
PUBLIC_DELETEPAGE_ENDPOINT="deletepage_endpoint" # set firebase funciton endpoint
3-
PUBLIC_GETPAGES_ENDPOINT="getpages_endpoint" # set cloudflare worker endpoint
4-
IS_NOT_PRODUCTION="true_or_false" # if not deploy to prod, set flag true. if prod, need not to set or set false
1+
PUBLIC_BACKEND_ENDPOINT="backend_endpoint" # set firebase fucntion endpoint

astro/CHANGELOG.md

Lines changed: 50 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
11
# Skyshare 更新履歴
22

3+
## 1.6.0
4+
5+
### Minor Changes
6+
7+
- バックエンドの仕組みを抜本的に改修しました。
8+
- FaaSを一本化しました。Cloudflare Workerの実行内容もFirebase Functionsに統合しました。
9+
- APIをOpenAPIHonoを用いてリファクタしました。超見やすいです。
10+
- Upstash Redis Clientを一般的なRedisクライアント(`redis/ioredis`)に置き換えました。
11+
- Firebase Storageを一般的なオブジェクトストレージクライアント(`aws-sdk/client-s3`)に置き換えました。
12+
- ローカルでの実行手順を強化しました。
13+
- 追従してフロントエンドの一部を修正しました。
14+
- オブジェクトストレージをGoogleCloudStorageからCloudflareR2に置き換えました。また、データベースを複数利用可能にしました。
15+
- サービス課金額が大きく減少するであろうことを見込んでOGPの有効期限を90 → 365日に延長することにしました。やったね。
16+
- ただし、容量の肥大化状況によっては1ユーザの投稿リミットを設ける等の対応は検討しています。一日一人100件超えとかしなければ大丈夫だとおもいます。
17+
- バックエンドの改修に紐づき、一部の機能をオミットしました。
18+
- 生成したOGPページ一覧の表示機能を削除しました。データベースにRedisを用いており、`scan`コマンドはデータベース上のデータ量に比例してリクエスト回数が増加し、課金額が上がるためです。
19+
- <a href="https://bsky.app/profile/nekono.dev/post/3mb62zbwp4224">横長画像の投稿がBluesky公式クライアントでは余白が表示されてしまう問題</a>への対処ができませんでした...
20+
- 現在、公式クライアントでは従来の`com.atproto.repo.createRecord`ではなく`com.atproto.repo.applyWrites`というAPIを用いているようです。
21+
- `app.bsky.embed.images#view``aspectRatio``createRecord`では付与されず、これが原因のようでした。
22+
```
23+
"embed": {
24+
"$type": "app.bsky.embed.images#view",
25+
"images": [
26+
{
27+
"thumb": "https://cdn.bsky.app/img/feed_thumbnail/plain/did:plc:quimkpbfh6mdasxs426v6ogy/bafkreib6rcvuywlkzemoq7d73evwfx32dd3rerwyzmdozxpibzz74xt3em@jpeg",
28+
"fullsize": "https://cdn.bsky.app/img/feed_fullsize/plain/did:plc:quimkpbfh6mdasxs426v6ogy/bafkreib6rcvuywlkzemoq7d73evwfx32dd3rerwyzmdozxpibzz74xt3em@jpeg",
29+
"alt": "",
30+
"aspectRatio": {
31+
"height": 1137,
32+
"width": 2000
33+
}
34+
}
35+
]
36+
},
37+
```
38+
- 上記への対応として、`com.atproto.repo.createRecord``aspectRatio`を付与しましたが、解消できませんでした。
39+
- Skyshareは現在BlueskyAPIへの追従が非常に困難な状態になっており、フロントエンドについても抜本的改修が必要だと考えています。
40+
341
## 1.5.6
442

543
### Patch Changes
@@ -298,23 +336,23 @@
298336
- 今回のアップデートにて、投稿フォームのプレビュー画面にOGP画像を表示させるため、データの扱いを大幅に改修しました。これまで`Array<Files>: imageFiles`と定義していた変数は`MediaData`としてより広い役割を持つようになりました。`MediaData`型は`LinkCard``Images`、メディアが存在しない場合の`null`のユニオン型で、以下のように定義されています。
299337

300338
```ts
301-
export type MediaData = LinkCard | Images | null;
339+
export type MediaData = LinkCard | Images | null
302340
type LinkCard = {
303-
type: "external";
341+
type: "external"
304342
images: Array<{
305-
blob: Blob | null;
306-
}>;
343+
blob: Blob | null
344+
}>
307345
meta: ogpMetaData & {
308-
url: string;
309-
};
310-
};
346+
url: string
347+
}
348+
}
311349
type Images = {
312-
type: "images";
350+
type: "images"
313351
images: Array<{
314-
alt: string;
315-
blob: Blob;
316-
}>;
317-
};
352+
alt: string
353+
blob: Blob
354+
}>
355+
}
318356
```
319357
320358
- これまで`Array<File>`型で定義していた変数は`Images.images.blob`に、`Blob`型として配置されています。これはプレビューの作成や実際の`createRecord`の際に`File`型である必要がないためです。

astro/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ docker run --rm -v $PWD:/src -w /src -u `id -u`:`id -g` -p 80:4321 -it node:18.1
1717
setup .env:
1818

1919
```sh
20-
PUBLIC_CREATEPAGES_ENDPOINT="createpages_endpoint" # set firebase fucntion endpoint
21-
PUBLIC_DELETEPAGE_ENDPOINT="deletepage_endpoint" # set firebase funciton endpoint
22-
PUBLIC_GETPAGES_ENDPOINT="getpages_endpoint" # set cloudflare worker endpoint
23-
PUBLIC_IS_NOT_PRODUCTION="True_or_False" # if not deploy to prod, set flag true. if prod, need not to set or set false
20+
PUBLIC_BACKEND_ENDPOINT="backend_endpoint" # set firebase fucntion endpoint
2421
```
2522

2623
## Debug

astro/astro.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@ export default defineConfig({
1818
tailwind(),
1919
partytown()
2020
],
21-
output: "hybrid",
2221
adapter: cloudflare(),
2322
});

0 commit comments

Comments
 (0)