GithubHelp home page GithubHelp logo

twitter-clone-api's Introduction

twitter-clone-api's People

Contributors

kyu08 avatar

Stargazers

Kouhei Nakajima avatar M.tatsuya avatar

Watchers

James Cloos avatar

twitter-clone-api's Issues

follow を DDD 的に考えるとどうなる?

案1

FollowRequest class instance として扱う

properties

  • followingUserId
  • followerUserId

method

  • isFollowing(DBに問い合わせる)

Flow

  1. api request から FollowRequest class instance をつくる
  2. if (!isFollowing)
  3. FollowRequestDataModel に変換する
  4. build()する
  5. DB に INSERT する

Timline のためのビジネスロジック整備する

  1. [userId]がFollowしている[userId]を取得
  2. Tweet tableからその人たちのTweetを新しい方から20件取得
  3. それぞれUserName, UserImage, ScreenNameを取得
  4. マージしてTweetPropsをつくる
  5. TweetProps[] をレスポンスとしてかえす

timeline つくるときに tweet_index_table を介して tweet table の内容を読み込むようにする

そもそも以下の処理を同一の connection として行うか、別の connection かつ別の関数として行うか考える。 -> いま別々の関数ベースで書いてるのでいったんそっちでいく。

  • following id を取得
  • それをもとに tweet_index table から tweet_id[] を取得
  • tweetId をもとに各 table から tweet本体 を取得 (ここはいったん省略してすべて tweet table から取得っていうフローでもいいかもね)
  • tweet に user 情報を付加(キャッシュ使った方が良さそう)

やること

進捗

  • リファクタする(型, 命名)

WIP

やること

  • 本人のタイムラインを表示するようにする(follow relation table をつくる)
  • retweet できる
  • RT UI
  • Reply UI
  • reply できる
  • like できる
  • users table つくる
  • count 系 とってこれるようにする
  • 認証どうすんの(進捗ゼロ)
  • Notification(進捗ゼロ)
  • 認可

ざっくりとした流れ

  • Tweet, Reply できるようにする
  • RT, Like できるようにする

POST API 経由で Tweet できるようにする

1. test_table に API 経由で insert してみる
1. テーブルをつくる
1. API を書く(query)

  1. フロントを書く
  2. フロントの静的データのuserId も uuid にしよう(てかしないとDBで型エラーになる)

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.