LogoSkills

feature-mypage

mypage feature brick - my page functionality (profile/inquiry focused). Generate Clean Architecture feature module with mason make feature-mypage.

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#

VariableTypeDefaultDescription
project_namestring-Project name (snake_case)
org_namestring-Organization name
org_tldstringcomTop-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