Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hetic-mt-p2021/cqrses_group1
β© Test CQRS, DDD and event sourcing with a GoLang project
https://github.com/hetic-mt-p2021/cqrses_group1
cqrs-es ddd event-sourcing golang
Last synced: 4 days ago
JSON representation
β© Test CQRS, DDD and event sourcing with a GoLang project
- Host: GitHub
- URL: https://github.com/hetic-mt-p2021/cqrses_group1
- Owner: HETIC-MT-P2021
- License: mit
- Created: 2021-01-05T13:36:39.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-19T10:58:07.000Z (over 3 years ago)
- Last Synced: 2024-06-14T21:22:34.769Z (5 months ago)
- Topics: cqrs-es, ddd, event-sourcing, golang
- Language: Go
- Homepage:
- Size: 84 KB
- Stars: 2
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.MD
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Our school project π’
The goal of this project is to create an optimized API using two patterns: CQRS & Event sourcing.
### Patterns used
CQRS separates reads and writes into different models, using commands to update data, and queries to read data.The Event Sourcing pattern defines an approach to handling operations on data that's driven by a sequence of events, each of which is recorded in an append-only store.
Application code sends a series of events that imperatively describe each action that has occurred on the data to the event store, where they're persisted. Each event represents a set of changes to the data.
### Consumer repository
The consumer wait to receive messages from the message broker host in the main project[Consumer link](https://github.com/HETIC-MT-P2021/CQRSES_GROUP1_Consumer)
## Features π- User authentication with JWT.
- User management.
- Article management.## Starting the project π
After cloning the repo, `cd` into the project, create the .env according to .env.example, and run the following commands
```bash
docker-compose up --build
```After that :
Go to http://localhost:8091/Enter the env COUCH_USER/COUCH_PASSWORD
Create Two Buckets as CouchBase:
- event-store
- read-modelsRestart the docker-compose
```bash
docker-compose restart
```
### Endpoints π
Healthcheck β€οΈ```http request
GET /
```
Login π
```http request
POST /login
```#### Users π¦
Create a new user
```http request
POST /users
```
Get all users
```http request
GET /users
```
Get a user by id
```http request
GET /users/{id}
```
Update a user
```http request
PUT /users/{id}
```
Delete a user
```http request
DELETE /users/{id}
```
#### POSTS π°
Create a new post
```http request
POST /posts
```
Get all posts
```http request
GET /posts
```
Get a post by id
```http request
GET /posts/{id}
```
Update a post
```http request
PUT /posts/{id}
```
Delete a post
```http request
DELETE /posts/{id}
```
### API Demo β¨
The API doc is available [here](https://documenter.getpostman.com/view/14693906/TzCFhqn8)### Documentation
You can find the technical and functional documentation in French and English version by clicking on the link below:
[LINK DRIVE](https://drive.google.com/drive/folders/1ZGYXEniZO2mb2mk9MUTHwAJNXuh1KYUC?usp=sharing)
### Technical Choices π§
Feel free to discuss with any contributor about the technical choices that were made:
- Go Version: `1.15`
- PostgreSQL database: `13`
- CouchBase database: `5.5.x`## Contributing π‘
Share with us your ideas to improve our project !See [contributing](https://github.com/HETIC-MT-P2021/CQRSES_GROUP1/blob/main/CONTRIBUTING.MD) guidelines.
### Authors π
- [Tsabot](https://github.com/Tsabot)
- [myouuu](https://github.com/myouuu)
- [acauchois](https://github.com/acauchois)
- [gensjaak](https://github.com/gensjaak)### Tasks management π¨
We like to iterate quickly, setting up an agile board helps everyone stay on task. With Trello, we Created lists for backlogged items, whatβs being worked on in the current sprint, and (most importantly) whatβs completed.You can take a look at our organization of tasks on [Trello](https://trello.com/b/uY6KOh4i/go-cqrs)
### License π
The code is available under the MIT license.