当前位置: 首页 > 软件库 > 云计算 > Serverless 系统 >

wild-workouts-go-ddd-example

授权协议 MIT License
开发语言 JavaScript
所属分类 云计算、 Serverless 系统
软件类型 开源软件
地区 不详
投 递 者 颜河
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Wild Workouts

Wild Workouts is an example Go DDD project that we created to show how to build Go applications that are easy to develop, maintain, and fun to work with, especially in the long term!

The idea for this series, is to apply DDD by refactoring. This process is in progress! Please check articles, to know the current progress.

No application is perfect from the beginning. With over a dozen coming articles, we will uncover what issues you can find in the current implementation. We will also show how to fix these issues and achieve clean implementation by refactoring.

Articles

"Too modern" application

  1. Too modern Go application? Building a serverless application with Google Cloud Run and Firebase [v1.0]
  2. A complete Terraform setup of a serverless application on Google Cloud Run and Firebase [v1.1]
  3. Robust gRPC communication on Google Cloud Run (but not only!) [v1.2]
  4. You should not build your own authentication. Let Firebase do it for you. [v1.3]

Refactoring

  1. Business Applications in Go: Things to know about DRY [v2.0]
  2. When microservices in Go are not enough: introduction to DDD Lite [v2.1]
  3. Repository pattern: painless way to simplify your Go service logic [v2.2]
  4. 4 practical principles of high-quality database integration tests in Go [v2.3]
  5. Introducing Clean Architecture by refactoring a Go project [v2.4]
  6. Introducing basic CQRS by refactoring [v2.5]
  7. Combining DDD, CQRS, and Clean Architecture
  8. Microservices test architecture. Can you sleep well without end-to-end tests? [v2.6]
  9. Repository secure by design: how to sleep better without fear of security vulnerabilities
  10. Running integration tests on Google Cloud Build using docker-compose [v2.7]
  11. More articles are on the way!

Community

We're building a Discord community focused on modern business applications. It's the place to discuss hard topics, request a review, or ask if something's not clear. Come join us!

Directories

  • api OpenAPI and gRPC definitions
  • docker Dockerfiles
  • internal application code
  • scripts deployment and development scripts
  • terraform - infrastructure definition
  • web - frontend JavaScript code

Live Demo

The example application is available at https://threedotslabs-wildworkouts.web.app/.

Running locally

> docker-compose up

# ...

web_1             |  INFO  Starting development server...
web_1             |  DONE  Compiled successfully in 6315ms11:18:26 AM
web_1             |
web_1             |
web_1             |   App running at:
web_1             |   - Local:   http://localhost:8080/
web_1             |
web_1             |   It seems you are running Vue CLI inside a container.
web_1             |   Access the dev server via http://localhost:<your container's external mapped port>/
web_1             |
web_1             |   Note that the development build is not optimized.
web_1             |   To create a production build, run yarn build.

Google Cloud Deployment

> cd terraform/
> make

Fill all required parameters:
	project [current: wild-workouts project]:       # <----- put your Wild Workouts Google Cloud project name here (it will be created) 
	user [current: email@gmail.com]:                # <----- put your Google (Gmail, G-suite etc.) e-mail here
	billing_account [current: My billing account]:  # <----- your billing account name, can be found here https://console.cloud.google.com/billing
	region [current: europe-west1]: 
	firebase_location [current: europe-west]: 

# it may take a couple of minutes...

The setup is almost done!

Now you need to enable Email/Password provider in the Firebase console.
To do this, visit https://console.firebase.google.com/u/0/project/[your-project]/authentication/providers

You can also downgrade the subscription plan to Spark (it's set to Blaze by default).
The Spark plan is completely free and has all features needed for running this project.

Congratulations! Your project should be available at: https://[your-project].web.app

If it's not, check if the build finished successfully: https://console.cloud.google.com/cloud-build/builds?project=[your-project]

If you need help, feel free to contact us at https://threedots.tech

Screenshots

Wild Workouts loginWild Workouts trainer's scheduleWild Workouts schedule training

 相关资料
  • Wild Cherry A fairy-tale inspired theme, with tasteful use of emojis - Zsh, iTerm, Sublime, Atom, Slack, Mou, PuTTY, Notepad++, Vivaldi & DuckDuckGo �� Git Princess is close to death. �� Commit to her

  • �� �� Hexagonal Architecture, DDD & CQRS in PHP Example of a PHP application using Domain-Driven Design (DDD) and Command Query Responsibility Segregation (CQRS) principles keeping the code as simple

  • GNU DDD (Data Display Debuger) 是一个图形化的调试工具,通过对调试命令例如 GDB、DBX、WDB、JDB、XDB 等等命令行工具的封装,提供一个非常友好的调试界面。

  • 所以我将通过使用一个例子来解释这个问题,因为它使一切更加具体,希望能减少歧义。 架构非常简单 1微服务 每个微服务都将使用CQRS/ES设计模式,这意味着 每个微服务都有自己的Aggregate映射现实世界问题的域 聚合的状态将从事件存储重建 每个事件都将表示聚合中的状态更改,并将通过消息代理传输到对更改感兴趣的任何服务 每个微服务都将在其自己的域内进行事务处理 每个微服务最终都会与其他域保持一致

  • 假设我有一个对象,该对象应包含(政府 ID)对象。我正在从乘客获取。创建对服务器的请求并获取数据(json),而不是解析接收的数据并存储在存储库中。 我很困惑,因为我想将< code>Passport存储为实体,并将其放入< code>PassportRepository中,但所有关于密码的信息都包含在json中,而不是我在上面收到的信息。 我想我应该使用作为 VO 并将其放入(聚合)对象中。或者

  • 主要内容:前言,贫血模型,应用层(即Service层),领域层(或者叫模型层),优点,缺点,充血模型前言 要想深入掌握和了解 DDD 领域驱动设计的核心,那无论如何也绕不开两大较为抽象的概念——“贫血模型”、“充血模型”: 贫血模型即事务脚本模式。 充血模型即领域模型模式。 贫血模型 贫血模型最早广泛应用源于EJB2,最强盛时期则是由Spring创造,将: “行为”(逻辑、过程); “状态”(数据,对应到语言就是对象成员变量)。 分离到不同的对象中: 只有状态的对象就是所谓的“贫血对象”(常称为