Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Angular×Supabaseを 試してみた
Search
komura-c
PRO
August 27, 2021
7
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Angular×Supabaseを 試してみた
Startup Angular #1
https://voicy.connpass.com/event/220158/
komura-c
PRO
August 27, 2021
Transcript
11 slides
Angular×Supabaseを 試してみた 石井 悠貴 (@komura_c)
About me • 石井 悠貴 (@komura_c) • Webフロントエンドエンジニア 学生インターン at
Voicy • Angular歴1年半ほど • TypeScript好き
Supabaseとは • オープンソースのツールを使ってFirebaseのようなものを構築するOSS ◦ Database(Postgres) ◦ Auth ◦ Storage(AWS S3)
◦ Functions(開発中) • プラットフォームとして提供されている(Supabase管理のAWS上) が、独自の環境でセルフホスティングが可能 • ステータス:Public Beta(企業以外の利用であれば安定性が確保) • iOSとAndroid向けも開発中、Flutterのサンプルは存在 (https://github.com/supabase/supabase/blob/master/i18n/README.jp.md)
Supabaseのアーキテクチャ • Kong/kong Lua製APIGateway、 ロードバランサー • netlify/gotrue Golang製APIサーバー、 ユーザー管理 •
supabase/realtime Elixir製サーバー、 DB変更検知、 WebSocketで配信 (https://github.com/supabase/supabase/blob/master/i18n/README.jp.md)
DBのセキュリティ FirestoreRule→Postgres Row Level Security テーブルに行単位のセキュリティポリシーを定義 (https://www.postgresql.jp/document/9.6/html/sql-createpolicy.html)
Auth • マジックリンク • メール&パスワード • 電話番号 • OAuthProviders ◦
Google、GitHub、GitLab、Azure、Facebook、Bitbucket、 Twitter、Apple、Twitch、Discord、Twilio (SMS) • 匿名認証は現状なし
Supabaseを設定してみる • Angular用の簡単なチュートリアルが用意されている (https://supabase.io/docs/guides/with-angular#project-set-up) • プロジェクト作成後、データベーススキーマを設定 ダッシュボード上からSQLクエリを実行(テンプレートが用意されている)
Angularアプリに追加する 1. npm install @supabase/supabase-js 2. APIキーとURLをenvironmentsに追加 3. createClientでinit
サンプルを試す • SupabaseのリポジトリにVercelへのデプロイボタンが用意されていて、押し て設定するだけで自分の環境で試すことができる (https://github.com/supabase/supabase/tree/master/examples/angula r-todo-list) • Angular以外にもReact, Vue, Svelteなどのサンプルが用意されている
(https://supabase.io/docs/guides/examples) • 動くようにしたもの https://supabase-todo-list-komura-c.vercel.app/
料金設定 Free Pro 従量課金 価格 無料 25ドル/月 25ドル〜/月 データベース 最大500MB
自動バックアップ なし 最大8GB 自動バックアップ 7日間 0.125ドル/1GB 自動バックアップ 30日間のポイント インタイムバックアップ Auth 最大10,000ユーザー ログ1時間 最大100,000ユーザー ログ7日間 ユーザー無制限 ログ無制限 ストレージ 最大1GB DL制限(最大2GB) アップロード無制限 最大100GB DL制限(最大200GB) アップロード無制限 0.021ドル/1GB DL制限(0.07ドル/1GB) アップロード無制限 ログ保持(APIとDB) 1日間 7日間 3ヶ月 一週間不使用で一時停止 • BaaSを紹介する時は料金を表示しなきゃと思ったので
試してみた感想 • Angularにおいては、Firebaseと同じ使用感でコードが書きやすい • 今のところFirebaseの方が使いやすいですが、DB設計やSQLの知識があ れば、RDBで簡単にアプリを立ち上げられるのは良い • Angularに最適化されているわけではない(初期化処理、ガードなど) →AngularFireの公式ライブラリの安心感 •
去年12月にはMozillaなどから600万ドルの資金調達→今後に期待 (https://techcrunch.com/2020/12/15/supabase-raises-6m-for-its-open-sour ce-firebase-alternative/)
More Decks by komura-c
See All by komura-c
プロダクトエンジニアとしての 初めての開発を振り返る
komura_c
PRO
0
150
私の最近のAI活用
komura_c
PRO
0
6
興味駆動で挑戦していき、少しずつ成長する話
komura_c
PRO
0
6
WebフロントエンドでHLSを使って音声再生をする
komura_c
PRO
0
10
VoicyのAngularプロダクトでやってよかったこと3選
komura_c
PRO
0
8
#Angularで生放送再生機能を開発した新卒の話
komura_c
PRO
0
8
Featured
See All Featured
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
410
Prompt Engineering for Job Search
mfonobong
0
610
Claude Code のすすめ
schroneko
67
230k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Technical Leadership for Architectural Decision Making
baasie
4
660
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
650
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
4
1.3k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.8k
A designer walks into a library…
pauljervisheath
211
25k
Optimizing for Happiness
mojombo
378
72k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7.1k