DDDGo

module
v0.0.0-...-eecab09 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2023 License: MIT

README ΒΆ


DDDGo

β—¦

β—¦ Developed with the software and tools listed below.

Docker Go Wire Markdown

GitHub top language GitHub code size in bytes GitHub commit activity GitHub license

πŸ“’ Table of Contents


πŸ“ Overview

This project is an API service designed and implemented using Domain-Driven Design (DDD) principles. DDD is an approach to software development that greatly emphasizes the importance of understanding and modeling the domain. It aims to ease the creation of complex applications by connecting the related pieces of the software into an evolving model.

The API service is structured around business domains, each represented by a bounded context. The bounded context isolates the domain's models, making them specific to the context and independent from others. This isolation allows the model to evolve independently, reducing the risk of changes in one context affecting others.

The service is built with a layered architecture, typical in DDD:

  • Domain Layer: This is the core of the software, containing business logic and types, which doesn't depend on other layers.
  • Application Layer: This layer drives the workflow of the application, directing the domain layer, and is kept thin with logic that does not belong in the domain.
  • Infrastructure Layer: This layer provides generic technical capabilities that support higher layers (message sending, persistence, drawing UI components, and so on).
  • Adapter Layer (or Presentation Layer): This layer is responsible for presenting information to the user and interpreting the user's commands.

This DDD approach ensures that the focus is on the core domain and domain logic, basing complex designs on a model, and initiating a creative collaboration between technical and domain experts to iteratively refine a conceptual model that addresses particular domain problems.

The API service is designed to be scalable, maintainable, and organized around the business domain, providing a strong foundation for further development and adjustments as the understanding of the domain evolves.


βš™οΈ Features

  • HTTP Support: The service can handle HTTP requests and responses.
  • Behavior-Driven Development (BDD): The service is developed with a focus on behavior, making it more aligned with business requirements and easier to understand.
  • Event Sourcing: The state of the business objects is determined by a sequence of events, providing a great audit trail and history that can enable various business insights.
  • SQL Transactions: The service supports SQL transactions to ensure data consistency and integrity.
  • Anti-Breakdown
  • Anti-Penetration
  • Anti-Avalanche

πŸš€ Getting Started

πŸ“¦ Installation

  1. Clone the DDDGo repository:
git clone https://github.com/program-world-labs/DDDGo
  1. Change to the project directory:
cd DDDGo
  1. Install the dependencies:
go mod tidy

πŸ§ͺ Running Tests

make test

πŸ—Ί Roadmap

  • ℹ️ Role Implementation
  • ℹ️ Event Sourcing Implementation
  • ℹ️ User Implementation
  • ℹ️ Group Implementation
  • ℹ️ Wallet Implementation

🀝 Contributing

Contributions are always welcome! Please follow these steps:

  1. Fork the project repository. This creates a copy of the project on your account that you can modify without affecting the original project.
  2. Clone the forked repository to your local machine using a Git client like Git or GitHub Desktop.
  3. Create a new branch with a descriptive name (e.g., new-feature-branch or bugfix-issue-123).
git checkout -b new-feature-branch
  1. Make changes to the project's codebase.
  2. Commit your changes to your local branch with a clear commit message that explains the changes you've made.
git commit -m 'Implemented new feature.'
  1. Push your changes to your forked repository on GitHub using the following command
git push origin new-feature-branch
  1. Create a new pull request to the original project repository. In the pull request, describe the changes you've made and why they're necessary. The project maintainers will review your changes and provide feedback or merge them into the main branch.

πŸ“„ License

This project is licensed under the ℹ️ INSERT-LICENSE-TYPE License. See the LICENSE file for additional info.


πŸ‘ Acknowledgments


Directories ΒΆ

Path Synopsis
cmd
app
Code generated by swaggo/swag.
Code generated by swaggo/swag.
internal
adapter/http/v1
Package v1 implements routing paths.
Package v1 implements routing paths.
app
pkg
httpserver
Package httpserver implements HTTP server.
Package httpserver implements HTTP server.
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
mocks/role
Package role is a generated GoMock package.
Package role is a generated GoMock package.
mocks/user
Package user is a generated GoMock package.
Package user is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL