MCPcopy
hub / github.com/ardanlabs/service

github.com/ardanlabs/service @main sqlite

repository ↗ · DeepWiki ↗
1,148 symbols 3,828 edges 230 files 661 documented · 58%
README

Ultimate Software Design with Kubernetes

CircleCI Go Report Card go.mod Go version

Copyright 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025 Ardan Labs
hello@ardanlabs.com

My Information

Name:    Bill Kennedy
Company: Ardan Labs
Title:   Managing Partner
Email:   bill@ardanlabs.com
Twitter: goinggodotnet

Description

"As a program evolves and acquires more features, it becomes complicated, with subtle dependencies between components. Over time, complexity accumulates, and it becomes harder and harder for programmers to keep all the relevant factors in their minds as they modify the system. This slows down development and leads to bugs, which slow development even more and add to its cost. Complexity increases inevitably over the life of any program. The larger the program, and the more people that work on it, the more difficult it is to manage complexity." - John Ousterhout

"A complex system that works is invariably found to have evolved from a simple system that worked. A complex system designed from scratch never works and cannot be patched up to make it work. You have to start over with a working simple system." - John Gall

The service starter kit is a starting point for building production grade scalable web service applications that leverage the power of a Domain Driven, Data Oriented Architecture that can run in Kubernetes. The goal of this project is to provide a proven starting point that reduces the repetitive tasks required for a new project to be launched into production. It uses minimal dependencies, implements idiomatic code and follows Go best practices. Collectively, the project lays out everything logically to minimize guess work and enable engineers to quickly maintain a mental model for the project.

The class behind this starter kit teaches how to build production-level software in Go leveraging the power of a Domain Driven, Data Oriented Architecture that can run in Kubernetes. From the beginning, you will pair program with the instructor walking through the design philosophies and guidelines for building software in Go. With each new feature that is added to the project, you will learn how to deploy to and manage the Kubernetes environment used to run the project. The core of this class is to teach you and your team how to handle and reduce the spread of complexity in the systems you are building.

Learn more about the project:

Wiki | Course Outline | Class Schedule

Licensing

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Learn More

Reach out about corporate training events, open enrollment live training sessions, and on-demand learning options.

Ardan Labs (www.ardanlabs.com)
hello@ardanlabs.com

Index

Installation

To clone the project, create a folder and use the git clone command. Then please read the makefile file to learn how to install all the tooling and docker images.

$ cd $HOME
$ mkdir code
$ cd code
$ git clone https://github.com/ardanlabs/service or git@github.com:ardanlabs/service.git
$ cd service

Create Your Own Version

If you want to create a version of the project for your own use, use the new gonew command.

$ go install golang.org/x/tools/cmd/gonew@latest

$ cd $HOME
$ mkdir code
$ cd code
$ gonew github.com/ardanlabs/service github.com/mydomain/myproject
$ cd myproject
$ go mod vendor

Now you have a copy with your own module name. Now all you need to do is initialize the project for git.

Running The Project

To run the project use the following commands.

# Install Tooling
$ make dev-gotooling
$ make dev-brew
$ make dev-docker

# Run Tests
$ make test

# Shutdown Tests
$ make test-down

# Run Project
$ make dev-up
$ make dev-update-apply
$ make token
$ export TOKEN=<COPY TOKEN>
$ make users

# Run Load
$ make load

# Run Tooling
$ make grafana
$ make statsviz

# Shut Project
$ make dev-down

Agent Skills

