{"canonical_url":"https://engineer.company/ja/portfolio/a-maritime-platform-built-in-clean-layers/","content_markdown":"# システムの境界を明確にした海事プラットフォーム\n\nNext.jsのPWAフロントエンド、Go（Huma/Fiber）API、PostgreSQL関数層を分離し、業務ロジックをすべてデータベースに置く、多層の海事プラットフォームを設計した。\n\n2025\n\n**状況.** NextMarinerは、専門家の交流、企業レビュー、教育支援を扱う海事プラットフォームである。創業者の設計面の貢献は、2025年11月に始まるNextMarinerでの業務に記録されている。記録は後の雇用期間を区別しておらず、製品全体をEngineer ApSが提供したと実証するものでもない。\n\n**課題.** 設計者として、各種ロジックをどこに置くかを初めに決め、急いだときに曖昧になるのではなく、圧力のもとでも保てる明白な境界を設ける必要があった。\n\n**行動.** それぞれ1つの仕事を持つ3層へ整理した。Next.jsは表示と操作だけを担当する。Fiber上のHumaによるGo APIは意図的に薄くし、経路制御、リクエスト検証、セキュリティフィルター、処理調整だけを行い、業務ロジックを持たせない。業務ロジックはすべてPostgreSQL関数に置き、完成した結果を組み立ててAPIへ返し、そのまま転送する。ルール変更はSQLの1層だけで済み、他の2層は意識しなくてよい。境界を文書化し、守られない規約にならないようレビューで適用した。\n\n**結果.** 実装した構成は、表示、リクエスト処理、業務ルールに別々の責任を与えている。情報源はその分離と理由を記録しており、提供速度、信頼性、事業成果の測定済みの改善を実証するものではない。\n\n---\n\n- 役割: プラットフォームアーキテクト\n- カテゴリー: [プラットフォーム設計](https://data.engineer.company/ja/categories/platform-architecture/), [ソリューション設計](https://data.engineer.company/ja/categories/solution-architecture/), [バックエンド開発](https://data.engineer.company/ja/categories/backend/), [フロントエンド開発](https://data.engineer.company/ja/categories/frontend/), [フルスタック開発](https://data.engineer.company/ja/categories/full-stack/), [API・システム連携](https://data.engineer.company/ja/categories/api/), [データベース](https://data.engineer.company/ja/categories/databases/), [PostgreSQL](https://data.engineer.company/ja/categories/postgresql/), [技術面の統率](https://data.engineer.company/ja/categories/technical-leadership/)\n- サービス: [プラットフォーム・ソリューション設計](https://data.engineer.company/ja/services/platform-architecture/), [バックエンド・API開発](https://data.engineer.company/ja/services/backend-development/), [フロントエンド開発](https://data.engineer.company/ja/services/frontend-development/), [フルスタックのプロダクト開発](https://data.engineer.company/ja/services/full-stack-development/), [データベース設計・モデリング](https://data.engineer.company/ja/services/database-design/)\n\n\u003chttps://engineer.company/ja/portfolio/a-maritime-platform-built-in-clean-layers/\u003e\n","date_modified":"2026-11-09T21:50:25Z","description":"Next.js PWA、Go（Huma/Fiber）API、業務ロジックをすべて収めるPostgreSQL関数層からなる多層の海事プラットフォームを設計した。","formats":{"gemtext":"https://data.engineer.company/ja/portfolio/a-maritime-platform-built-in-clean-layers/index.gmi","gopher":"https://data.engineer.company/ja/portfolio/a-maritime-platform-built-in-clean-layers/gophermap","html":"https://data.engineer.company/ja/portfolio/a-maritime-platform-built-in-clean-layers/","json":"https://data.engineer.company/ja/portfolio/a-maritime-platform-built-in-clean-layers/index.json","markdown":"https://data.engineer.company/ja/portfolio/a-maritime-platform-built-in-clean-layers/index.md","pdf":"https://data.engineer.company/ja/portfolio/a-maritime-platform-built-in-clean-layers/index.pdf"},"kind":"page","language":"ja","title":"Next.js・Go・Postgresの多層構成を設計","url":"https://data.engineer.company/ja/portfolio/a-maritime-platform-built-in-clean-layers/","version":1}