All Projects → stemmlerjs → Ddd Forum

stemmlerjs / Ddd Forum

Licence: isc
Hacker news-inspired forum app built with TypeScript & DDD from solidbook.io.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Ddd Forum

Ddd Guestbook
A DDD guestbook example written for ASP.NET Core
Stars: ✭ 447 (-33.68%)
Mutual labels:  ddd
Hackers
Hackers is an elegant iOS app for reading Hacker News written in Swift.
Stars: ✭ 513 (-23.89%)
Mutual labels:  hackernews
Cp Ddd Framework
A lightweight flexible development framework for complex business architecture with full ecosystem!轻量级业务中台开发框架,中台架构的顶层设计和完整解决方案!
Stars: ✭ 566 (-16.02%)
Mutual labels:  ddd
All Things Cqrs
Comprehensive guide to a couple of possible ways of synchronizing two states with Spring tools. Synchronization is shown by separating command and queries in a simple CQRS application.
Stars: ✭ 474 (-29.67%)
Mutual labels:  ddd
Event Store
PHP 7.4 EventStore Implementation
Stars: ✭ 505 (-25.07%)
Mutual labels:  ddd
Modular Monolith With Ddd
Full Modular Monolith application with Domain-Driven Design approach.
Stars: ✭ 6,210 (+821.36%)
Mutual labels:  ddd
Akkatecture
a cqrs and event sourcing framework for dotnet core using akka.net
Stars: ✭ 414 (-38.58%)
Mutual labels:  ddd
Komga
Media server for comics/mangas/BDs with API and OPDS support
Stars: ✭ 647 (-4.01%)
Mutual labels:  ddd
Christddd
🙌 ASP.NET Core 3.1 应用, 包含 DDD、CQRS、EDA 和ES事件回溯
Stars: ✭ 510 (-24.33%)
Mutual labels:  ddd
Spring Data Commons
Spring Data Commons. Interfaces and code shared between the various datastore specific implementations.
Stars: ✭ 542 (-19.58%)
Mutual labels:  ddd
Almin
Client-side DDD/CQRS for JavaScript.
Stars: ✭ 477 (-29.23%)
Mutual labels:  ddd
Kledex
.NET Standard framework to create simple and clean design. Advanced features for DDD, CQRS and Event Sourcing.
Stars: ✭ 502 (-25.52%)
Mutual labels:  ddd
Ddd Playground
Domain-Driven Design in a PHP project using Symfony
Stars: ✭ 517 (-23.29%)
Mutual labels:  ddd
Resolve
Full stack CQRS, DDD, Event Sourcing framework for Node.js
Stars: ✭ 460 (-31.75%)
Mutual labels:  ddd
Isis
Apache Isis™ software is a framework for rapidly developing domain-driven apps in Java. Write your business logic in entities, domain services or view models, and the framework dynamically generates a representation of that domain model as a webapp or as a RESTful API. For prototyping or production.
Stars: ✭ 605 (-10.24%)
Mutual labels:  ddd
Codeguide
📚 本代码库是作者小傅哥多年从事一线互联网 Java 开发的学习历程技术汇总,旨在为大家提供一个清晰详细的学习教程,侧重点更倾向编写Java核心内容。如果本仓库能为您提供帮助,请给予支持(关注、点赞、分享)!
Stars: ✭ 6,750 (+901.48%)
Mutual labels:  ddd
Equinoxproject
Full ASP.NET Core 5 application with DDD, CQRS and Event Sourcing concepts
Stars: ✭ 5,120 (+659.64%)
Mutual labels:  ddd
Spring Data Neo4j
Provide support to increase developer productivity in Java when using Neo4j. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
Stars: ✭ 662 (-1.78%)
Mutual labels:  ddd
Shriek Fx
An easy-to-use rapid development framework developed on the basis of.NET Core 2.0, following the constraints of domain Driven Design (DDD) specifications, combined with the CQRS architecture to provide the infrastructure for event-driven, event backtracking, responsiveness, and more. Let developers enjoy the true meaning of object-oriented design patterns brought by the aesthetic.
Stars: ✭ 644 (-4.45%)
Mutual labels:  ddd
Spring Data R2dbc
Provide support to increase developer productivity in Java when using Reactive Relational Database Connectivity. Uses familiar Spring concepts such as a DatabaseClient for core API usage and lightweight repository style data access.
Stars: ✭ 534 (-20.77%)
Mutual labels:  ddd

