Skip to content

refactor: reorganize backend with Wire injection - #2

Merged
fuchencong merged 1 commit into
mainfrom
refactor-layered-wire
Aug 6, 2026
Merged

refactor: reorganize backend with Wire injection#2
fuchencong merged 1 commit into
mainfrom
refactor-layered-wire

Conversation

@fuchencong

Copy link
Copy Markdown
Owner

Summary

  • reorganize the backend into app, conf, server, service, biz, data, and worker layers
  • assemble server, worker, and migrator processes with Wire provider sets
  • adopt functional options for process and component configuration
  • isolate PostgreSQL, Gin, Viper, Hatchet, and SCC dependencies at their adapter boundaries
  • update sqlc generation, CI, release, Docker, Makefile, and architecture documentation
  • add architecture, OpenAPI, CLI, workflow payload, and option contract tests to prevent regressions

Compatibility

Existing CLI commands, HTTP/OpenAPI routes, workflow names and payloads, configuration behavior, metrics, and data migrations are preserved. Database driver errors are translated at the data boundary so HTTP and worker retry semantics remain stable.

Validation

  • make generate
  • make test vet build
  • go test -race ./...
  • make integration-test against PostgreSQL 17
  • make lint (0 issues)
  • make frontend-i18n frontend-lint frontend-build
  • production ldflags CLI build plus version and --help smoke tests
  • go mod tidy
  • git diff --check
  • Wire generated-output diff and legacy import-path audit

Adopt layered app, server, service, biz, data, and worker packages. Add Wire provider sets and functional options, preserve external contracts, and enforce dependency direction with architecture tests.
@fuchencong
fuchencong merged commit 2ec4094 into main Aug 6, 2026
5 checks passed
fuchencong added a commit that referenced this pull request Aug 6, 2026
refactor: reorganize backend with Wire injection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant