模块化单体应用的DDD实现示例
该开源项目展示了模块化单体应用的DDD实现方法。以.NET开发的会议组织系统为例,涵盖用户注册、群组管理、会议组织等核心功能。项目应用了面向对象编程原则和设计模式,并通过C4模型阐释了详细架构,为开发人员提供了实用的参考。
Full Modular Monolith .NET application with Domain-Driven Design approach.
Learn, use and benefit from this project only if:
Otherwise, leave this project immediately and educate yourself.
Putin, idi nachuj.
FrontEnd application : Modular Monolith With DDD: FrontEnd React application
1.1 Purpose of this Repository
3.3 API and Module Communication
3.4 Module Requests Processing via CQRS
3.5 Domain Model Principles and Attributes
3.11 Architecture Decision Log
3.14 System Integration Testing
3.16 Database change management
10. Inspirations and Recommendations
This is a list of the main goals of this repository:
This is a list of subjects which are out of scope for this repository:
The reason for creating this repository is the lack of something similar. Most sample applications on GitHub have at least one of the following issues:
To sum up, there are some very good examples, but there are far too few of them. This repository has the task of filling this gap at some level.
Software architecture should always be created to resolve specific business problems. Software architecture always supports some quality attributes and at the same time does not support others. A lot of other factors influence your software architecture - your team, opinions, preferences, experiences, technical constraints, time, budget, etc.
Always functional requirements, quality attributes, technical constraints and other factors should be considered before an architectural decision is made.
Because of the above, the architecture and implementation presented in this repository is one of the many ways to solve some problems. Take from this repository as much as you want, use it as you like but remember to always pick the best solution which is appropriate to the problem class you have.
My primary focus in this project is on quality. Creating a good quality product involves a lot of analysis, research and work. It takes a lot of time. If you like this project, learned something or you are using it in your applications, please give it a star :star:. This is the best motivation for me to continue this work. Thanks!
There are very few really good examples of this type of application. If you think this repository makes a difference and is worth it, please share it with your friends and on social networks. I will be extremely grateful.
Definition:
Domain - A sphere of knowledge, influence, or activity. The subject area to which the user applies a program is the domain of the software. Domain-Driven Design Reference, Eric Evans
The Meeting Groups domain was selected for the purposes of this project based on the Meetup.com system.
Main reasons for selecting this domain:
Meetings
The main business entities are Member
, Meeting Group
and Meeting
. A Member
can create a Meeting Group
, be part of a Meeting Group
or can attend a Meeting
.
A Meeting Group Member
can be an Organizer
of this group or a normal Member
.
Only an Organizer
of a Meeting Group
can create a new Meeting
.
A Meeting
has attendees, not attendees (Members
which declare they will not attend the Meeting
) and Members
on the Waitlist
.
A Meeting
can have an attendee limit. If the limit is reached, Members
can only sign up to the Waitlist
.
A Meeting Attendee
can bring guests to the Meeting
. The number of guests allowed is an attribute of the Meeting
. Bringing guests can be unallowed.
A Meeting Attendee
can have one of two roles: Attendee
or Host
. A Meeting
must have at least one Host
. The Host
is a special role which grants permission to edit Meeting
information or change the attendees list.
A Member
can comment Meetings
. A Member
can reply to, like other Comments
. Organizer
manages commenting of Meeting
by Meeting Commenting Configuration
. Organizer
can delete any Comment
.
Each Meeting Group
must have an organizer with active Subscription
. One organizer can cover 3 Meeting Groups
by his Subscription
.
Additionally, Meeting organizer can set an Event Fee
. Each Meeting Attendee
is obliged to pay the fee. All guests should be paid by Meeting Attendee
too.
Administration
To create a new Meeting Group
, a Member
needs to propose the group. A Meeting Group Proposal
is sent to Administrators
. An Administrator
can accept or reject a Meeting Group Proposal
. If a Meeting Group Proposal
is accepted, a Meeting Group
is created.
Payments
Each Member
who is the Payer
can buy the Subscription
. He needs to pay the Subscription Payment
. Subscription
can expire so Subscription Renewal
is required (by Subscription Renewal Payment
payment to keep Subscription
active).
When the Meeting
fee is required, the Payer
needs to pay Meeting Fee
(through Meeting Fee Payment
).
Users
Each Administrator
, Member
and Payer
is a User
. To be a User
, User Registration
is required and confirmed.
Each User
is assigned one or more User Role
.
Each User Role
has set of Permissions
. A Permission
defines whether User
can invoke a particular action.
Definition:
Conceptual Model - A conceptual model is a representation of a system, made of the composition of concepts that are used to help people know, understand, or simulate a subject the model represents. Wikipedia - Conceptual model
Conceptual Model
PlantUML version:
VisualParadigm version (not maintained, only for demonstration):
Conceptual Model of commenting feature
While a Conceptual Model focuses on structures and relationships between them, behavior and events that occur in our domain are more important.
There are many ways to show behavior and events. One of them is a light technique called Event Storming which is becoming more popular. Below are presented 3 main business processes using this technique: user registration, meeting group creation and meeting organization.
Note: Event Storming is a light, live workshop. One of the possible outputs of this workshop is presented here. Even if you are not doing Event Storming workshops, this type of process presentation can be very valuable to you and your stakeholders.
User Registration process
Meeting Group creation
Meeting organization
Payments
Download high resolution file
C4 model is a lean graphical notation technique for modelling the architecture of software systems. <br>
As can be found on the website of the author of this model (Simon Brown): The C4 model was created as a way to help software development teams describe and communicate software architecture, both during up-front design sessions and when retrospectively documenting an existing codebase <br>
Model C4 defines 4 levels (views) of the system architecture: System Context, Container, Component and Code. Below are examples of each of these levels that describe the architecture of this system. <br>
Note: The PlantUML (diagram as text) component was used to describe all C4 model levels. Additionally, for levels C1-C3, a C4-PlantUML plug-in connecting PlantUML with the C4 model was used.
AI小说写作助手,一站式润色、改写、扩写
蛙蛙写作—国内先进的AI写作平台,涵盖小说、学术、社交媒体等多场景。提供续写、改写、润色等功能,助力创作者高效优化写作流程。界面简洁,功能全面,适合各类写作者提升内容品质和工作效率。
字节跳动发布的AI编程神器IDE
Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。
全能AI智能助手,随时解答生活与工作的多样问题
问小白,由元石 科技研发的AI智能助手,快速准确地解答各种生活和工作问题,包括但不限于搜索、规划和社交互动,帮助用户在日常生活中提高效率,轻松管理个人事务。
实时语音翻译/同声传译工具
Transly是一个多场景的AI大语言模型驱动的同声传译、专业翻译助手,它拥有超精准的音频识别翻译能力,几乎零延迟的使用体验和支持多国语言可以让你带 它走遍全球,无论你是留学生、商务人士、韩剧美剧爱好者,还是出国游玩、多国会议、跨国追星等等,都可以满足你所有需要同传的场景需求,线上线下通用,扫除语言障碍,让全世界的语言交流不再有国界。
一键生成PPT和Word,让学习生活更轻松
讯飞智文是一个利用 AI 技术的项目,能够帮助用户生成 PPT 以及各类文档。无论是商业领域的市场分析报告、年度目标制定,还是学生群体的职业生涯规划、实习避坑指南,亦或是活动策划、旅游攻略等内容,它都能提供支持,帮助用户精准表达,轻松呈现各种信息。
深度推理能力全新升级,全面对标OpenAI o1
科大讯飞的星火大模型,支持语言理解、知识问答和文本创作等多功能,适用于多种文件和业务场景,提 升办公和日常生活的效率。讯飞星火是一个提供丰富智能服务的平台,涵盖科技资讯、图像创作、写作辅助、编程解答、科研文献解读等功能,能为不同需求的用户提供便捷高效的帮助,助力用户轻松获取信息、解决问题,满足多样化使用场景。
一种基于大语言模型的高效单流解耦语音令牌文本到语音合成模型
Spark-TTS 是一个基于 PyTorch 的开源文本到语音合成项目,由多个知名机构联合参与。该项目提供了高效的 LLM(大语言模型)驱动的语音合成方案,支持语音克隆和语音创建功能,可通过命令行界面(CLI)和 Web UI 两种方式使用。用户可以根据需求调整语音的性别、音高、速度等参数,生成高质量的语音。该项目适用于多种场景,如有声读物制作、智能语音助手开发等。
AI助力,做PPT更简单!
咔 片是一款轻量化在线演示设计工具,借助 AI 技术,实现从内容生成到智能设计的一站式 PPT 制作服务。支持多种文档格式导入生成 PPT,提供海量模板、智能美化、素材替换等功能,适用于销售、教师、学生等各类人群,能高效制作出高品质 PPT,满足不同场景演示需求。
选题、配图、成文,一站式创作,让内容运营更高效
讯飞绘文,一个AI集成平台,支持写作、选题、配图、排版和发布。高效生成适用于各类媒体的定制内容,加速品牌传播,提升内容营销效果。
专业的AI公文写作平台,公文写作神器
AI 材料星,专业的 AI 公文写作辅助平台,为体制内工作人员提供高效的公文写作解决方案。拥有海量公文文库、9 大核心 AI 功能,支持 30 + 文稿类型生成,助力快速完成领导讲话、 工作总结、述职报告等材料,提升办公效率,是体制打工人的得力写作神器。
最新AI工具、AI资讯
独家AI资源、AI项目落地
微信扫一扫关注公众号