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.7k
リーガルテックを支えるアーキテクチャ
tokichie
0
6.9k
Other Decks in Programming
See All in Programming
データの民主化を支える、透明性のあるデータ利活用への挑戦 2025-06-25 Database Engineering Meetup#7
y_ken
0
340
すべてのコンテキストを、 ユーザー価値に変える
applism118
2
1.1k
Blazing Fast UI Development with Compose Hot Reload (droidcon New York 2025)
zsmb
1
280
NPOでのDevinの活用
codeforeveryone
0
670
アンドパッドの Go 勉強会「 gopher 会」とその内容の紹介
andpad
0
290
初学者でも今すぐできる、Claude Codeの生産性を10倍上げるTips
s4yuba
3
3.1k
Team operations that are not burdened by SRE
kazatohiei
1
290
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
1
720
生成AIコーディングとの向き合い方、AIと共創するという考え方 / How to deal with generative AI coding and the concept of co-creating with AI
seike460
PRO
1
350
『自分のデータだけ見せたい!』を叶える──Laravel × Casbin で複雑権限をスッキリ解きほぐす 25 分
akitotsukahara
1
600
明示と暗黙 ー PHPとGoの インターフェイスの違いを知る
shimabox
2
390
ふつうの技術スタックでアート作品を作ってみる
akira888
0
300
Featured
See All Featured
The Invisible Side of Design
smashingmag
300
51k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
A better future with KSS
kneath
239
17k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.4k
Done Done
chrislema
184
16k
Adopting Sorbet at Scale
ufuk
77
9.4k
Git: the NoSQL Database
bkeepers
PRO
430
65k
GraphQLとの向き合い方2022年版
quramy
49
14k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Building Applications with DynamoDB
mza
95
6.5k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.7k
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