Upgrade to Pro — share decks privately, control downloads, hide ads and more …

freee_biz_tech_20200205.pdf

 freee_biz_tech_20200205.pdf

877f92a3597118cda2715790fa170ad4?s=128

Junichi Okamura

February 05, 2020
Tweet

More Decks by Junichi Okamura

Other Decks in Technology

Transcript

  1. ˏ freee Biz Tech Frontier 2020 άϩʔόϧίϚʔεϓϥοτϑΥʔϜͷ APIΤίγεςϜ

  2. • Junichi Okamura, Technical Partner Manager at Shopify • @benzookapi

    • API Lover/Midnight Developer/MANGA Creator/Beer Lover/App Hacker Who am I?
  3. • ShopifyͱͦͷΤίγεςϜͷ֓ཁ • ShopifyͷΦʔϓϯͳٕज़ج൫ʹ͍ͭͯ • ͳͥΤίγεςϜ͕ඞཁͳͷ͔ʁ • ΞϓϦ΍APIɺύʔτφʔͷॏཁੑ • Shopify

    APIͱfreee APIΛ࢖ͬͨέʔεελσΟ • ·ͱΊʢٕज़ΤίγεςϜͷಈ޲ʣ ຊ೔͓࿩͍ͨ͜͠͠ͱ
  4. Make Commerce Better For Everyone

  5. Shopify͸Ϋϥ΢υϕʔεͷΦϜχνϟωϧΛ࣮ݱͨ͠ϓϥοτϑΥʔϜͰ͢ɻ ݸਓͷํ͔Βେاۀ·Ͱ҆৺ͯ͠͝ར༻͍͚ͨͩ·͢ɻ 2006 Shopifyϩʔϯν $1,073M ೥ؒརӹֹ (աڈ12ϱ݄) 2,900+ ΞϓϦετΞʹެ։͞Ε͍ͯΔΞϓϦͷ਺ $100B

    ࣄۀऀ༷ͷ૯ྲྀ௨ֹ (ྦྷܭ) 2.1 million ϢχʔΫͷετΞΞΧ΢ϯτ਺ 1,000,000+ ళฮ —— ~175ϱࠃ 4,000+ ࣾһ਺ 22,000 աڈ12Χ݄ͷؒͰ1ళฮҎ্ͷShopifyετΞΛ
 ϦϦʔεͨ͠ύʔτφʔͷ਺
  6. ؆୯ʹݴ͏ͱɾɾ ͓ᔬམͳετΞΛ؆୯ʹ࡞ΕΔϓϥοτϑΥʔϜʢʴ͍ΖΜͳͱ͜ΖͰൢചՄೳʣ

  7. ShopifyύʔτφʔΤίγεςϜ Ϛʔνϟϯτ͕ αʔυύʔςΟʔ ΞϓϦΛར༻ 80%+ ύʔτφʔ͔Βͷ঺հ Ϛʔνϟϯτ 200,000+ Shopifyύʔτφʔ͕ಘͨऩӹ͸ 1,320ԯԁ

    (2018೥౓) ΞϓϦ։ൃύʔτφʔ͕ ಘͨऩӹ͸ 200ԯԁ (2018೥౓)
  8. 2,900+ ެ։͞Ε͍ͯΔAPIͰࣗ༝ʹΧελϚΠζ΍ΞϓϦͷ࡞੒͕Մೳ ച্Ξοϓ ഑ૹ ࡏݿ؅ཧ ސ٬؅ཧ ࡒ຿ɾձܭ ଟݴޠɾଟ௨՟ Ϩϙʔτ ιʔγϟϧ

    ϚʔέςΟϯά Shopify ΞϓϦετΞ https://apps.shopify.com/?locale=ja
  9. Shopify ςʔϚετΞ 100छྨҎ্ͷσβΠϯςϯϓϨʔτ https://themes.shopify.com

  10. ͓΍ɾɾɾʁ

  11. Shopifyͷٕज़ج൫

  12. ΞϓϦͷߏ੒ Partner Server App Bridge (page) App Bridge (Action) Admin

    API Storefront API Polaris (UI) Webhook Webhook App Bridge (POS) API calls
  13. App Bridgeͱ͸ʁ ShopifyʹΞϓϦΛຒΊࠐΉͨΊͷJavascriptϥΠϒϥϦʢPOSΞϓϦʹ΋ରԠʣ

  14. Polarisͱ͸ʁ ShopifyϚʔνϟϯτʹ࠷దͳUXΛఏڙ͢ΔͨΊͷCSSʢReact ʣϥΠϒϥϦʢOSSʣ

  15. Webhookͱ͸ʁ Shopifyͷσʔλߋ৽ͷΠϕϯτΛ௨஌ͯ͘͠ΕΔػೳʢAPIΛݺͼग़͢͜ͱ΋Մೳʣ ※ʮઃఆʯ> ʮ௨஌ʯ > ʮWebhookʯ ͔ΒઃఆͰ͖·͢ Webhookͱ͸

  16. ଟ͘ͷπʔϧ΍ίϯϙʔωϯτ͸OSSͱͯ͠ఏڙ

  17. ͦͯ͠؊৺ͳAPI͸ɾɾɾ αʔόʔαΠυͷGraphQLͱRESTͷ΄͔ɺϑϩϯτ༻ͷAjax API΋༻ҙ GraphQL REST Ajax

  18. ؆୯ʹShopify APIΛࢼ͢ํ๏ GraphQL App (GraphQLͷίʔυαδΣετػೳͱ εΩʔϚࣙॻ͋Γʣ Private App ʢτʔΫϯͳ͠ͷBasicೝূͰAPI͕ݺ΂ΔͷͰ RESTΛςετ͠΍͍͢ʣ

  19. ͪͳΈʹ؆୯ʹfreee APIΛࢼ͢ํ๏͸ɾɾɾ Swagger UI (σϕϩούʔαΠτͰͦͷ··ݺͼग़ͤΔ)

  20. ͜ΕΒͷΦʔϓϯͳٕज़ج൫Ͱ΋ͨΒ͞ΕΔ΋ͷ • ωΠςΟϒʹ͍֦ۙுੑͷߴ͍ΞϓϦͷ։ൃ • ॊೈͳAPIʹΑΔ։ൃऀ΁ͷΠϯεϐϨʔγϣϯ • APIΛิڧ͢ΔػೳʹΑΔ෯޿͍ΧελϚΠζ

  21. ͦΜͳShopifyͷΞϓϦ։ൃʹڵຯΛ࣋ͨΕͨํ͸ɾɾɾ ೔ຊޠϒϩά಺ͷαϚϦʔϖʔδΛ͝ཡ͍ͩ͘͞ʂ ShopifyΞϓϦͷ։ൃํ๏ɹɹɹɹɹɹɹɹɹɹɹɹɹɹ

  22. ΤίγεςϜͷॏཁੑ

  23. ͳͥΤίγεςϜ͕ॏཁ͔ ίϚʔεͱ͍͏ෳࡶͳχʔζʹਖ਼͘͠ਝ଎ʹରԠ͠ɺΈΜͳΛϋοϐʔʹ͢ΔͨΊ

  24. ΤίγεςϜͱ͍͏ଆ໘ͰShopifyΛఆٛͯ͠ΈΔͱɾɾɾ • Shopify = Commerce OS (by App) • Shopify

    = Headless commerce (by API/SDK) • Shopify = Hybrid cloud in OSS approachʢby partners)
  25. ʢҰݴͰݴ͏ͱʣ͜͏ͳΒͳ͍ͨΊ

  26. ΞϓϦΛ࢖͏ϝϦοτͱ͸ͳʹ͔ʁ ʹػೳͷ௥Ճ͚ͩͰͳ͘ɺߋ৽ͱ࡟আ͕Ͱ͖ΔʢTry & Error͕Ͱ͖Δʣ ௥Ճɾߋ৽ ࡟আ ※ΞϓϦ͸ػೳͷ෇͚଍͚ͩ͠ͷಓ۩Ͱ͸ͳ͍

  27. API΍SDKΛ࢖͏ϝϦοτͱ͸ͳʹ͔ʁ ʹχʔζʹԠͨ͡ॊೈͳઃܭ͕Ͱ͖Δʢಉ͡ΧςΰϦʹόϦΤʔγϣϯ͕ੜ·ΕΔʣ ※API͸࡞͚ͬͨͩͰ͸ҙຯ͕ͳ͘ɺ࿈ܞ͚͕ͩ༻్Ͱ΋ͳ͍

  28. ύʔτφʔΛר͖ࠐΉϝϦοτͱ͸ͳʹ͔ʁ ʹϓϥοτϑΥʔϜΛར༻͢Δશͯͷਓͷ੒ޭʹͭͳ͕Δʢ࣋ଓՄೳͳΤίγεςϜʣ ※֎෦ύʔτφʔ͸ϦιʔεͰ͸ͳ͍

  29. ΤίγεςϜͱ͸ ຬͨ͢΂͖ٕज़ͱͦΕΛϏδωεʹੜ͔ͤΔ࢓૊Έ͕͋ͬͯॳΊͯ੒Γཱͭ΋ͷ

  30. ɹShopifyͱfreeeͰͷέʔεελσΟ

  31. ͓୊ᶃɿShopifyͱfreeeΛ࿈ܞ͢Δ৔߹ͷ࢓༷ ҎԼͷ࢓༷ͷͲͪΒ͕ద੾͔ʁ A. WebhookΛઃఆͯ͠஫จ͕ೖΔͨͼʹfreeeͷAPIΛݺΜͰऔҾొ࿥ ͢Δ B. औΓࠐΈϘλϯΛ࡞ͬͯShopifyͷAPIͰ஫จσʔλΛҾ͍ͯfreeeͷ APIͰऔҾొ࿥͢Δ

  32. ͓୊ᶄɿShopifyͱfreeeΛ࿈ܞ͢Δ৔߹ͷνΣοΫ ҎԼͷνΣοΫͲͪΒ͕ΑΓద੾͔ʁ A. ೋॏऔΓࠐΈ͠ͳ͍Α͏ʹऔΓࠐΈࡁΈσʔλΛfreee APIͰଘࡏ֬ ೝ͢ΔॲཧΛೖΕΔ B. ೋॏऔΓࠐΈ͠ͳ͍Α͏ʹShopify APIΛ࢖ͬͯऔΓࠐΈࡁΈ͔Ͳ͏ ͔ͷϑϥάΛσʔλʹೖΕΔ

  33. ͓୊ᶅɿShopifyͱfreeeΛ࿈ܞ͢Δ৔߹ͷঝೝϓϩηε ҎԼͷϓϩηεͲͪΒ͕ΑΓద੾͔ʁ A. ͸͡ΊʹShopifyΞϓϦͷΠϯετʔϧը໘ͰShopify OAuthͷঝೝ Λऔͬͯɺͦͷޙ freeeͷϦμΠϨΫτͰfreee OAuthͷঝೝΛऔΔ B. ͸͡ΊʹfreeeͷϦμΠϨΫτͰfreee

    OAuthͷঝೝΛऔͬͯɺͦͷ ޙShopifyΞϓϦͷΠϯετʔϧը໘ͰShopify OAuthͷঝೝΛऔΔ
  34. ౴͑ɿ ͲͪΒͰ΋ྑ͍ʢ͋ͳͨ࣍ୈʣ

  35. ɹ·ͱΊ

  36. ΤίγεςϜͱ͍͏Ξϓϩʔν͸ࠓޙͲ͏ͳΔ͔ʁ =ଟ༷Խ͢ΔੈքͰϓϥοτϗʔϜΛ࡞Δखஈͱͯ͠ओྲྀʹͳΔͱࢥΘΕΔ • ୠ͠ɺҎԼͷ఺Λߟྀ͢Δඞཁ͕͋Δ • =>ݸผχʔζ΍࿈ܞͷඞཁ͕ຊ౰ʹ͋Δ͔ • =>൚༻తͳΠϯλʔϑΣʔεʢAPI΍SDKʣΛఏڙͰ͖Δ͔ • =>ϝϦοτΛڗडͰ͖ΔίϛϡχςΟ͕ੜ੒͞ΕΔ͔

  37. ͦͯ͠ΤίγεςϜͷओ໾͸ɺ ٕज़Λѻ͑Δ͋ͳͨͰ͢ʂ

  38. ˏ freee Biz Tech Frontier 2020 Thank you!