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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
TROCCOで実現するkintone+BigQueryによるオペレーション改善
ssxota
0
150
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
210
Go Conference mini in Sendai 2026 : Goに新機能を提案し実装されるまでのフロー徹底解説
yamatoya
0
540
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
1.9k
CDIの誤解しがちな仕様とその対処TIPS
futokiyo
0
190
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
330
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
110
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
170
CSC307 Lecture 14
javiergs
PRO
0
460
技術検証結果の整理と解析をAIに任せよう!
keisukeikeda
0
100
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
0
380
AI活用のコスパを最大化する方法
ochtum
0
130
Featured
See All Featured
Claude Code のすすめ
schroneko
67
220k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
200
Testing 201, or: Great Expectations
jmmastey
46
8.1k
For a Future-Friendly Web
brad_frost
183
10k
The browser strikes back
jonoalderson
0
770
4 Signs Your Business is Dying
shpigford
187
22k
Odyssey Design
rkendrick25
PRO
2
540
How GitHub (no longer) Works
holman
316
140k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Designing for Timeless Needs
cassininazir
0
150
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