architecture

Golang Architecture Standards

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "architecture" with this command: npx skills add mte90/dotfiles/mte90-dotfiles-architecture

Golang Architecture Standards

Priority: P0 (CRITICAL)

Principles

  • Clean Architecture: Separate concerns. Inner layers (Domain) rely on nothing. Outer layers (Adapters) rely on Inner.

  • Project Layout: Follow standard Go project layout (cmd , internal , pkg ).

  • Dependency Injection: Explicitly pass dependencies via constructors. Avoid global singletons.

  • Package Oriented Design: Organize by feature/domain, not by layer (avoid controllers/ , services/ at root).

  • Interface Segregation: Define interfaces where they are used (Consumer implementation).

Standard Project Layout

See Standard Project Layout for directory tree.

Layer Rules

  • Domain: Inner-most. No deps.

  • UseCase: Depends on Domain.

  • Adapter: Outer-most. Depends on UseCase/Domain.

Guidelines

  • Use Constructors: NewService(repo Repository) *Service .

  • Inversion of Control: Service depends on Repository interface, not SQLRepository struct.

  • Wire up in Main: Main function composes the dependency graph.

References

  • Standard Project Layout

  • Clean Architecture Layers

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

testing

No summary provided by upstream source.

Repository SourceNeeds Review
General

Teamgram Server Architecture

Teamgram Server architecture guide for building Telegram-compatible backends. Use when designing service topology, implementing MTProto services, or self-hos...

Registry SourceRecently Updated
370Profile unavailable
General

Architect Mentor

架构师思维训练。通过引导式问答教你从 PRD 到架构设计的思考过程。不是帮你做架构,而是教你怎么想。触发词:'教我架构'、'怎么做架构'、'architect mentor'、'/architect-mentor

Registry SourceRecently Updated
1540Profile unavailable
General

flutter-architecture

Flutter 四层组件化 + MVVM 项目架构规范。适用于 Flutter 项目开发、新模块创建、目录结构设计、代码评审、架构对齐。支持在项目中直接创建/搭建整套 MVVM+组件化目录结构。

Registry SourceRecently Updated
1510Profile unavailable