Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
1.7k
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
160
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
3
1.1k
LLMで複雑な検索条件アセットから脱却する!! 生成的検索インタフェースの設計論
po3rin
4
960
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
370
認証・認可の基本を学ぼう前編
kouyuume
0
270
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
120
Graviton と Nitro と私
maroon1st
0
130
AIコーディングエージェント(skywork)
kondai24
0
200
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
140
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
260
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
0
270
Featured
See All Featured
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
400
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
120
So, you think you're a good person
axbom
PRO
0
1.8k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.2k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.3k
Getting science done with accelerated Python computing platforms
jacobtomlinson
0
76
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Designing Experiences People Love
moore
143
24k
We Have a Design System, Now What?
morganepeng
54
7.9k
How to make the Groovebox
asonas
2
1.8k
Accessibility Awareness
sabderemane
0
24
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