Integrations Detail (All Active Simultaneously)¶
Integrations differ from ports: all implementations are loaded at startup and routed to based on user/project configuration. A customer signs up via Google SSO but deploys from GitHub — SSO provider and Git provider are independent.
Git Provider Interface:
GitProvider interface · internal/integration/git.go
type GitProvider interface {
InstallWebhook(ctx context.Context, repo RepoRef) error
RemoveWebhook(ctx context.Context, repo RepoRef) error
GetCommit(ctx context.Context, repo RepoRef, sha string) (*Commit, error)
ListBranches(ctx context.Context, repo RepoRef) ([]Branch, error)
CloneSource(ctx context.Context, repo RepoRef, sha string) (io.Reader, error)
}
SSO Provider Interface:
SSOProvider interface · internal/integration/sso.go
type SSOProvider interface {
AuthURL(state string) string
ExchangeCode(ctx context.Context, code string) (*UserInfo, error)
RefreshToken(ctx context.Context, token string) (*UserInfo, error)
}
| Integration | Adapters | SSO | Git |
|---|---|---|---|
| GitHub | integration/github/ | Yes | Yes |
| GitLab | integration/gitlab/ | Yes | Yes |
| Bitbucket | integration/bitbucket/ | Yes | Yes |
| integration/google/ | Yes | No |
Wiring:
Git provider routing · cmd/api/main.go
gitProviders := map[string]GitProvider{
"github": github.NewGitProvider(githubCreds),
"gitlab": gitlab.NewGitProvider(gitlabCreds),
"bitbucket": bitbucket.NewGitProvider(bitbucketCreds),
}
// When a webhook arrives or deploy triggers:
provider := gitProviders[project.GitProvider]
provider.CloneSource(ctx, repo, sha)
In MVP
GitHub only (both SSO and Git). Interfaces exist for the rest.
Cross-references
Ports (the one-active-per-region pattern) → §10 · where integration adapters live → §9 · GitHub App webhook handling, dedup, and debounce → Starforge §16.11 · SSO at MVP is dashboard login only — distinct from the deferred customer auth primitive.