Gyazoの開発の進め方/devlove-kansai2018-10-29 #DevKan

B81a8fa35a79d31881ca3d348f3e894a?s=47 pastak
October 29, 2018
1.1k

Gyazoの開発の進め方/devlove-kansai2018-10-29 #DevKan

B81a8fa35a79d31881ca3d348f3e894a?s=128

pastak

October 29, 2018
Tweet

Transcript

  1. Gyazoͷ։ൃͷਐΊํ Pasta-K pastak@notainc.com 2018/10/29(Mon) at DevLOVE Kansai

  2. Pasta-K / @pastak

  3. • ژ౎େֶ޻ֶ෦৘ใֶՊ ܭࢉػՊֶίʔε6ճੜ • KMC ݩ޿ใ • Nota Inc Gyazo։ൃνʔϜ

    ΞϧόΠτ • JavaScript / React / Ruby on Rails • Browser Extension • גࣜձࣾ͸ͯͳ ΞϧόΠτ • TypeScript
  4. • ژ౎େֶ޻ֶ෦৘ใֶՊ ܭࢉػՊֶίʔε6ճੜ • KMC ݩ޿ใ • Nota Inc Gyazo։ൃνʔϜ

    ΞϧόΠτ • JavaScript / React / Ruby on Rails • Browser Extension • גࣜձࣾ͸ͯͳ ΞϧόΠτ • TypeScript
  5. Gyazo Browser Extension

  6. Gyazo Browser Extension • Chrome • https://chrome.google.com/webstore/detail/gyazo/ffdaeeijbbijklfcpahbghahojgfgebo • Firefox •

    https://addons.mozilla.org/firefox/addon/gyazo-official/ • MS Edge • https://www.microsoft.com/ja-jp/p/gyazo-extension-for-edge/9nf31nnx69v1 • GitHub • https://github.com/gyazo/gyazo-browser-extension
  7. NOTA Inc and me • 2013/08 ౰࣌ϦʔυΤϯδχΞΛ͍ͯͨ͠େֶͷઌഐʹ༠ΘΕͯன͝͸ ΜΛ৯΂ʹߦͬͨͱ͜ΖɺԿނ͔ͦͷ··؀ڥߏஙΛͯ͠ΞϧόΠτʹ • ౰࣌͸ϝϯόʔ͕૿͑࢝ΊΔલͰগͳ͔ͬͨ

    • ҎޙɺChrome Extension΍͓ֆ͔͖ػೳͷϦχϡʔΞϧͳͲॾʑΛ୲౰ • ࠷ۙ͸ओʹReactͳͲϑϩϯτΤϯυपΓΛ୲౰
  8. Feature Works • Gyazoͷυϩʔػೳ • Gyazo for Linux ϝϯςφϯε •

    Scrapbox΁ͷ֤छม׵πʔϧ(OSS) • Ϗʔϧൃ஫ɾαʔόӡ༻
  9. ఆظతʹϏʔϧൃ஫ɾαʔόӡ༻͍ͯ͠·͢

  10. • 2018೥11݄9೔ɾ10೔ @ େࡕೆߓATC • OSSίϛϡχςΟ΍ΤϯδχΞίϛϡχςΟͳͲͷࡇయ • εςʔδاըͷ࢘ձ΍ΔͷͰྑ͚Ε͹͓ӽ͍ͩ͘͠͞ • https://www.k-of.jp/2018/

  11. Pasta-K / @pastak

  12. ΞδΣϯμ • Gyazoͷ։ൃ؀ڥʹ͍ͭͯ • GyazoͱυοάϑʔσΟϯά

  13. ࿩͢͜ͱͱ࿩͞ͳ͍͜ͱ • ࿩͢͜ͱ • Gyazoͷ։ൃ؀ڥ΍։ൃख๏ • Gyazoͷ։ൃνʔϜ಺ͰͷৼΔ෣͍ʹ͍ͭͯ • ࿩͞ͳ͍͜ͱ •

    ͜Ε·Ͱͷ։ൃͰಘͨࡉ΍͔ͳ஌ݟ • GyazoͷΞϓϦέʔγϣϯઃܭ͔Β׆͔ͤΔΞϓϦέʔγϣϯ։ൃςΫχοΫ
  14. ։ൃࣗମʹಥͬࠐΜͩ࿩Λ஌Γ͍ͨਓ޲͚ • ReactͱCanvasͰ͓ֆ͔͖ػೳΛ࡞ͬͨ࿩ https://blog.pastak.net/entry/2016/08/ 21/165213 • ͓ֆ͔͖ମݧ޲্࡞ઓ https://blog.pastak.net/entry/2016/10/22/134648 • BrowserExtension࢛ํࢁ࿩

    https://speakerdeck.com/pastak/browserextensionsi- fang-shan-hua-number-yapc8oji • ϒϥ΢β֦ுͷΫϩεϒϥ΢βରԠʹ͍ͭͯͲ͏޲͖߹͍ͬͯΔ͔ https:// speakerdeck.com/pastak/burauzakuo-zhang-falsekurosuburauzadui-ying- nituitedouxiang-kihe-tuteiruka-number-builderscon
  15. Gyazoͷ։ൃ؀ڥʹ͍ͭͯ

  16. ݱࡏͷGyazoͷ։ൃ؀ڥʹ͍ͭͯ • ΞϓϦέʔγϣϯ • Ruby on Rails • React /w

    flow • Golang • GCP (GCE / Cloud Vision ...etc) • Cloud Flare
  17. ݱࡏͷGyazoͷ։ൃ؀ڥʹ͍ͭͯ • ίϛϡχέʔγϣϯ • Slack • GitHub /w ZenHub •

    Gyazo • Scrapbox • Google Hangout
  18. ݱࡏͷGyazoͷ։ൃ؀ڥʹ͍ͭͯ • جຊతʹશһ͕ϦϞʔτϫʔΫՄೳ • དྷि͸ࡳຈཱྀߦ͕͋ΔͷͰɺ๺ͷେ஍͔ΒϦϞʔτϫʔΫ༧ఆ • ϕτφϜ͔ΒϦϞʔτϫʔΫͨ͜͠ͱ΋͋Δ • PR͸GitHubɺٞ࿦͸Slack +

    ScrapboxɺԣஅతʹGyazo • ϖΞϓϩ΋VSCode Live Share΍Slack௨࿩Ͱ https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare
  19. Chat Ops /w GitHub Bot and CI • PR →

    commit͝ͱʹ staging؀ڥࣗಈੜ੒ɾߋ৽ → deployment APIͰ௨஌ • ninja: release <REPO_NAME> ͱνϟοτʹଧͭͱrelease༻ͷPRͱ֬ೝ༻ ͷ؀ڥ͕ߏங͞ΕΔ • ࠷ۙ͸PR͕merge͞ΕΔͱࣗಈͰˢͷൃݴΛͯ͘͠ΕΔΑ͏ʹਐԽ • release༻ͷPR͕merge͞ΕΔͱdeploy։࢝ • جຊతʹ͸શͯͷϓϩδΣΫτͰಉ༷ͷΠϯλʔϑΣΠεΛར༻Ͱ͖Δ
  20. Chat Ops /w GitHub Bot and CI

  21. Chat Ops /w GitHub Bot and CI • ੲ͸ࣃΛ৯͍͠͹ͬͯखݩͰcapίϚϯυΛଧ͍ͬͯͨࠒ΋͋ͬͨ •

    Chat Opsͱݴ͏͚Ͳɺ࠷ۙ͸νϟοτͷίϚϯυݺͼग़͠΋ࣗಈԽ ͍ͯ͠ΔͷͰɺ࠷ૣνϟοτͰ͸ΦϖϨʔγϣϯͯ͠ͳ͍ʹ౳͍͠ • ศར
  22. λεΫɾਐḿ؅ཧ • GitHub /w ZenHub + Scrapbox • ৄ͘͠͸VPoEͷ@akiroom͕࿩͍ͯ͠Δ͸ͣʁ

  23. ͣͬͱมΘ͍ͬͯͳ͍͜ͱ • Ͳ͜Ͱ΋ಇ͚Δ • ͱݴͬͯ΋Ҏલ͸݁ߏΈΜͳΦϑΟεʹډΔن໛ײͩͬͨ • ࠷ۙ͸σϑΥϧτϦϞʔτϫʔΫͳਓ΍೔ʹΑͬͯ͸2,3ਓ͔͠Φ ϑΟεʹډͳ͍೔΋

  24. ͣͬͱมΘ͍ͬͯͳ͍͜ͱ • Gyazo͕͋ΒΏΔίϛϡχέʔγϣϯͷத৺ʹ͋Δ • GitHub΍νϟοτʹ΋εΫγϣΛυϯυϯషΔ • Gyazo / Gyazo GIF

    • υϩʔػೳͰ໼ҹ΍จࣈɺғΈͳͲ • ػೳϨϏϡʔɺσβΠϯϨϏϡʔɺϢʔβʔαϙʔτଧͪฦ͠
  25. Gyazo͕͋ΒΏΔίϛϡχέʔγϣϯͷத৺ʹ͋Δ • PRͷઆ໌΋Gyazo GIFͰBefore/After ΛࡌͤͯڍಈͷมߋΛΘ͔Γ΍͘͢ • ϨϏϡʔͷଧͪฦ͠ɺಛʹUIͷ͜ͱΛ ؚΉͱ͖΋Gyazo΍GIFͰ

  26. গ͠มΘͬͨ͜ͱ • νϟοτπʔϧ • Scrapboxಋೖ • Sprint MTG։࢝ • AWS→GCP

    / CoffeeScript → ES2015 + React +flow
  27. গ͠มΘͬͨ͜ͱ • νϟοτπʔϧ • HipChatΛ࢖͍ͬͯͨ • ಛʹOGPରԠͱ͔ͳ͔ͬͨͷͰɺAddonఏڙ͍ͯͨ͠ • https://marketplace.atlassian.com/apps/1213139 •

    2014/8ࠒ Slack΁Ҡߦ
  28. গ͠มΘͬͨ͜ͱ • Scrapboxಋೖ • Qiita:TeamΛ࢖͍͕ͬͯͨɺ͋·Γ׆༻Ͱ͖͍ͯͳ͔ͬͨ • ૿Ҫ͞Μ͕࡞͍ͬͯͨgyazzͱ͍͏wikiͷಋೖ͕ܖػ • ౰ॳ͸͋Μ·ΓੵۃతͰ͸ͳ͔ͬͨ΋ͷͷ࢖͍࢝ΊΔͱྑ͕͞ਁಁࣾ͠಺ඪ४Խ •

    ίϯηϓτΛܧঝ͠ਐԽͤͯ͞Scrapbox΁ • 1೥΄Ͳࣾ಺ར༻͠βެ։ˠຊϦϦʔε
  29. গ͠มΘͬͨ͜ͱ • Sprint MTGͷಋೖ • ͜͜΋ৄ͘͠͸@akiroom͕࿩͍ͯ͠Δ͸ͣʁ

  30. গ͠มΘͬͨ͜ͱ • AWS→GCP / CoffeeScript → ES2015 + React +

    flow • Gyazoࣗମ͸RailsͰॻ͔Ε͍ͯΔΞϓϦέʔγϣϯ • ن໛͸ͦΜͳʹେ͖͘ͳ͍ • ఆظతʹٕज़ελοΫ͸ݟ௚ͨ͠ΓೖΕସ͑ͨΓ͍ͯ͠Δ • ଞʹ΋PHPͩͬͨΞοϓϩʔυɾαϜωΠϧαʔόΛGoͰॻ͖௚ͨ͠Γ
  31. ϑϩϯτΤϯυ؀ڥͷมભ • ଠݹʙ jQuery UI • 2014/03ʙ AngularJS • 2015/01ʙ

    React • 2015/02ʹ͸ओཁϖʔδͷશ͕ͯReactʹҠߦ
  32. ϑϩϯτΤϯυ؀ڥͷมભ • Rails͕CoffeeScript͕ͩͬͨɺ2015೥4݄຤ʹBabelಋೖ • 2014/12ʹ asset-pipeline ͸୤ग़ࡁΈͩͬͨ • 2015೥11݄ʹCoffeeScriptΛґଘ͔Β࡟আ •

    ͜ͷࠒ͸ReactΛ࢖͍ͭͭ΋ɺCS, ES5, ES6͕͍ࠞͬͯͨ͟͸ͣ • https://scrapbox.io/pastak-pub/GyazoͷϑϩϯτΤϯυ͔Β൥೰ΛऔΓ෷͍͑ͯ Δͷ͔
  33. Gyazoͷ։ൃ؀ڥʹ͍ͭͯ • جຊతͳϑΟϩιϑΟʔ͸Ұ؏͍ͯ͠Δ • ϦϞʔτͰ΋ඇಉظͰ΋ಇ͚Δɻ • Gyazo΍Scrapboxɺࣗ෼ͨͪͷπʔϧ͕ಇ͖ํͷίΞʹ͋Δɻ • ۃྗ৭Μͳ͜ͱΛαϘΕΔΑ͏ʹɻChat Ops͔ΒChatཁૉ͑͞΋ࣺͯΔɻ

    • ΞϓϦέʔγϣϯελοΫ͸ͲΜͲΜมߋ͢Δ • ୭Ͱ΋มߋՄೳ • ͜ͷล͸࣍ͷষͰ΋࿩͠·͢
  34. GyazoͱυοάϑʔσΟϯά

  35. Gyazoͷ৽ػೳͷੜ·Εํ • Ϗδωεతͳཁ๬ • VPoEͱ͔͔Βཔ·ΕͯSprintͷλεΫʹ૊Έࠐ·ΕΔ • υοάϑʔσΟϯά͔Βͷൃੜ • ͬͪ͜ͷ࿩Λ͠·͢

  36. υοάϑʔσΟϯά υοάϑʔσΟϯάͱ͸ɺγεςϜ΍αʔϏεΛ։ൃऀࣗ਎͕ੵۃ తʹར༻ͯ͠ɺ໰୊఺΍վળ͢΂͖఺ΛࣗΒൃݟ͍ͯ͘͠ɺͱ͍͏ औΓ૊Έͷ͜ͱͰ͋Δɻਖ਼ࣜϦϦʔεલͷαʔϏεΛݕূ͢Δख๏ ͱͯ͠ݴٴ͞ΕΔ͜ͱ΋͋Ε͹ɺϦϦʔεޙͷαʔϏεΛ೔ৗతʹ ༻͍ͯվળ఺Λݟग़͢ӦΈΛࢦ͢ޠͱͯ͠ݴٴ͞ΕΔ͜ͱ΋͋Δɻ from https://www.weblio.jp/content/υοάϑʔσΟϯά

  37. Gyazo։ൃνʔϜͷ߹ݴ༿ • Move Fast and Break Things • ݩ͸FacebookͷϞοτʔ •

    ʰૉૣ͘ߦಈ͠ഁյͤΑʱ • ҊͣΔΑΓ࢈Ή͕қ͠ • ΞϓϦέʔγϣϯΛͲΜͲΜഁյతʹมԽ͍ͤͯ͘͜͞ͱΛڪΕͳ͍
  38. Gyazo։ൃνʔϜͷ߹ݴ༿ • ͱʹ͔͘σϞϑΝʔετ • σϞΛେࣄʹ͍ͯ͠Δ • ΞΠσΞΛٞ࿦͢Δͱ͖΋݁ہ͸࡞ͬͯΈͳ͍ͱ෼͔Βͳ͍ • ࢥͬͨΑΓ΋ྑ͍ /

    ࢥͬͨΑΓ΋ѱ͍(͚ͲΑ͘Ͱ͖ͦ͏) • উखʹ໘ന৽ػೳΛ࡞ͬͯσϞͯ͠ɺϦϦʔε΋೔ৗ஡൧ࣄ
  39. υϩʔػೳͷ৽ػೳ͸σϞϑΝʔετ • GyazoͷProϓϥϯ޲͚ػೳͱͯ͠υϩʔ(͓ֆඳ͖)ػೳ͕͋Δ • ॳظͷػೳ: ࢛֯Ͱғ͏ɺ௚ઢΛҾ͘ɺ໼ҹΛ଍͢ɺจࣈೖΕ

  40. υϩʔػೳͷ৽ػೳ͸σϞϑΝʔετ • GyazoͷProϓϥϯ޲͚ػೳͱͯ͠υϩʔ(͓ֆඳ͖)ػೳ͕͋Δ • ॳظͷػೳ: ࢛֯Ͱғ͏ɺ௚ઢΛҾ͘ɺ໼ҹΛ଍͢ɺจࣈೖΕ • ݱߦͷػೳ: ϖϯπʔϧɺ࢛֯ͰృΓͭͿ͠ɺελϯϓɺϞβΠΫ •

    ͦΕΒͷ࠶ฤू΍ॏͶ߹Θͤॱ੾Γସ͑ɺ৭΍ಁ໌౓ͷࣗ༝બ୒
  41. υϩʔػೳͷ৽ػೳ͸σϞϑΝʔετ • GyazoͷProϓϥϯ޲͚ػೳͱͯ͠υϩʔ(͓ֆඳ͖)ػೳ͕͋Δ • ॳظͷػೳ: ࢛֯Ͱғ͏ɺ௚ઢΛҾ͘ɺ໼ҹΛ଍͢ɺจࣈೖΕ • ݱߦͷػೳ: ϖϯπʔϧɺ࢛֯ͰృΓͭͿ͠ɺελϯϓɺϞβΠΫ •

    ͦΕΒͷ࠶ฤू΍ॏͶ߹Θͤॱ੾Γସ͑ɺ৭΍ಁ໌౓ͷࣗ༝બ୒ ͜͜͸࡞ઓΛ࿅ͬͯ࠶ઃܭ͠௚ͨ͠
  42. υϩʔػೳͷ৽ػೳ͸σϞϑΝʔετ • GyazoͷProϓϥϯ޲͚ػೳͱͯ͠υϩʔ(͓ֆඳ͖)ػೳ͕͋Δ • ॳظͷػೳ: ࢛֯Ͱғ͏ɺ௚ઢΛҾ͘ɺ໼ҹΛ଍͢ɺจࣈೖΕ • ݱߦͷػೳ: ϖϯπʔϧɺ࢛֯ͰృΓͭͿ͠ɺελϯϓɺϞβΠΫ •

    ͦΕΒͷ࠶ฤू΍ॏͶ߹Θͤॱ੾Γସ͑ɺ৭΍ಁ໌౓ͷࣗ༝બ୒ ීஈͷ࢖༻΍ࡶஊͷத͔Βศརͦ͏ͳ ΞΠσΞΛউखʹ࣮૷ͯ͠PR stagingͰσϞΛͯ͠ྑ͍ײ৮ͩͬͨ ͷͰͦͷ··੔͑ͯϦϦʔε
  43. ͲΜͲΜσϞ͢Δ • ୭Ͱ΋GyazoʹؔΘΔશͯͷίʔυΛ(PRΛհͯ͠)มߋͰ͖Δ • ͳΜ͔ཉ͍͠ػೳɺ೔ʑͷจ͕۟͋Ε͹PRͰઓ͏ • ʮͳΜ͔γϡοͱࢼͨ͠Β΍Εͦ͏ͩͳʯͱࢥͬͨΒ·͊΍ͬͯΈΔ • ΊͬͪΌ͔͔࣌ؒΔͳΒ૬ஊɺͦ͏͡Όͳ͔ͬͨΒγϨοͱ΍Δ •

    ͦͷล΋Sprint MTGͰԹ౓ײΛڞ༗
  44. γϡοͱ΍ͬͨΒग़དྷͨྫ • Browser ExtensionͷHTMLཁૉͷBoxʹ߹Θͤͯͷ੾ΓऔΓ • ඞཁͩͱࢥͬͯͳ͔͚ͬͨͲɺࣾ಺ͷҰ෦͔Βͷ೤྽ͳཁ๬ • ృΓͭͿ͠ػೳ • ʮ࢛֯ඳ͍ͯΔ͔ͩΒதΛృΔ͚ͩ͡ΌΜʁʯ

    • ϞβΠΫػೳ • ʮ࢛֯ͷྖҬऔಘ͢Δํ๏͋ΔͳΒྲྀ༻ͯ͠ൣғΛϞβΠΫॲཧ͢Ε͹͍͍͡ΌΜʯ
  45. γϡοͱ΍ͬͨΒྑ͔ͬͨͷͰ௕ߟʹೖͬͨྫ • HipChat / Slack Bot͸΍ͬͨΒศརͱ͍͏͜ͱ͕໌֬ʹ෼͔͍ͬͯͨͷ Ͱɺ࢖༻ײΛࢼͨ͢ΊͷࡶͳϓϩτλΠϓͰ࣮ફͯ͠Έ͔ͯΒɺͪΌΜ ͱॻ͖௚ͨ͠ • υϩʔػೳͷϦϓϨΠε͸ͦΕ·Ͱʹͳ͔ͬͨר͖໭͠ʢཤྺʣػೳ΍

    ཁૉͷೖΕସ͑ɾ࠶ฤूΛ࡞ͬͨͷͰɺUI/UXؚΊ͔ͯͳΓͷٞ࿦͕͋ͬ ͨɻઃܭ΋ReactΛ࢖ͬͯ࠶ઃܭ͍ͯͨ͠ • ͜Ε΋࠷ॳͷσϞ͸ௗऔͰϦϞʔτϫʔΫ͠Α͏ͱߦͬͨͱ͖ʹॻ͍ͨ
  46. A/Bςετ • A/BςετΛ΍͍ͬͯͨ࣌୅΋͕͋ͬͨࠓ͸΄΅΍͍ͬͯͳ͍ • ͲΜͲΜdeployͨ͠Γrollbackग़དྷΔ࢓૊Έ͕͋ΔͷͰɺΤΠϠ ͱग़ͯ͠վળΛॏͶ͍ͯ͘ελΠϧ • υϩʔػೳͷվળ΋ग़͔ͯ͠Βඍमਖ਼Λ͢Δ͜ͱ΋ଟʑ͋Δ

  47. ελοϑ޲͚ػೳ

  48. ελοϑ޲͚ػೳ • A/Bςετͷ୅ΘΓʹελοϑ޲͚ػೳΛ؆୯ʹ࣮૷Ͱ͖ΔΑ͏ʹ ͸࢓૊ΈΛ༻ҙ͍ͯ͠Δ • ྫ͑͹৽σβΠϯ΍υϩʔػೳͷϦϓϨΠεͳͲӨڹ͕େ͖͍΋ ͷ͸࡞Γͳ͕Βελοϑ؀ڥͰ೔ʑυοάϑʔσΟϯά͍ͯ͠Δ • PR͕େ͖͘ͳΓ͗͢Δ͜ͱΛ๷͙෭࡞༻΋͋Δ

  49. • Gyazoͷ։ൃ؀ڥʹ͍ͭͯ࿩͠·ͨ͠ • Gyazo΍ScrapboxͳͲΛ࢖ͬͯϦϞʔτͰ΋շదʹա͍ͯ͝͠·͢ • υοάϑʔσΟϯάΛߴ଎ʹ৯΂ΔͨΊʹͱʹ͔͘σϞΛେࣄʹ͍ͯ͠ ·͢ • ͦΕΛ׆͔ͨ͢ΊʹͲΜͲΜϦϦʔε͍ͯ͘͠ͱ͍͏࡞ઓʹͳ͍ͬͯ·͢ •

    Sprint MTGͰ͜ΕΒΛϢϧ͘؅ཧ͞Ε͍ͯ·͢ ·ͱΊ