https://github.com/brittonhayes/staffing
This is an example of a staffing service for a fictional consulting company. It is an implementation of Domain Driven Design and Clean Architecture.
https://github.com/brittonhayes/staffing
cqrs ddd event-sourcing golang
Last synced: 5 days ago
JSON representation
This is an example of a staffing service for a fictional consulting company. It is an implementation of Domain Driven Design and Clean Architecture.
- Host: GitHub
- URL: https://github.com/brittonhayes/staffing
- Owner: brittonhayes
- License: mit
- Created: 2023-02-10T03:53:30.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-19T22:29:42.000Z (about 2 years ago)
- Last Synced: 2025-02-10T06:12:11.688Z (5 months ago)
- Topics: cqrs, ddd, event-sourcing, golang
- Language: Go
- Homepage:
- Size: 149 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Staffing Service
[](https://pkg.go.dev/github.com/brittonhayes/staffing)

[](https://goreportcard.com/report/github.com/brittonhayes/staffing)This is an example of a staffing service for a fictional consulting company. It is an implementation of [Domain Driven Design](https://www.amazon.com/Domain-Driven-Design-Tackling-Complexity-Software/dp/0321125215) and [Clean Architecture](https://www.amazon.com/Clean-Architecture-Craftsmans-Software-Structure/dp/0134494164).
The structure of the service is based off [github.com/marcusolsson/goddd by Marcus Olsson](https://github.com/marcusolsson/goddd).
## Usage
```bash
# Clone the repository
gh repo clone brittonhayes/staffing# Run the service with default settings
go run ./cmd/staffd/main.go
```### Configuration
The service can be run with a few different customization options. These options can be set with environment variables or command line flags.
```bash
# OR run the service with in-memory storage and debug logging
go run ./cmd/staffd/main.go -storage inmem -debug
# OR run the service with sqlite storage and debug logging
go run ./cmd/staffd/main.go -storage sqlite -debug
```## Docker
```bash
# Build the image
docker build -t ghcr.io/brittonhayes/staffing:latest .# Run the image
docker run ghcr.io/brittonhayes/staffing:latest
```## Docker Compose
You can run with docker-compose see how the service integrates with external metrics or storage services like prometheus or postgres.
```bash
# Run the service with docker-compose
docker-compose up
```## Development
```bash
# Clone the repository
gh repo clone brittonhayes/staffing
cd ./staffing# Checkout to a new branch
git checkout -b feat/my-new-feature# Commit your changes
git commit -am "feat:Add some feature"# Create a PR
gh pr create -w
```## Resources
### Articles
- http://www.citerus.se/go-ddd
- http://www.citerus.se/part-2-domain-driven-design-in-go
- http://www.citerus.se/part-3-domain-driven-design-in-go