Naoya Tanikawa
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Hack U ## サービス名 両思いチェッカー(仮) ### リンク * [概要(未記入)](https://hackmd.io/@Do4KaluGSdqG9u8oPkw7pg/rkJysgzyc/edit) * [補足](https://hackmd.io/@Do4KaluGSdqG9u8oPkw7pg/r1TwNgzk9/edit) * [メッセージテキスト](https://hackmd.io/@Do4KaluGSdqG9u8oPkw7pg/rJUe9lfk5/edit) * [何でも相談会フィードバック](https://hackmd.io/@Do4KaluGSdqG9u8oPkw7pg/SkknpSzec) ## 機能 ### 機能目次 - 初回登録ページ - プロフィールページ - 相手のSNS指定 - 両想いの場合の通知 - 想定している対象デバイス ### 初回登録ページ - SNSを入力してロクイン ### プロフィールページ - プロフィールの参照 - 自分が好きな相手の編集(好きな相手の好き度などを編集) - ログアウト - アカウント削除 ## MVP - スマホサイズのウェブサイト - 初回登録ページ - SNS(Twitter)登録によるアカウント登録 - 友達リストページ? - 好きな人に設定する - 公式からのDMで通知 ### サブ - Twitterの乗っ取り - TLに投稿 - プロフィール - 好き度の変更 ### サブサブ - DMの内容を乱択でTLに流す - 成立したら追放 ## 事前準備 - フロントエンドの技術選定 - TypeScript, React - バックエンドの技術選定 - Go, gin, sqlx - https://github.com/gin-gonic/gin - https://github.com/jmoiron/sqlx - フロントとどう繋ぐか、API設計 - Swagger - DBのスキーマの設計 - mysql - デプロイ - zliのサーバ ### API設計 #### MVP - 友達リスト(マイページ) - 認証必須 - GET /friends - レスポンスは配列で相互フォローの人の情報が返ってくる - 好き度を設定する - 認証必須 - POST /friends/:id - リクエストのボディで好き度を渡す - レスポンスでマッチ成功したかどうかを返す - このタイミングでサーバーはお互いのTwitterのtokenを使ってDMに「好きです」を送る - TLに投稿 - 現在両思いになっている人がいるかどうかを確認する - 認証必須 - GET /me/lover - いれば両思いになっている人の情報を、いなければ404 not foundを返す - 好き度を設定した人一覧の取得 - 認証必須 - GET /me/lovers - 好き度を設定したユーザーの一覧を返す - 破局を報告する - 認証必須 - DELETE /me/lover - 破局理由、Twitterに公開していいかを送り、カップルのもう片割れが既に破局手続きをしていた場合はTwitterに公開するかの処理をする - 認証 - TwitterのAPI仕様によるのであとで決める #### サブ - 好きな相手の評価の削除※POSTとDELETEで編集可能 - DELETE /friends/:id - マッチした相手とのトークルーム - 過去の会話の取得 - GET /me/lover/talks - メッセージを送る - POST /me/lover/talks - リアルタイムで会話を取得する - Websocketでコネクションを貼る #### サブサブ - 公式のTwitterアカウントがDM、カップルを公開 - cronあたりを使って乱択する ### バックエンド #### 技術選定 - バックエンドの技術選定 - Go, gin, sqlx - https://github.com/gin-gonic/gin - https://github.com/jmoiron/sqlx - フロントとどう繋ぐか、API設計 - Swagger - DBのスキーマの設計 - mysql - デプロイ - zliのサーバ #### Goのパッケージ構成(WIP) - main.go - model - user.go - chat.go - love.go - controller // 主にginのハンドラを置く場所 - friends.go - me.go - chat.go - json.go - usecase // ビジネスロジックを置く場所 - get_twitter_login_url.go - handle_twitter_callback.go - friends_search.go - get_followees.go - get_followers.go - get_love_point.go - get_love_points.go - set_love_point.go - get_current_lover.go - delete_current_lover.go - get_chat_history.go - repository // MySQLとデータをやりとりする場所 - user.go - chat.go - service - twitter.go // Twitter APIとやりとりする - jwt.go // JWT周り ### フロント #### 使いそうなライブラリ - react(create-react-app) - react-router-dom - usehooks-ts - socket.io-client - #### 作成しそうなhooks - useId - 自身の id を取得する - useFriends - 自身の id とかを渡すと /friends を叩いてくれる - useLike - 好き度設定したりする - useChat - socket.io-client のラッパー的なやつ - messages: {id: string, text: string} - sendMessage(text: string) - hakyoku() - useTwitter(的なやつ) - useTwitterAuth - useTwitterShare - useTwitterLogin - などが必要になるやも #### 構成 - page - 初回ページ - Twitterログイン後のページ - 好きな人リストのページ - 好きな人がいる状態・いない状態 - 好きな人追加のページ - 両思いになった相手を知らせるのページ - (Twitter~のページと構成はほぼ同じ) - もう戻ってくるなページ - チャットルーム - 破局理由のページ - 格言ページ(開始可能・不可能のにパターンに対応) - component - テキストボタン - 背景有・無 - 押せる・押せない - ラジオボタン - チェックボックス - アイコン付きボタン - ボタングループ - ロゴ - ユーザのカード(編集ボタン有・無) - ユーザのリスト - ユーザアイコン(S・M・L) - ポップアップ - 中身は自由に入れられるといい - アイコン - + - ゴミ箱 - 編集 - ハート - 歯車 - 戻る(左矢印) - ハート(割れ) - 送信(紙飛行機) - 検索 - メッセージ - 自分から相手 - 相手から自分 - 入力欄 - 内部テキスト付き - 検索アイコン付き - 背景付属させるやつ - css - 汎用 - 背景 - 文字色 - スペーシング - 陰 -

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully