Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hetic-mt-p2021/cqrses_group3
A repository based on DDD architecture to train with CQRS, and event sourcing
https://github.com/hetic-mt-p2021/cqrses_group3
cqrs ddd-architecture event-sourcing go
Last synced: 4 days ago
JSON representation
A repository based on DDD architecture to train with CQRS, and event sourcing
- Host: GitHub
- URL: https://github.com/hetic-mt-p2021/cqrses_group3
- Owner: HETIC-MT-P2021
- License: mit
- Created: 2021-01-05T13:37:36.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-19T16:09:54.000Z (over 3 years ago)
- Last Synced: 2024-06-20T00:32:00.403Z (5 months ago)
- Topics: cqrs, ddd-architecture, event-sourcing, go
- Language: Go
- Homepage:
- Size: 2.81 MB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# CQRSES_GROUP3
A repository to train on event sourcing, CQRS and DDD.
[Google Drive for CQRSES_GROUP3](https://drive.google.com/drive/folders/1YXihm3yICXDTGh6KhaKwunQL6gave4u4?usp=sharing)## Project setup
If this is the first time you run the project, please go to the `.env.dist` file and set the variables according to your wishes
then simply run `make init`
If you need more informations about the available make commands just run `make help`
### Docker Setup
Refer to the [DOCKER.md](DOCKER.md) for setup
## Useful resources
Google Drive: [CQRSES_GROUP3](https://drive.google.com/drive/folders/1YXihm3yICXDTGh6KhaKwunQL6gave4u4?usp=sharing)
> All the technical documentations and schemes.[Specifications board](https://github.com/HETIC-MT-P2021/CQRSES_GROUP3/projects/1)
> All the Epic and User stories[Application board](https://github.com/HETIC-MT-P2021/CQRSES_GROUP3/projects/2)
> All the technical tasks## Specification process
1. The process follow a simple logic: first we create an Epic issue in the [specifications board](https://github.com/HETIC-MT-P2021/CQRSES_GROUP3/projects/1) to reference all the correspondent User/Dev-Stories. Some of them are focused for developers, others for users.
2. Those Epic issues will be described with their initiatives and goals and captures a large amount of work granularized into User/Dev-stories.
3. Then the User/Dev-stories will be created with the desired behaviour for a specific feature.
4. Finally, the User/Dev-stories will be breakdown into technical tasks referenced as feature request in the issues list.> All of those issues follow the stages `Todo`, `In Progress`, `Done`
## Development process
1. Most of the time a ticket on the [application board](https://github.com/HETIC-MT-P2021/CQRSES_GROUP3/projects/2) in the `Todo` column is assign to a team member.
2. When a member starts working on the ticket, he should move the concerned ticket to `In Progress`.
3. Then he creates a branch specifically for this ticket with a name that follows the [conventions specified below](#branch-naming-convention).
4. Commit regularly at each significant step with unambiguous commit messages (see [COMMIT_CONVENTIONS](COMMIT_CONVENTIONS.md) file).
5. Create a merge request that follows the [conventions specified below](#pull-requests-pr) to the develop branch.
6. On the [application board](https://github.com/HETIC-MT-P2021/CQRSES_GROUP3/projects/2), move the ticket to the status `In Review`
7. Assign the merge request to a maintainer
8. It may take some back and forth before your pull request will be validated
9. Your pull request will be then merged into develop branch and the concerned ticket will be moved to `Done`## Tests
You can run tests using the `make test` command.
## Branch naming convention
You branch should have a name that reflects it's purpose.
It should use the same guidelines as [COMMIT_CONVENTIONS](COMMIT_CONVENTIONS.md) (`feat`, `fix`, `build`, `perf`, `docs`), followed by an underscore (`_`) and a very quick summary of the subject in [kebab case][1].
Example: `feat_add-image-tag-database-relation`.
## Pull requests (PR)
Pull requests in this project follow two conventions, you will need to use the templates available in the [ISSUE_TEMPLATE](.github/ISSUE_TEMPLATE) folder :
- Adding a new feature should use the [FEATURE_REQUEST](.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md) template.
- Reporting a bug should use the [BUG_REPORT](.github/ISSUE_TEMPLATE/bug_report.md) template.If your pull request is still work in progress, please add "WIP: " (Work In Progress) in front of the title, therefor you inform the maintainers that your work is not done, and we can't merge it.
The naming of the PR should follow the same rules as the [COMMIT_CONVENTIONS](COMMIT_CONVENTIONS.md)
## Linter
We use go linter [gofmt](https://blog.golang.org/gofmt) to automatically formats the source code.
## API Documentation
### Account
Create new account
```http request
POST /register
Content-Type: application/json
{
"name": "John Doe",
"email": "[email protected]",
"password": "*********"
}
```Log in
```http request
POST /login
Content-Type: application/json
{
"email": "[email protected]",
"password": "*********",
}
```> Please note that the token is set inside your cookies and that you need to place it inside the `Authorization` header of your request, prefixed by 'Bearer ' (the space is important).
### Articles
Get article
```http request
GET /api/v1/articles/:id
```Create new article
```http request
POST /api/v1/articles
Content-Type: application/json
{
"AuthorID": 1,
"Title": "The best article you'll read today",
"Content": "In fact it's the best article because it's only one line."
}
```Update an existing article
```http request
POST /api/v1/articles/:id
Content-Type: application/json
{
"AuthorID": 1,
"Title": "The best article you'll read today",
"Content": "In fact it's the best article because it's only one line."
}
```Delete article
```http request
DELETE /api/v1/articles/:id
```## Stack
| tool | port | note |
| - | - | - |
| postgres | 5432 | store the users |
| go | 8000 | the app |
| go | 8082 | the consumer |
| adminer | 8080 | administrate the db |
| elasticsearch | 9200 | store the articles |
| kibana | 5601 | manage elasticsearch |
| rabbitmq | 15672 - 5672 | queuing system |## Contributors