The project ships with a set of Agent Skills that teach AI coding agents the conventions used in this codebase. Each skill loads automatically when its task matches, or you can ask the agent to apply it by name.

  • use-modern-go — Applies modern Go syntax for the project's Go version. Use whenever writing, editing, or reviewing .go code.
  • branching-logic-flow — Prefers defaulting and naked switches over if/else chains for shallow (1–3 branch) conditional logic in Go.
  • layered-architecture-types — Enforces primitive-at-edges / strong-types-in-Business layering and the toBus/fromBusResponse/toDB converter pattern. Use when editing app/*, business/domain/*, or .../stores/*db files.
  • business-layer-extensions — Adds cross-cutting concerns (OTEL, logging, metrics, caching, auth) to a business domain via the ExtBusiness/Extension decorator pattern, without modifying the core Business.
  • review-pr — Service Diffguard: read-only PR review lenses (correctness, error visibility, comment truthfulness, test coverage, type/contract boundaries, simplification) across every language in the repo.

How to use

First, invoke the agent to load AGENTS.md file skills

Load the skills per @AGENTS.md file

Then, start working on what's needed. E.g.

review pr

This will invoke the PR review skill.

OR

Let's review the current app/business layer for the user specific parts. Specifically, @app/domain/userapp and @business/domain/userbus

This will review the code related to the user capability of the service.

Purchase Video

The entire training class has been recorded to be made available to those who can't have the class taught at their company or who can't attend a conference. This is the entire class material.

ardanlabs.com/education

Our Experience

We have taught Go to thousands of developers all around the world since 2014. There is no other company that has been doing it longer and our material has proven to help jump-start developers 6 to 12 months ahead of their knowledge of Go. We know what knowledge developers need in order to be productive and efficient when writing software in Go.

Our classes are perfect for intermediate-level developers who have at least a few months to years of experience writing code in Go. Our classes provide a very deep knowledge of the programming langauge with a big push on language mechanics, design philosophies and guidelines. We focus on teaching how to write code with a priority on consistency, integrity, readability and simplicity. We cover a lot about “if performance matters” with a focus on mechanical sympathy, data oriented design, decoupling and writing/debugging production software.

Our Teacher

William Kennedy (@goinggodotnet)

William Kennedy is a managing partner at Ardan Labs in Miami, Florida. Ardan Labs is a high-performance development and training firm working with startups and fortune 500 companies. He is also a co-author of the book Go in Action, the author of the blog GoingGo.Net, and a founding member of GoBridge which is working to increase Go adoption through diversity.

Video Training
Ultimate Go Video
Ardan Labs YouTube Channel

Blog
Going Go

Writing
Running MongoDB Queries Concurrently With Go
Go In Action

Articles
IT World Canada

Video
GopherCon USA (2025): Understanding Escape Analysis to Speed Up Your Code
GopherCon USA (2025): Go’s Trace Tooling and Concurrency
GopherCon UK (2025) - Building a coding agent from scratch
GopherCon UK (2025) - K8s CPU Limits Deconstructed - Bill Kennedy
Golang Charlotte (2024) - Domain Driven, Data Oriented Architecture
GopherCon SG (2023) - K8s CPU Limits and Go
P99 Talk (2022) - Evaluating Performance In Go
GopherCon Europe (2022) - Practical Memory Profiling
Dgrpah Day (2021) - Getting Started With Dgraph and GraphQL
GDN Event #1 (2021) - GoBridge Needs Your Help
Training Within The Go Community (2019)
GopherCon Australia (2019) - Modules
Golab (2019) - You Want To Build a Web Service?
GopherCon Singapore (2019) - Garbage Collection Semantics
GopherCon India (2019) - Channel Semantics
GoWayFest Minsk (2018) - Profiling Web Apps
GopherCon Singapore (2018) - Optimizing For Correctness
GopherCon India (2018) - What is the Legacy You Are Leaving Behind
Code::Dive (2017) - Optimizing For Correctness
Code::Dive (2017) - Go: Concurrency Design
dotGo (2017) - Behavior Of Channels
GopherCon Singapore (2017) - Escape Analysis
Capital Go (2017) - Concurrency Design
GopherCon India (2017) - Package Oriented Design
GopherCon India (2015) - Go In Action
GolangUK (2016) - Dependency Management
GothamGo (2015) - Error Handling in Go
GopherCon (2014) - Building an analytics engine

Golang Charlotte (2023) - Domain Driven, Data Oriented Architecture with Bill Kennedy
Prague Meetup (2021) - Go Module Engineering Decisions
Practical Understanding Of Scheduler Semantics (2021)
Go Generics Draft Proposal (2020)
Hack Potsdam (2017) - Tech Talk with William Kennedy
Chicago Meetup (2016) - An Evening
Vancouver Meetup (2016) - Go Talk & Ask Me Anything With William Kennedy
Vancouver Meetup (2015) - Compiler Optimizations in Go
Bangalore Meetup (2015) - OOP in Go
GoSF Meetup - The Nature of Constants in Go
London Meetup - Mechanical Sympathy
Vancouver Meetup - Decoupling From Change

Podcasts
[Ardan Labs Pod

Extension points exported contracts — how you extend this code

Encoder (Interface)
Encoder defines behavior that can encode a data model and provide the content type for that encoding. [11 implementers]
foundation/web/web.go
KeyLookup (Interface)
KeyLookup declares a method set of behavior for looking up private and public keys for JWT use. The return could be a PE [3 …
app/sdk/auth/auth.go
Dialect (Interface)
Dialect describes the engine-specific behavior a store needs in order to compose portable SQL from shared fragments. [2 …
business/sdk/sqldb/dialect/dialect.go
Collector (Interface)
Collector defines a contract a collector must support so a consumer can retrieve metrics. [1 implementers]
api/services/metrics/publisher/publisher.go
Storer (Interface)
Storer interface declares the behavior this package needs to persist and retrieve data.
business/domain/vproductbus/vproductbus.go
EventFn (FuncType)
EventFn is a function to be executed when configured against a log level.
foundation/logger/model.go
JobFn (FuncType)
JobFn defines a function that can execute work for a specific job.
foundation/worker/worker.go
Decoder (Interface)
Decoder represents data that can be decoded. [9 implementers]
foundation/web/request.go

Core symbols most depended-on inside this repo

Errorf
called by 98
app/sdk/errs/errs.go
String
called by 68
app/sdk/errs/errs.go
Info
called by 68
foundation/logger/logger.go
Run
called by 52
app/sdk/apitest/apitest.go
Add
called by 52
app/sdk/errs/errs.go
String
called by 46
business/domain/userbus/event.go
New
called by 45
app/sdk/errs/errs.go
Error
called by 44
app/sdk/errs/errs.go

Shape

Method 509
Function 409
Struct 175
Interface 25
FuncType 15
TypeAlias 15

Languages

Go100%
TypeScript1%

Modules by API surface

app/domain/grpcauthapp/authapp.pb.go118 symbols
business/sdk/sqldb/dbarray/dbarray.go42 symbols
business/domain/userbus/userbus.go31 symbols
business/domain/productbus/productbus.go29 symbols
business/domain/homebus/homebus.go29 symbols
app/domain/grpcauthapp/authapp_grpc.pb.go26 symbols
app/sdk/errs/errs.go18 symbols
foundation/logger/logger.go16 symbols
app/sdk/mid/mid.go15 symbols
business/sdk/sqldb/sqldb.go14 symbols
business/domain/userbus/stores/usercache/usercache.go14 symbols
business/domain/auditbus/auditbus.go14 symbols

Dependencies from manifests, versioned

cloud.google.com/go/compute/metadatav0.9.0 · 1×
github.com/agnivade/levenshteinv1.2.1 · 1×
github.com/ardanlabs/conf/v3v3.12.0 · 1×
github.com/ardanlabs/darwin/v3v3.3.1 · 1×
github.com/arl/statsvizv0.8.0 · 1×
github.com/cespare/xxhash/v2v2.3.0 · 1×
github.com/decred/dcrd/dcrec/secp256k1/v4v4.4.1 · 1×
github.com/felixge/httpsnoopv1.1.0 · 1×
github.com/go-logr/logrv1.4.3 · 1×
github.com/go-logr/stdrv1.2.2 · 1×

For agents

$ claude mcp add service \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact