Giter VIP home page Giter VIP logo

microservice-template-ddd's Introduction

microservice-template by ddd

DDD example use micriservices.

Getting Started

# Get help
make help

# Run services
make run

# Stop services
make down
Prerequisites
  • docker
  • docker-compose
  • protoc 3.7.1+

Service

Name Port Description Endpoint
traefik 80 HTTP
traefik 443 HTTPS
traefik 8060 Dashboard
api 7070 HTTP API
user 50051 gRPC Server
billing 50051 gRPC Server

Architecture

.
├── /cmd/                       # Run service endpoint
│   ├── /user/                  # User service
│   ├── /book/                  # Book service
│   └── /billing/               # Billing service
├── /pkg/                       # The public source code of the application
├── /internal/                  # The private source code of the application
│   └── /bookService/           # Book service source code
│       ├── /useCases/          # Write business logic [./application]
│       ├── /domian/            # Entity struct that represent mapping to data model
│       └── /infrastructure/    # Solves backend technical topics
│           ├── /store/         # Store delivery [../repository]
│           ├── /rpc/           # RPC delivery
│           └── /mq/            # MQ delivery
├── /ops/                       # All infrastructure configuration for IoC
├── .gitignore                  # A gitignore file specifies untracked files
└── README.md                   # README

HTTP API

Request example

example

Opentracing example request

example example

microservice-template-ddd's People

Contributors

batazor avatar imgbotapp avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

microservice-template-ddd's Issues

Consuming Rest API

Was trying to implement this template in a new project. Need proper documentation to understand.

  1. Have modified this as there was no package with tag 1.21 for jaegertracing/spark-dependencies as mentioned in infrastructure/opentracing.yaml
    https://hub.docker.com/r/jaegertracing/spark-dependencies/tags?page=1&ordering=last_updated
  2. How to consume rest API from localhost:7070 links provided in postman were not working
    https://batazor.github.io/microservice-template-ddd/docs/microservice-template-ddd.postman_collection.json
  3. Have also commented Handler: chi.ServerBaseContext(ctx,r) at line 61 in /internal/api/http/server.go as this is outdated and go-chi has removed this method ServerBaseContext

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • fix(deps): update module github.com/google/wire to v0.6.0
  • fix(deps): update module github.com/stretchr/testify to v1.9.0
  • fix(deps): update module google.golang.org/grpc to v1.63.2
  • chore(deps): update actions/checkout action to v4
  • chore(deps): update golangci/golangci-lint-action action to v5
  • fix(deps): update module github.com/go-chi/chi to v5
  • fix(deps): update module github.com/grpc-ecosystem/go-grpc-middleware to v2
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
ops/dockerfile/api.Dockerfile
  • golang 1.20-alpine
ops/dockerfile/billing.Dockerfile
  • golang 1.20-alpine
ops/dockerfile/book.Dockerfile
  • golang 1.20-alpine
ops/dockerfile/user.Dockerfile
  • golang 1.20-alpine
github-actions
.github/workflows/golangci-lint.yml
  • actions/checkout v3
  • golangci/golangci-lint-action v3
gomod
go.mod
  • go 1.20
  • github.com/go-chi/chi v1.5.4
  • github.com/go-chi/cors v1.2.1
  • github.com/go-chi/render v1.0.3
  • github.com/go-redis/redis v6.15.9+incompatible
  • github.com/go-redis/redis/v9 v9.0.5
  • github.com/golang-migrate/migrate/v4 v4.15.2
  • github.com/google/wire v0.5.0
  • github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
  • github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
  • github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e@73cb765af46e
  • github.com/opentracing/opentracing-go v1.2.0
  • github.com/ory/dockertest/v3 v3.9.1
  • github.com/spf13/viper v1.14.0
  • github.com/stretchr/testify v1.8.4
  • github.com/uber/jaeger-client-go v2.30.0+incompatible
  • go.mongodb.org/mongo-driver v1.11.0
  • go.uber.org/atomic v1.10.0
  • go.uber.org/zap v1.24.0
  • google.golang.org/grpc v1.57.0
  • google.golang.org/protobuf v1.30.0

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.