Giter Site home page Giter Site logo

totegamma / concurrent-world Goto Github PK

View Code? Open in Web Editor NEW
52.0 4.0 14.0 4.03 MB

One of the client implementations of 'concurrent', which serves as the foundation for a distributed microblogging service.

Home Page: https://concurrent.world

License: MIT License

HTML 0.21% TypeScript 99.78% Shell 0.01%
react sns-client typescript distributed-sns microblog

concurrent-world's Introduction

Hi there 👋

🦊 totegamma | ととがんま

Checkout My Website

concurrent-world's People

Contributors

7ka-hiira avatar hennnatori avatar kznrluk avatar naborisk avatar oinarisummer avatar ouroboros723 avatar rassi0429 avatar ryotn avatar tigerwall avatar totegamma avatar waonme avatar zozokasu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

concurrent-world's Issues

認証エンドポイントの導入に向けてfetchをラップする

今fetchがそのままいろんな場所で書かれていて、トークン等のcredentialsをそこに配って回るのは大変
認証方式が変わった時に変更する場所が1箇所で良いようにしたい。

Reactにおけるベストプラクティスはわかってないのだけど、場合によってはRepositoryサービスがあるといいかも?

swでAPIアクセスをキャッシュする

今はセッションでしか持っていないので、ブラウザをリロードするたびに全てgetしている
messageやcharacterはほぼ変更ないので、(半)恒久ストレージに入れちゃってもいいかも?(indexeddbとかcachestorage?とか(よくわかってない))(自動でリテンションしてくれると便利ではある)

messageに関しては、それに紐づくassociationのリストは頻繁に変更があるのでそこは注意
また、characterは低頻度であれどプロフィール更新で変わるので、何かしらのcache invalidateの仕組みが必要

案1 websocketイベント
一番簡単だけどオフラインの人が更新できない。当然ボツ。

案2 messageにして流す
プロフィールを更新したよ!(からcache invalidateしてね!)というメッセージを送信する。
クライアントはmessage.idをキャッシュしておいて、まだ更新してないメッセージなら更新する。
cons: タイムラインに出ちゃう(隠せるがいちいちfilterするのめんどくない) (個人的には出ても良いのではという気もするがサイレントにしたい人もいるかも?)

案3 associationにして次回メッセージ送信時に自己associationする
プロフィールを更新したよというassociationタイプを作って、自分の次のメッセージ送信時に自分でつける。
タイムラインには出ないし取り回しは良いが、メッセージを出すまで気づかれない。

markdownのプレビューを作る

UIをどうするかを決める必要がある
Timelineに組みこみの投稿ビューだけでなくて、モーダル的な投稿ビューもいずれ作ることになるのではないかと思っていて(要検討)、そうすると2種類の投稿コンポーネントを作ることになるが、その両方にこれが必要とは思わない。
具体的には、Timeline組み込みの投稿ビューはいわゆる「lite」な投稿ビューなのでプレビューはなし
モーダルの投稿ビューは完全版なのでプレビュー有りという感じが自然?

それはそれとして、サクっと投稿チェックしたいので両方につけるベキという意見も十分にある。

offline signerを作る

metamaskを使うと、ふぁぼるたびに確認が出てとてもダルい。concurrent専用のウォレットを作りたい。

絵文字リアクションが打てるように

これはスキーマの定義が必要です

スキーマの中に絵文字の画像URLを直接含めてください。
他の絵文字リアクションとの集計は名前ではなく画像URLの同一性で判断すると良さそうです。
このとき、URLが同じなのに絵文字の名前がコンフリクトした場合の処理を考える必要がありますが、それはひとまず1番目とかで良さそう。
しかし、他の人がつけたリアクションの名前を不適切な名前に上書きする攻撃がまかり通ってしまうので、詳細に考える必要は今後発生します(これはこのissueのスコープ外とする とにかく絵文字リアクションができることを一旦優先)。

モバイル対応したい

メニューアイコンを下に入れて、お気に入りチャンネルが上のバーでドロップダウンで選択できるようになると良さそう

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.