Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
HanamiでB2B SaaSを開発・運用している話
Search
Yuta Tokitake
November 29, 2018
Programming
1
180
HanamiでB2B SaaSを開発・運用している話
- HanamiでB2B SaaSのJSON APIを開発してます
- クラスごとに責務を明確化した書き方ができて保守性に優れます
- マルチデータベースで利用しようと思うとちょっとつらいです
Yuta Tokitake
November 29, 2018
Tweet
Share
More Decks by Yuta Tokitake
See All by Yuta Tokitake
実際のところHanamiってどうなんですか?という話
tokichie
2
1.8k
リーガルテックを支えるアーキテクチャ
tokichie
0
6.9k
Other Decks in Programming
See All in Programming
AI時代のソフトウェア開発でも「人が仕様を書く」から始めよう-医療IT現場での実践とこれから
koukimiura
0
140
Geminiの機能を調べ尽くしてみた
naruyoshimi
0
200
米国のサイバーセキュリティタイムラインと見る Goの暗号パッケージの進化
tomtwinkle
2
510
Rails Girls Tokyo 18th GMO Pepabo Sponsor Talk
yutokyokutyo
0
210
NOT A HOTEL - 建築や人と融合し、自由を創り出すソフトウェア
not_a_hokuts
2
890
朝日新聞のデジタル版を支えるGoバックエンド ー価値ある情報をいち早く確実にお届けするために
junkiishida
1
700
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
290
AIコーディングの理想と現実 2026 | AI Coding: Expectations vs. Reality 2026
tomohisa
0
1.2k
Go1.26 go fixをプロダクトに適用して困ったこと
kurakura0916
0
330
受け入れテスト駆動開発(ATDD)×AI駆動開発 AI時代のATDDの取り組み方を考える
kztakasaki
2
550
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
750
Claude Code の Skill で複雑な既存仕様をすっきり整理しよう
yuichirokato
1
330
Featured
See All Featured
Designing Experiences People Love
moore
143
24k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
67
37k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
220
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
68
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
290
30 Presentation Tips
portentint
PRO
1
250
RailsConf 2023
tenderlove
30
1.4k
Abbi's Birthday
coloredviolet
2
5.2k
Transcript
HanamiB2B SaaS 2018/11/29 #startuptech vol.1
• Hanami " • rack, Rails
• Hanami ! # • Hanami view
@tokichie_riyu LegalForce CTO ex-DeNA RubyTypeScript
Chief Tsuri Officer
LegalForce 2017 4 LegalTech B2B SaaS 8 4
LegalForce https://www.legalforce.co.jp
Powered by Hanami
Hanami • RubyWeb • • Rails
Hanami Clean Architecture • #% "$ Monolith First
• Monolith !"
Hanami • !#"
• Rails Sinatra • Rails
Hanami Production Ready • Rails
rack Action Interactor Repository MySQL InteractorResult Entity response params
validated params API call
Action • Rails Controller • class • Request
Interactor !
Action • rack app class Foo include Web::Action def call(params)
self.status = 201 self.body = ‘Hello’ self.headers.merge!({ 'X-Custom' => 'OK' }) end end
Interactor • $ • ! # • def call(*)"%
Interactor class AddBook include Hanami::Interactor expose :book def call(params) @book
= execute_something(params) end end • callInteractorResult
Repository • • API •
Repository ActiveRecord books = Book.where(author: ‘JK Rowling’) .order(created_at: :desc) !
# " " • view! ↑ …
Repository Hanami class BookRepository def where_by(author:) books.where(author: author).order { created_at.desc
} end end ! " " !
DB • LegalForce • 11
DB • Hanami::Repository DB ↓ ORMROM
Ruby Object Mapper • Hanami::Repository • HanamiORM
DB • ORM Hanami
↓ rake Sequel::Migration
Amazon ECR
Hanami • #
• app !' Vanilla Ruby • Rails core_ext% • &(Hanami::Utils "$
• Hanami • DB ⚡
Hanami