1章の全体像から API 集約とデータ変換の位置をハイライトした構成図
$ cd ch03-api-aggregation$ docker compose up -d
ch03-api-aggregationこの章のサンプルコードのディレクトリdocker compose up -d5 つのコンテナをバックグラウンドで起動docker compose up で起動する 5 つのコンテナ
BFF が 3 サービスを並列に呼び出して 1 レスポンスにまとめる流れ
const [profile, orders, notifications] = await Promise.all([...]);$ curl http://localhost:3000/api/dashboard逐次と並列を組み合わせた 2 ステップの呼び出しフロー
$ curl http://localhost:3000/api/order-details/ord-001ドメインモデルと View Model の対比、変換関数がつなぐ構成
$ curl http://localhost:3002/orders/ord-001$ curl http://localhost:3000/api/orders/ord-001