kit

module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2022 License: Apache-2.0

README

This project is under development

go-saas-kit

Kit for golang sass project

Frontend Repo: https://github.com/go-saas/kit-frontend
Layout Repo( For creating new service): https://github.com/go-saas/kit-layout

Architecture

Architecture

Feature

  • Saas
  • Modularity
  • Microservice/Monolithic compatible
  • Distributed Eventbus: kafka, pulsar
  • Cache (Redis)
  • Background Job: asynq

Quick Start

For Microservice
docker-compose -f docker-compose.yml -f docker-compose.ms.yml -f docker-compose.kafka.yml -f docker-compose.tracing.yml up -d

Or with build

docker-compose -f docker-compose.yml -f docker-compose.ms.yml -f docker-compose.kafka.yml  -f docker-compose.tracing.yml up -d --build
For Monolithic
docker-compose -f docker-compose.yml -f docker-compose.monolithic.yml -f docker-compose.kafka.yml  -f docker-compose.tracing.yml up -d

Or with build

docker-compose -f docker-compose.yml -f docker-compose.monolithic.yml -f docker-compose.kafka.yml  -f docker-compose.tracing.yml up -d --build
Demo

Open http://localhost:80 to see the web ui

Username: admin
Password: 123456

Open http://localhost:80/dev/docs to see swagger openapi
Open http://localhost:80/dev/jaeger to see jaeger tracing
Open http://localhost:80/dev/jobs to see background job status

Development

make init
make all
make build

Modularity

Module design:

Minimal

Api: Protobuf definition for public/internal service and models

Event: Protobuf definition for distributed event bus

Biz: Domain layer, definition for all entities and repository interface

Service: Business logic, depends on biz repository interface

Data: Data access layer, implement biz repository interface, init databases( mysql ,redis), init event bus (kafka ), expose migration function

Conf: Protobuf configuration definition

Server: Set up http and grpc server. register all services, set up middlewares. set up distributed event handler, seeding behavior

Host: Process entry point, read configuration, set up tracing, logging

For Microservice:

Minimal

For Monolithic:

Minimal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL