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
PostgreSQL を使った快適な go test 環境を求めて
otakakot
0
550
受け入れテスト駆動開発(ATDD)×AI駆動開発 AI時代のATDDの取り組み方を考える
kztakasaki
2
590
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
250
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.3k
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
1.1k
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
180
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
550
Angular-Apps smarter machen mit Gen AI: Lokal und offlinefähig - Hands-on Workshop!
christianliebel
PRO
0
110
Claude Code の Skill で複雑な既存仕様をすっきり整理しよう
yuichirokato
1
380
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
200
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
290
AHC061解説
shun_pi
0
380
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
330
40k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
200
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
72
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.4k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.1k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
260
Navigating Weather and Climate Data
rabernat
0
140
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Designing for humans not robots
tammielis
254
26k
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