webman-best-practices

MUST be used for Webman framework projects. Covers DDD architecture with controller/service/domain/infrastructure layers, strict dependency rules, lowercase directory naming, PER Coding Style with declare(strict_types=1) and final classes. Use when building Webman applications, implementing domain-driven design, or working with service layer patterns.

kitephp/webman-design-skills60 installsMITSynced Aug 26

Works with

Claude CodeCursorCodex CLIGitHub CopilotGemini CLI
---
name: webman-best-practices
description: MUST be used for Webman framework projects. Covers DDD architecture with controller/service/domain/infrastructure layers, strict dependency rules, lowercase directory naming, PER Coding Style with declare(strict_types=1) and final classes. Use when building Webman applications, implementing domain-driven design, or working with service layer patterns.
license: MIT
---

Webman framework best practices following DDD architecture, dependency rules, and PER Coding Style.

## Architecture & Dependencies

- Controller directly depends on Model, skipping Service layer → See [controller-skip-service](references/architecture/controller-skip-service.md)
- Domain layer depends on framework classes (Request, DB, etc.) → See [domain-framework-dependency](references/architecture/domain-framework-dependency.md)
- Service layer has circular dependencies with another Service → See [service-circular-dependency](references/architecture/service-circular-dependency.md)
- Infrastructure layer not implementing Contract interface → See [infrastructure-without-contract](references/architecture/infrastructure-without-contract.md)
- Using Model directly in Service instead of Repository → See [service-direct-model-access](references/architecture/service-direct-model-access.md)

## Naming Conventions

- Using camelCase or PascalCase for directories → See [directory-lowercase](references/naming/directory-lowercase.md)
- Interface without Interface suffix → See [interface-naming](references/naming/interface-naming.md)
- Service not following VerbNounService pattern → See [service-naming-pattern](references/naming/service-naming-pattern.md)
- Repository implementation without descriptive prefix → See [repository-implementation-naming](references/naming/repository-implementation-naming.md)
- Namespace not matching directory structure → See [namespace-directory-mismatch](references/naming/namespace-directory-mismatch.md)

## Code Style (PER Coding Style)

- Missing declare(strict_types=1) at file start → See [strict-types-declaration](references/code-style/strict-types-declaration.md)
- Not using final class by default → See [prefer-final-classes](references/code-style/prefer-final-classes.md)
- Not using readonly for immutable properties → See [readonly-properties](references/code-style/readonly-properties.md)
- Missing type declarations for parameters or return types → See [complete-type-declarations](references/code-style/complete-type-declarations.md)
- Not using constructor property promotion → See [constructor-property-promotion](references/code-style/constructor-property-promotion.md)

## Domain Patterns

- Entity without unique identity → See [entity-identity](references/domain/entity-identity.md)
- Value object that is mutable → See [value-object-immutability](references/domain/value-object-immutability.md)
- Business logic in Service instead of Domain → See [business-logic-in-domain](references/domain/business-logic-in-domain.md)
- Not using domain events for side effects → See [domain-events](references/domain/domain-events.md)
- Anemic domain model with only getters/setters → See [rich-domain-model](references/domain/rich-domain-model.md)

## Dependency Injection

- Using static methods instead of dependency injection → See [avoid-static-methods](references/architecture/avoid-static-methods.md)
- Not using constructor injection → See [constructor-injection](references/architecture/constructor-injection.md)
- Service locator pattern instead of dependency injection → See [no-service-locator](references/architecture/no-service-locator.md)

More DevOps & Infrastructure skills

← All DevOps & Infrastructure skills

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY