All Projects → twzhangyang → Restairline

twzhangyang / Restairline

DDD+CQRS+EventSourcing+Hypermedia API+ASP.NET Core 3.1+Masstransit+terraform+docker+k8s

Projects that are alternatives of or similar to Restairline

Revo
Event Sourcing, CQRS and DDD framework for C#/.NET Core.
Stars: ✭ 162 (-33.33%)
Mutual labels:  eventsourcing, aspnetcore, aspnet-core, ddd, cqrs
Quiz
Example real time quiz application with .NET Core, React, DDD, Event Sourcing, Docker and built-in infrastructure for CI/CD with k8s, jenkins and helm
Stars: ✭ 100 (-58.85%)
Mutual labels:  eventsourcing, aspnetcore, ddd, cqrs
Equinoxproject
Full ASP.NET Core 5 application with DDD, CQRS and Event Sourcing concepts
Stars: ✭ 5,120 (+2007%)
Mutual labels:  aspnetcore, aspnet-core, ddd, cqrs
Bifrost
This is the stable release of Dolittle till its out of alpha->beta stages
Stars: ✭ 111 (-54.32%)
Mutual labels:  eventsourcing, ddd, cqrs
Aspnetcore Ddd
Full ASP.NET Core 3.1 LTS application with DDD, CQRS and Event Sourcing
Stars: ✭ 88 (-63.79%)
Mutual labels:  aspnetcore, ddd, cqrs
Dotnetcore Microservices Poc
Very simplified insurance sales system made in a microservices architecture using .NET Core
Stars: ✭ 1,304 (+436.63%)
Mutual labels:  ddd, cqrs, docker-compose
Weapsy
ASP.NET Core CMS
Stars: ✭ 748 (+207.82%)
Mutual labels:  aspnetcore, ddd, cqrs
Architecture
.NET 6, ASP.NET Core 6, Entity Framework Core 6, C# 10, Angular 13, Clean Code, SOLID, DDD.
Stars: ✭ 2,285 (+840.33%)
Mutual labels:  aspnetcore, aspnet-core, ddd
Eshoponcontainersddd
Fork of dotnet-architecture/eShopOnContainers in full DDD/CQRS design using my own patterns
Stars: ✭ 126 (-48.15%)
Mutual labels:  eventsourcing, ddd, cqrs
Netdevpack
A smart set of common classes and implementations to improve your development productivity.
Stars: ✭ 220 (-9.47%)
Mutual labels:  aspnetcore, ddd, cqrs
Eventflow
Async/await first CQRS+ES and DDD framework for .NET
Stars: ✭ 1,932 (+695.06%)
Mutual labels:  eventsourcing, ddd, cqrs
Eventhorizon
CQRS/ES toolkit for Go
Stars: ✭ 961 (+295.47%)
Mutual labels:  eventsourcing, ddd, cqrs
Practical Clean Ddd
A simplified and effortless approach to get started with Domain-driven Design, Clean Architecture, CQRS, and Microservices patterns
Stars: ✭ 28 (-88.48%)
Mutual labels:  aspnetcore, ddd, cqrs
Goes
Go Event Sourcing made easy
Stars: ✭ 144 (-40.74%)
Mutual labels:  eventsourcing, ddd, cqrs
Run Aspnetcore
A starter kit for your next ASP.NET Core web application. Boilerplate for ASP.NET Core reference application, demonstrating a layered application architecture with applying Clean Architecture and DDD best practices. Download 100+ page eBook PDF from here ->
Stars: ✭ 227 (-6.58%)
Mutual labels:  aspnetcore, aspnet-core, ddd
Eventsourcing
A library for event sourcing in Python.
Stars: ✭ 760 (+212.76%)
Mutual labels:  eventsourcing, ddd, cqrs
Eventflow.example
DDD+CQRS+Event-sourcing examples using EventFlow following CQRS-ES architecture. It is configured with RabbitMQ, MongoDB(Snapshot store), PostgreSQL(Read store), EventStore(GES). It's targeted to .Net Core 2.2 and include docker compose file.
Stars: ✭ 131 (-46.09%)
Mutual labels:  eventsourcing, ddd, cqrs
Pitstop
This repo contains a sample application based on a Garage Management System for Pitstop - a fictitious garage. The primary goal of this sample is to demonstrate several software-architecture concepts like: Microservices, CQRS, Event Sourcing, Domain Driven Design (DDD), Eventual Consistency.
Stars: ✭ 708 (+191.36%)
Mutual labels:  ddd, cqrs, docker-compose
Todomvc Ddd Cqrs Eventsourcing
Implementation of basic Todo app via tastejs/todomvc in C#/Typescript with eventsourcing, cqrs, and domain driven design
Stars: ✭ 134 (-44.86%)
Mutual labels:  eventsourcing, ddd, cqrs
Run Aspnetcore Cqrs
Real world Enterprise CRM application example of ASP.NET Core + Angular web application. Implemented CQRS Design Pattern for ASP.NET Core + Angular reference application, demonstrating a layered application architecture with DDD best practices. Download 100+ page eBook PDF from here ->
Stars: ✭ 152 (-37.45%)
Mutual labels:  aspnetcore, aspnet-core, cqrs

