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
- Saas
- Modularity
- Microservice/Monolithic compatible
- Distributed Eventbus: kafka, pulsar
- Cache (Redis)
- Background Job: asynq
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
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
Open http://localhost:80
to see the web ui
Username: admin
Password: 123456
make init
make all
make build
kratos new <name> -r https://github.com/go-saas/kit-layout.git
Module design:
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:
For Monolithic: