Giter VIP home page Giter VIP logo

ec-sites-backend's Introduction

EC Site Backend API (Clean Architecture Example)

概要

このリポジトリは、クリーンアーキテクチャを採用したECサイトのバックエンドAPIの開発を学ぶためのものです。本リポジトリは、『Go言語で構築するクリーンアーキテクチャ設計』を参考にしながら、オリジナルの改変を加えた教育目的のコードを含んでいます。

使用技術

  • Go1.21.0
  • MySQL 8.0
  • Redis 6.0

クリーンアーキテクチャについて

このプロジェクトでは、ロバート・C. マーチン(Uncle Bob)によって提唱されたクリーンアーキテクチャの原則を採用しています。クリーンアーキテクチャは、ソフトウェア設計において依存性ルールを守ることで、システムの柔軟性、拡張性、テスタビリティを向上させるアーキテクチャです。

特徴

  • 独立性: このAPIは、UI、フレームワーク、データベースから独立しています。
  • テスタビリティ: ビジネスルールをクリーンに分離しているため、外部要素に依存しないユニットテストが容易です。
  • 拡張性: 新しい機能や要求に対して、最小限の変更で対応可能です。

プロジェクトの構成

ドメイン層

ドメイン層には、ビジネスロジックが含まれています。これはアプリケーションの核となるルールや例外を扱います。

アプリケーション層

アプリケーション層は、ドメイン層を使って具体的なビジネスケースを実行します。データの流れを制御し、ドメイン層とプレゼンテーション層の橋渡しを行います。

インフラストラクチャ層

インフラストラクチャ層は、データベースや外部サービスとの通信を担います。この層はドメイン層やアプリケーション層から独立しています。

プレゼンテーション層

プレゼンテーション層は、APIエンドポイントを通じて外部からのリクエストを受け取ります。これには認証や入力データのバリデーションが含まれます。

学習目的

 このプロジェクトは学習用です。商用利用や実際のプロダクト開発には使用しておりません。

ec-sites-backend's People

Contributors

dot-p avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.