DDDForum.com

A SOLID hackernews-inspired forum site built with TypeScript using the clean architecture and DDD best practices.

DDDForum

About

DDDForum.com is the application that we build in solidbook.io - The Software Design and Architecture Handbook.

Running the project

You can run the project using Docker. First, copy .env template file. Feel free to change passwords and app secrets.

cp .env.template .env

Then build and run the image.

docker-compose up

You can visit the app by going to http://localhost:3000.

Demo

You can visit the site here.

Note: It's currently deployed on free tier Heroku, which has some undesirable side-effects like shutting off the server during periods of inactivity. So if it's down for you, refresh a couple of times. Thinking about migrating this to a serverless architecture later on.

Built with

Backend

  • Sequelize - The ORM for Node.js
  • Express.js - Lightweight webserver
  • Redis - For holding onto JWT tokens and refresh tokens

Frontend

Architecture

We built this based on the Clean Architecture, SOLID principles, and Domain-Driven Design best practices using TypeScript.

Clean architecture

There's obviously a lot that went into building this from front to back.

The Clean Architecture is a way to reason about where different types of application logic belongs.

Frame 8 (1)

There's a lot more to learn about the clean architecture, but for now- just know that it's a way to really separate the concerns of everything that goes into building complex enterprise applications. You'll never see any infrastructure-related code alongside domain layer code.

The clean architecture, when combined with Domain-Driven Design, is very powerful :)

In DDD, we build applications on top of a number of subdomains.

Subdomains

A subdomain is a cohesive unit of code that represents exactly one core concept and is responsible for a specific set of concerns in an application architecture. For example, every appliciation has a users subdomain. That's responsible for users, identity & access management, authentication, authorization, etc. Sometimes you don't want to build that yourself. Sometimes you can go with an off-the-shelf solution like Auth0. But there are subdomains in your application that you cannot simply outsource. These are the family jewels; the thing that's actually novel about your app. This is the subdomain that no one (except you) can code. Know why? Because only you have the domain knowledge to build it exactly the way that it should be built. You understand the domain.

In DDDForum, we have 2 subdomains: The users subdomain and the forum subdomain.

Frame 3 (1)

Each subdomain has a:

  • domain layer: where the highest-level policy, domain objects, and domain rules belong (user, email, etc)
  • application layer: where the use cases / features that utilize domain objects belong (createUser, login, etc)
  • adapter layer: where we define abstractions so that application layer code can interact with infrastructure layer concepts, without actually requiring on infrastructure (because that would break the dependency rule). Here we write things like IUserRepo - repository adapter, IJWTTokenService - an abstraction of a cache (redis) that manages tokens, etc.
  • infrastructure layer: where we create concrete implementations of the abstractions from the adapter layer so that they can be spun up at runtime thanks to the power of polymorhpism :) (more on this later).

If you haven't already, I recommend you read this article on use cases and subdomains.

Let's identify some of the actual concepts that exist in each subdomain.

users subdomain

In theusers subdomain, we're only concerned with concepts that are related to authentication, roles, etc. Here are a few examples of classes and concepts that exist at each layer.

forum subdomain

In the forum subdomain, we're only concerned with concepts that have to do with building a forum. You won't see any domain concepts from the user in forum. In the forum subdomain, the concept most equivalent to a user, is a member.

Here are a few examples of concepts from the forum subdomain.

  • domain layer: member, comment, post, postVote, commentVote, commentVotesChanged
  • application layer: replyToComment, getMemberByUserName, upvotePost, downvotePost
  • adapter layer: ICommentRepo, IPostRepo, IMemberRepo
  • infrastructure layer: SequelizeCommentRepo, SequelizePostRepo, SequelizeMemberRepo

Contributing

DDDForum is an open source project, and contributions of any kind are welcome! Open issues, bugs, and enhancements are all listed on the issues tab and labeled accordingly. Feel free to open bug tickets and make feature requests. Easy bugs and features will be tagged with the good first issue label.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Anthony Denneulin

💻

Khalil Stemmler

💻 🐛 📖 🚇 🤔

Faisol Chehumar

💻

Trung Tran

🚇

This project follows the all-contributors specification. Contributions of any kind welcome!

License

This project is licensed under the ISC License - see the LICENSE.md file for details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].