Example CRUD project applying Hexagonal Architecture, Domain-Driven Design (DDD), Event-Driven Architecture (EDA), Command Query Responsibility Segregation (CQRS), Behavior-Driven Development (BDD), Continuous Integration (CI), and more... in Go
-
Project Layout
- Based on Standard Go Project Layout
-
Message Broker
- Routing Key (based on AsyncAPI Topic Definition)
-
Devcontainer
- Features
- Extensions & Settings
-
Docker
- Dockerfile
- Multistage
- Compose
- Setup by ENV
- Dockerfile
-
GitHub
- Actions & Workflows
- Setup Languages and Dependencies
- Secrets Scanning (TruffleHog Action), Linting & Test Checks
- Upgrade Dependencies
- Automate Release
- Issue Templates (Defaults)
- Actions & Workflows
-
Git
- Hooks
- Pre-Commit
- Secrets Scanning (TruffleHog CLI) & Formatting
- Commit-Msg
- Check Conventional Commits rules
- Pre-Commit
- Hooks
-
Releases
- Automatically
- Hooks
- Linting & Test Checks
- Bump Version (based on Conventional Commits & SemVer)
- CHANGELOG
- Commit & Tag
- GitHub Release
- Hooks
- Automatically
-
Security
- Account confirmation via email
- Password hashing (Bcrypt)
-
Scripts
git clone https://github.com/bastean/codexgo.git && cd codexgo
git clone git@github.com:bastean/codexgo.git && cd codexgo
-
Install required
-
Start VS Code
code .
-
Open Command Palette
- Ctrl+Shift+P
-
Run
Dev Containers: Reopen in Container
-
Run
make from-zero
-
Actions
-
General
-
Workflow permissions
- Read and write permissions
-
-
-
Secrets and variables
-
Actions
-
New repository secret
-
BOT_GPG_PRIVATE_KEY
gpg --armor --export-secret-key [Pub_Key_ID (*-BOT)]
-
BOT_GPG_PASSPHRASE
-
-
-
Important
Before running it, you must set the following environment variables and rename the file to .env.(dev|test|prod)
make compose-dev
-
Unit
make test-unit
-
Integration
make compose-test-integration
-
Acceptance
make compose-test-acceptance
-
All
make compose-test-all
make compose-prod
- Contributions and Feedback are always welcome!