Skip to content

Commit

Permalink
Merge branch 'release/1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
lindyhopchris committed Mar 14, 2024
2 parents 2312a11 + ad110d2 commit 772cd59
Show file tree
Hide file tree
Showing 38 changed files with 6,100 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ deptrac.yaml export-ignore
phpstan.neon export-ignore
phpunit.xml export-ignore
pint.json export-ignore
/docs export-ignore
package.json export-ignore
package-lock.json export-ignore
64 changes: 64 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Sample workflow for building and deploying a VitePress site to GitHub Pages
#
name: Deploy Pages

on:
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
# using the `master` branch as the default branch.
push:
branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
# - uses: pnpm/action-setup@v3 # Uncomment this if you're using pnpm
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm # or pnpm / yarn
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: npm ci # or pnpm install / yarn install / bun install
- name: Build with VitePress
run: npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ vendor/
composer.lock
.phpunit.cache/
.deptrac.cache

# Vitepress
node_modules/
docs/.vitepress/dist/
docs/.vitepress/cache/
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file. This projec

## Unreleased

## [1.1.0] - 2024-03-14

### Added

- Allow an outbound integration event handler to implement a `publish()` method. The `handle()` method is still
supported, but `publish()` makes more sense to describe what the handler does with the event it has been given.

### Fixed

- Added missing UUID 7 and 8 methods to the UUID factory interface.
- The `Result::error()` method now correctly returns the first error message even if it is not on the first error in the
list.

## [1.0.0] - 2024-03-09

### Removed
Expand Down
33 changes: 29 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,40 @@

**Write highly encapsulated and loosely coupled modules, for domain-centric architecture.**

## Documentation
[Read the docs here.](https://cloudcreativity.github.io/ddd-modules)

This package provides a common PHP toolset for writing these modules.
## What is this?

You've decided to use domain-driven design (DDD) as your architectural approach. You've engaged with business experts,
maybe even held some Event Storming sessions, and can now talk fluently in the ubiquitous language of your domain. Now
you need to start writing the domain code.

But how?! :thinking:

How should your code be structured? How do you ensure that the bounded context you're writing is entirely
encapsulated? How do you enforce architectural boundaries between bounded contexts, and ensure that they are loosely
coupled?

Don't worry, we've got you!

This package provides a conceptual approach and a set of tooling to help you write loosely coupled and highly
encapsulated bounded contexts - or modules - in PHP.

Whether you are on a journey to split a monolith into a modular monolith, or building out a microservices architecture,
this package will help you keep your bounded contexts clean, highly unit-testable, and easy to reason about.
It also ensures you have code consistency across all bounded contexts, while allowing plenty of flexibility for
each context to be tailored to its specific needs.

## Where to Start?

This package provides a common PHP toolset for writing domain-centric modules.

**It can be tempting to dive straight into the code - you'll need to resist that temptation!**

The key to achieving highly encapsulated and loosely coupled modules is _how you use the tools in this package_. That is
described in the [documentation](https://github.com/cloudcreativity/ddd-modules/wiki) - so ensure you read the docs
before using these tools.
described in the documentation - so ensure you read the docs before using these tools.

[You can read the documentation here.](https://cloudcreativity.github.io/ddd-modules)

## Installation

Expand Down
94 changes: 94 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
import {defineConfig} from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "DDD Modules",
description: "Modules for domain-driven implementations in PHP.",
base: '/ddd-modules/',
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{
text: 'Guide',
link: '/guide/',
},
],

sidebar: {
'/guide/': [
{
text: 'Introduction',
collapsed: false,
items: [
{text: 'What is DDD Modules?', link: '/guide/'},
{text: 'Installation', link: '/guide/installation'},
],
},
{
text: 'Core Concepts',
collapsed: false,
items: [
{text: 'Overview', link: '/guide/concepts/'},
{text: 'Bounded Contexts', link: '/guide/concepts/bounded-contexts'},
{text: 'Layers', link: '/guide/concepts/layers'},
{text: 'Encapsulation', link: '/guide/concepts/encapsulation'},
{text: 'Modularisation', link: '/guide/concepts/modularisation'},
],
},
{
text: 'Domain Layer',
collapsed: false,
items: [
{text: 'Entities & Aggregates', link: '/guide/domain/entities'},
{text: 'Value Objects', link: '/guide/domain/value-objects'},
{text: 'Domain Events', link: '/guide/domain/events'},
{text: 'Services', link: '/guide/domain/services'},
],
},
{
text: 'Infrastructure Layer',
collapsed: true,
items: [
{text: 'Asynchronous Processing', link: '/guide/infrastructure/queues'},
{text: 'Outbox & Inbox', link: '/guide/infrastructure/outbox-inbox'},
{text: 'Persistence', link: '/guide/infrastructure/persistence'},
{text: 'Units of Work', link: '/guide/infrastructure/units-of-work'},
],
},
{
text: 'Application Layer',
collapsed: false,
items: [
{text: 'Commands', link: '/guide/application/commands'},
{text: 'Queries', link: '/guide/application/queries'},
{text: 'Integration Events', link: '/guide/application/events'},
],
},
{
text: 'Toolkit',
collapsed: true,
items: [
{text: 'Assertions', link: '/guide/toolkit/assertions'},
{text: 'Identifiers', link: '/guide/toolkit/identifiers'},
{text: 'Iterables', link: '/guide/toolkit/iterables'},
{text: 'Results', link: '/guide/toolkit/results'},
],
}
],
},

socialLinks: [
{
icon: 'github',
link: 'https://github.com/cloudcreativity/ddd-modules',
},
],

footer: {
message: 'Released under the MIT License.',
copyright: 'Copyright © 2024 Cloud Creativity Ltd',
},

outline: 'deep',
},
})
Loading

0 comments on commit 772cd59

Please sign in to comment.