Generates a Clean Architecture-based feature module for my page (profile/inquiry focused) functionality. Provides comprehensive my page features including user details, profile editing, announcements, 1:1 inquiries (create/list/detail), my classes list, and skill/series lookup.
Quick Start#
mason make feature-mypage \
--project_name my_app \
--org_name myorg \
--feature_name mypage
# Generate with custom entity name
mason make feature-mypage \
--feature_name account \
--primary_entity Account \
--secondary_entity AccountSetting
Variables#
| Variable | Type | Default | Description |
|---|---|---|---|
project_name | string | - | Project name (snake_case) |
org_name | string | - | Organization name |
org_tld | string | com | Top-level domain |
feature_name |
string | mypage | Feature module name (snake_case) |
primary_entity |
string | UserProfile | Primary domain entity name (PascalCase) |
secondary_entity |
string | UserSetting | Secondary domain entity name (PascalCase) |
Generated Structure#
feature/application/{feature_name}/
âââ lib/
â âââ {feature_name}.dart
â âââ src/
â âââ data/ # Repository implementation
â âââ domain/ # Entity, UseCase, Repository Interface
â âââ presentation/ # BLoC, Page, Widget
â âââ route/ # GoRouter TypedRoute
â âââ di/ # Dependency Injection
âââ test/ # Unit, BDD tests
Backend Module#
A Serverpod backend module is generated alongside:
backend/ { { project_name } } _server/lib/src/feature/ { { feature_name } } /
âââ endpoint/ # CRUD endpoints
âââ service/ # Business logic
âââ model/ # Entity, DTO (.spy.yaml)
âââ exception/ # Exception handling
âââ validation/ # Input validation
âââ test/ # Tests
Key Components#
Domain#
- Entities: AnnouncementType, Announcement, InquiryAnswer, InquiryAttachment, InquiryBookInfo, InquiryCategory, InquiryStatus, Inquiry, MyClass, UserDetail
- UseCases: CreateInquiry, DeleteProfileImage, GetAnnouncements, GetInquiries, GetInquiryDetail, GetMyClasses, GetSeriesBySkill, GetSkills, GetUserDetail, UpdateOrgType, UploadProfileImage
- Repository:
IMypageRepository
Presentation#
-
BLoC:
MypageBloc,AnnouncementListBloc,CustomerCenterBloc,EditProfileBloc,InquiryCreateBloc,InquiryDetailBloc,InquiryListBloc - Pages: MypagePage, AnnouncementDetailPage, AnnouncementListPage, CustomerCenterPage, EditProfilePage, InquiryCreatePage, InquiryDetailPage, InquiryListPage
Customization#
Changing the feature_name variable automatically updates all file names, class names, and import paths:
mason make feature-mypage --feature_name profile