Backend 통합#
모든 feature 브릭은 Serverpod backend 모듈을 포함합니다.
자동 생성 구조#
backend/{project}_server/lib/src/feature/{feature_name}/
├── endpoint/
│ ├── {feature}_endpoint.dart # CRUD 엔드포인트
│ └── {feature}_console_endpoint.dart # 어드민 엔드포인트
├── service/
│ └── {feature}_service.dart # 비즈니스 로직
├── model/
│ ├── entities/
│ │ ├── {primary_entity}.spy.yaml # 주요 Entity
│ │ └── {secondary_entity}.spy.yaml # 보조 Entity
│ ├── dto/
│ │ ├── {entity}_create_request.spy.yaml
│ │ └── paginated_{entity}_result.spy.yaml
│ └── enum/
│ └── {entity}_status.spy.yaml
├── exception/
│ └── {feature}_exceptions.dart # Sealed 예외 계층
├── validation/
│ └── {feature}_validator.dart # 입력 검증
└── test/
├── integration/ # 엔드포인트 통합 테스트
└── unit/ # 검증 단위 테스트
Backend 포함/제외#
# Backend 포함 (기본)
bricksmith apply --feature community
# Backend 제외
bricksmith apply --feature community --no-backend
Entity 커스터마이징#
bricksmith apply --feature community \
--primary-entity Article \
--secondary-entity Reply
생성되는 파일:
article.spy.yaml(Post 대신)reply.spy.yaml(Comment 대신)ArticleEndpoint(PostEndpoint 대신)