Build Status

Overview

  • A classic DDD with CQRS-ES, Hypermedia API and Ubiquitous unit test project based on EventFlow. It's targeted to ASP.NET Core 3.1 and can be deployed to docker and k8s
  • Based on EventFlow
  • Based on ASP.NET Core3.1
  • Implement read model by EntityFramework, MongoDB, Elasticsearch
  • Integrate RabbitMQ and used MassTransit as Message bus (in progress)
  • Event driven Microservices integration (in progress)
  • Infrastructure as code by Terraform, AWS eks was created for shipping this application
  • Wiki is in progress

The idea of this project

  • CQRS helps modelling pure domain by separating command and query logic
  • Event Sourcing helps decoupling domain models and persistence
  • Combining CQRS and Event Sourcing make the domain model more reasonable and pure
  • At the same time, different Bounded contexts can evolve into different Microservices and different Microservices can interact through asynchronous Message Bus and events
  • In the end, we got a Microservices architecture based on DDD. A single Microservices ensures the purity of the domain model through CQRS and Event Sourcing. Different Microservices can interact through the message bus. Finally, all services can be deployed to cloud and k8s

The Domain and Bounded context

The example is regarding online booking/checkin for an airline company. An airline company named 'RestAirline' is offering online booking/checkin. There are four possible Bounded context for above business:

  • Booking is a bounded context that focusing on online booking;
  • Flight Availability is a bounded context that focusing searching available flights and flight schedule;
  • Checkin is a bounded context that focusing on online checkin;
  • Seat Availability is a bounded context that maintaining seat for each flight; domain

The Microservices and communication

Generally each bounded context can be build as a standalone Microservice, For now I just created two Microservices: Booking and FlightAvailability. There are some interactions between these two Microservices, the obvious action is when passenger selected flight in Booking Microservice, The available amount of flights in FlightAvailability Microservice should subtract corresponding amount. The idea is when passenger selected a flight in Booking service, A event named JourneysSelectedEvent will be published to message bus, Any Microservices who are interested in this event can subscribe this event and handle it.

How to Run

Clone this repo

git clone https://github.com/twzhangyang/RestAirline.git

Running the container

Then spin up a new container using docker-compose

docker-compose up

Note: add a -d to run the container in background

An API service and mssql will run in docker

Run in local

This project based on .NET Core 3.1, please install corresponding SDK for your operating system:

After installing, please run below command to make sure current .NET Core version is 3.1.101 dotnet --version

Run the API

1. Try to input home api link in Postman:

GET http://localhost:61200/booking/home/


2. Select Journeys

Journey items should come from another micro-service named flight availability, for now let's build a journey in the api automatically for convenience. So you need not pass any journey id to this api.

POST /booking/journeys

add journey

3. Add passenger

We can get request body schema from last Api response become the whole Api is designed by Hypermedia. The api definition is totally described by last api response under resourceCommands\addPassengerCommand:

"addPassengerCommand": 
{
    "bookingId": "booking-352cb1f3-0f68-4e04-a2f7-24036eb53ce7",
    "name": null,
    "passengerType": 0,
    "age": 0,
    "email": null,
    "postUrl": {
        "uri": "/booking/booking-352cb1f3-0f68-4e04-a2f7-24036eb53ce7/passenger"
    }
}

Obviously the endpoint is:

http://localhost:61100/booking/booking-352cb1f3-0f68-4e04-a2f7-24036eb53ce7/passenger

The payload schema is:

{
	"bookingId": "booking-352cb1f3-0f68-4e04-a2f7-24036eb53ce7",
    "name": null,
    "passengerType": 0,
    "age": 0,
    "email": null,
}

bookingId is filled already, please try to fill other parameters, eg:

{
	"bookingId": "booking-352cb1f3-0f68-4e04-a2f7-24036eb53ce7",
    "name": "test",
    "passengerType": 0,
    "age": 22,
    "email": "[email protected]",
}

Send request:

POST booking/{bookingId}/passenger

add booking

4. Get booking

According to response of last api, you can either get the booking by resourceLinks or post data by resourceCommand.

GET /booking/{bookingId}

get booking

5. Update passenger Name

Business

The example is regarding online booking for an airline company. An airline company named 'RestAirline' is offering online booking.

  • After passenger submitted one of the available journey that means this passenger starting create an online booking.
  • passenger can submit multiple available journeys, every journey including a flight.
  • After passenger added journeys, he/she can add passengers.
  • Once passenger have been added in booking, passenger can update passenger name for each passenger.
  • passenger can submit available seats for each flight and each passenger, seat may just including seat number.
  • Once passenger submitted seats, passenger still can update seat.
  • After all of these steps, passenger have a chance to order insurance for all passenger some of them.
  • Last step is pay for all booking, if payment is successful then create a pnr(six digit) for this booking.
  • Online checkin is allowed for all the flights. Passenger can checkin at below time window:

2h <= timeWindow <= departure time - 30m

  • Passenger can do online checkin, after this step passenger start to his/her journey.
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].