Skip to content

refactor(app): migrate App module from MVVM to VIPER - #165

Open
obadasemary wants to merge 2 commits into
VIPERfrom
claude/add-mvvm-templates-Ibzoz
Open

refactor(app): migrate App module from MVVM to VIPER#165
obadasemary wants to merge 2 commits into
VIPERfrom
claude/add-mvvm-templates-Ibzoz

Conversation

@obadasemary

Copy link
Copy Markdown
Owner

Rename AppViewModel → AppPresenter and AppViewUseCase → AppViewInteractor.

Changes:

  • Rename AppViewUseCase.swift → AppViewInteractor.swift
  • Rename AppViewModel.swift → AppPresenter.swift
  • Update AppView.swift to use presenter
  • Update AppBuilder.swift with new naming
  • Update CoreBuilder.swift with new parameter names

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

Replace MVVMTemplate.xctemplate with VIPERTemplate.xctemplate to match
the current VIPER architecture (View, Presenter, Interactor, Builder,
Router). Update all supporting scripts and documentation accordingly.

https://claude.ai/code/session_016bf7de74pkt42jFSvqnsHX
Keep both templates available side by side. Update install-template.sh
to install both templates and update README to document both options.

https://claude.ai/code/session_016bf7de74pkt42jFSvqnsHX
@obadasemary
obadasemary changed the base branch from main to VIPER February 16, 2026 19:04
@claude

claude Bot commented Feb 16, 2026

Copy link
Copy Markdown

Pull Request Review: VIPER Template Migration

Summary

This PR introduces a new VIPERTemplate for Xcode alongside the existing MVVMTemplate. The changes are primarily documentation and tooling updates - no actual application code is modified. The PR title mentions "migrate App module from MVVM to VIPER" but the actual changes only add the VIPER template without migrating any existing code.

Positive Aspects ✅

  1. Well-structured template files: The new VIPER template follows clean architecture principles with clear separation of concerns (View, Presenter, Interactor, Builder, Router)
  2. Consistent with existing patterns: Uses @Observable, @MainActor, protocol-based design, and dependency injection via DependencyContainer
  3. Good documentation updates: Updated QUICK_REFERENCE.md, TEMPLATE_SETUP.md, and README.md to reflect both templates
  4. Backward compatibility: Keeps the existing MVVMTemplate alongside the new VIPERTemplate
  5. Updated tooling: Scripts (create-feature.sh, install-template.sh, verify-architecture.sh) now support both templates

Issues & Concerns 🔴

1. Misleading PR Title (High Priority)

Issue: The PR title says "migrate App module from MVVM to VIPER" but no application code in AIChat/ directory is actually changed.

Impact: This creates confusion about what the PR accomplishes. The title suggests a code refactoring, but this PR only adds templates and documentation.

Recommendation: Update the PR title to accurately reflect the changes:

feat(tooling): add VIPER Xcode template alongside existing MVVM template

2. Critical Bug in Builder Template (High Priority)

File: XcodeTemplate/VIPERTemplate.xctemplate/___FILEBASENAME___Builder.swift:814

Issue: Parameter name inconsistency that will cause compilation errors:

func build___VARIABLE_productName:identifier___View(router: Router) -> some View {
    ___VARIABLE_productName:identifier___View(
        presenter: ___VARIABLE_productName:identifier___Presenter(
            ___VARIABLE_camelCasedProductName:identifier___Interactor: ___VARIABLE_productName:identifier___Interactor(container: container),
            //^^^ Parameter label uses camelCase
            router: ___VARIABLE_productName:identifier___Router(router: router)
        )
    )
}

But in the Presenter template (line 874-878), the init parameter is:

init(
    ___VARIABLE_camelCasedProductName:identifier___Interactor: ___VARIABLE_productName:identifier___InteractorProtocol,
    //^^^ This will expand to e.g., "notificationsInteractor"
    router: ___VARIABLE_productName:identifier___RouterProtocol
)

Why this is a problem: When the template generates code for a feature like "Notifications", the Builder will pass:

NotificationsPresenter(
    notificationsInteractor: NotificationsInteractor(container: container),
    router: NotificationsRouter(router: router)
)

But the Presenter expects the parameter to be named with a lowercase first letter (e.g., notificationsInteractor), which is correct. However, the inconsistent naming could cause confusion.

Actually, upon closer inspection: This appears to be intentional and should work correctly. The parameter label in the Presenter init uses the camelCase version, which matches the Builder call. This is actually not a bug - my apologies for the initial concern.

3. Missing Return Keyword (Low Priority - Style)

File: XcodeTemplate/VIPERTemplate.xctemplate/___FILEBASENAME___Presenter.swift:901

Issue: Unnecessary explicit return nil in computed property:

var parameters: [String: Any]? {
    return nil  // <- explicit return is unnecessary
}

Recommendation: Remove explicit return for single-expression computed properties:

var parameters: [String: Any]? {
    nil
}

This follows modern Swift style guidelines and SwiftLint conventions.

4. Incomplete Documentation (Medium Priority)

Issue: The PR description mentions renaming AppViewModel → AppPresenter and AppViewUseCase → AppViewInteractor, but these files are not changed in this PR.

Recommendation: Either:

  • Update the PR description to match the actual changes, OR
  • Include the actual App module migration in this PR

5. Missing Tests (Medium Priority)

Issue: No tests verify that the new VIPER template generates valid, compilable code.

Recommendation: Add integration tests that:

  1. Generate a feature using the VIPER template
  2. Verify all 5 files are created
  3. Attempt to compile the generated code
  4. Clean up test artifacts

6. Template Consistency Issue (Low Priority)

File: XcodeTemplate/VIPERTemplate.xctemplate/___FILEBASENAME___Presenter.swift:869

Issue: Presenter class uses class instead of final class:

class ___VARIABLE_productName:identifier___Presenter {

But the Interactor uses final class:

final class ___VARIABLE_productName:identifier___Interactor {

Recommendation: Use final class for both unless inheritance is intended. This improves performance and makes intent clear.

Code Quality Assessment

Strengths:

  • ✅ No force unwrapping (!)
  • ✅ No force try (try!)
  • ✅ Proper use of @MainActor for UI-related code
  • ✅ Protocol-based design for testability
  • ✅ Dependency injection via DependencyContainer
  • ✅ Follows existing project conventions
  • ✅ Analytics integration included

Areas for Improvement:

  • Remove explicit return in single-expression computed properties
  • Make Presenter final class for consistency
  • Add template validation tests

Security Assessment

✅ No security concerns. The changes are limited to templates and documentation.

Performance Considerations

✅ No performance impact. Templates only affect new code generation, not runtime behavior.

Test Coverage

⚠️ Missing: No tests for the new VIPER template functionality.

Recommendation: Add test coverage for:

  • Template file generation
  • Generated code compilation
  • verify-architecture.sh script with VIPER features

Recommendations

Must Fix Before Merge:

  1. Fix the Builder parameter naming bug (False alarm - actually correct)
  2. Update PR title and description to accurately reflect changes
  3. Decide if this PR should include actual App module migration or just template addition

Should Fix:

  1. Make Presenter use final class for consistency
  2. Remove explicit return nil in Presenter template
  3. Add template generation tests

Nice to Have:

  1. Add example output showing what a generated VIPER feature looks like
  2. Update CLAUDE.md to mention both MVVM and VIPER templates

Conclusion

This is a solid addition of VIPER template tooling to the project. The templates follow best practices and integrate well with the existing architecture. However, the PR title and description are misleading - they suggest actual code migration that hasn't occurred.

Recommendation:

  • If this PR is meant to only add the template: Update title/description and merge after addressing the Presenter final class issue
  • If this PR is meant to migrate App module: Add the actual code changes to AIChat/App/ directory

Overall Quality: Good ⭐⭐⭐⭐ (4/5)

  • Deducting one star for misleading PR metadata and missing tests

Review by Claude Sonnet 4.5

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @obadasemary, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request undertakes a significant architectural refactor, transitioning the application's core modules from MVVM to VIPER. This change aims to enhance the modularity, maintainability, and testability of the codebase by enforcing a stricter separation of responsibilities between presentation logic, business logic, and data handling. The refactor involved systematic renaming of components and updating their interactions across the entire application, including core features, builders, and test suites.

Highlights

  • Architectural Migration: Migrated the entire application from the MVVM (Model-View-ViewModel) architectural pattern to VIPER (View-Interactor-Presenter-Entity-Router) for improved separation of concerns and testability.
  • Component Renaming: Renamed all ViewModel classes to Presenter and UseCase classes to Interactor across all feature modules (e.g., AppViewModel -> AppPresenter, AboutUseCase -> AboutInteractor).
  • Dependency Updates: Updated all Builder classes and View structs to instantiate and interact with the newly named Presenter and Interactor components, ensuring proper dependency injection and data flow.
  • Project Configuration & Documentation: Updated Xcode project files (project.pbxproj), documentation (CLAUDE.md, QUICK_REFERENCE.md, README.md, TEMPLATE_SETUP.md), and test files to reflect the new VIPER terminology and structure.
  • New VIPER Template: Introduced a new Xcode template (VIPERTemplate.xctemplate) and updated the create-feature.sh and install-template.sh scripts to support generating new features using the VIPER pattern.
Changelog
  • AIChat.xcodeproj/project.pbxproj
    • Updated project references to reflect renamed files and new Interactor/Presenter components.
  • AIChat/Core/About/AboutBuilder.swift
    • Updated to instantiate AboutPresenter with AboutInteractor.
  • AIChat/Core/About/AboutUseCase.swift
    • Renamed to AboutInteractor.swift and updated internal protocol and class names.
  • AIChat/Core/About/AboutView.swift
    • Updated to use presenter instead of viewModel for data binding and actions.
  • AIChat/Core/About/AboutViewModel.swift
    • Renamed to AboutPresenter.swift and updated internal class name and property references.
  • AIChat/Core/AppView/AppBuilder.swift
    • Updated to instantiate AppPresenter with AppViewInteractor.
  • AIChat/Core/AppView/AppView.swift
    • Updated to use presenter instead of viewModel for data binding and actions.
  • AIChat/Core/AppView/AppViewModel.swift
    • Renamed to AppPresenter.swift and updated internal class name and property references.
  • AIChat/Core/AppView/AppViewUseCase.swift
    • Renamed to AppViewInteractor.swift and updated internal protocol and class names.
  • AIChat/Core/Bookmarks/BookmarksBuilder.swift
    • Updated to instantiate BookmarksPresenter with BookmarksInteractor.
  • AIChat/Core/Bookmarks/BookmarksUseCase.swift
    • Renamed to BookmarksInteractor.swift and updated internal protocol and class names.
  • AIChat/Core/Bookmarks/BookmarksView.swift
    • Updated to use presenter instead of viewModel for data binding and actions.
  • AIChat/Core/Bookmarks/BookmarksViewModel.swift
    • Renamed to BookmarksPresenter.swift and updated internal class name and property references.
  • AIChat/Core/CategoryList/CategoryListBuilder.swift
    • Updated to instantiate CategoryListPresenter with CategoryListInteractor.
  • AIChat/Core/CategoryList/CategoryListUseCase.swift
    • Renamed to CategoryListInteractor.swift and updated internal protocol and class names.
  • AIChat/Core/CategoryList/CategoryListView.swift
    • Updated to use presenter instead of viewModel for data binding and actions.
  • AIChat/Core/CategoryList/CategoryListViewModel.swift
    • Renamed to CategoryListPresenter.swift and updated internal class name and property references.
  • AIChat/Core/Chat/ChatBuilder.swift
    • Updated architectural pattern comments to reflect VIPER.
    • Updated to instantiate ChatPresenter with ChatInteractor.
  • AIChat/Core/Chat/ChatUseCase.swift
    • Renamed to ChatInteractor.swift and updated internal protocol and class names.
  • AIChat/Core/Chat/ChatView.swift
    • Updated to use presenter instead of viewModel for data binding and actions.
  • AIChat/Core/Chat/ChatViewModel.swift
    • Renamed to ChatPresenter.swift and updated internal class name and property references.
  • AIChat/Core/Chats/ChatRowCell/AnyChatRowCellUseCase.swift
    • Renamed to AnyChatRowCellInteractor.swift and updated internal struct name and protocol conformance.
  • AIChat/Core/Chats/ChatRowCell/ChatRowCellBuilder.swift
    • Updated to instantiate ChatRowCellPresenter with ChatRowCellInteractor.
  • AIChat/Core/Chats/ChatRowCell/ChatRowCellUseCase.swift
    • Renamed to ChatRowCellInteractor.swift and updated internal class name.
  • AIChat/Core/Chats/ChatRowCell/ChatRowCellUseCaseProtocol.swift
    • Renamed to ChatRowCellInteractorProtocol.swift and updated internal protocol name.
  • AIChat/Core/Chats/ChatRowCell/ChatRowCellViewBuilder.swift
    • Updated to use presenter instead of viewModel and AnyChatRowCellInteractor instead of AnyChatRowCellUseCase.
  • AIChat/Core/Chats/ChatRowCell/ChatRowCellViewModel.swift
    • Renamed to ChatRowCellPresenter.swift and updated internal class name and property references.
  • AIChat/Core/Chats/ChatsBuilder.swift
    • Updated to instantiate ChatsPresenter with ChatsInteractor.
  • AIChat/Core/Chats/ChatsUseCase.swift
    • Renamed to ChatsInteractor.swift and updated internal protocol and class names.
  • AIChat/Core/Chats/ChatsView.swift
    • Updated to use presenter instead of viewModel for data binding and actions.
  • AIChat/Core/Chats/ChatsViewModel.swift
    • Renamed to ChatsPresenter.swift and updated internal class name and property references.
  • AIChat/Core/CreateAccount/CreateAccountBuilder.swift
    • Updated to instantiate CreateAccountPresenter with CreateAccountInteractor.
  • AIChat/Core/CreateAccount/CreateAccountUseCase.swift
    • Renamed to CreateAccountInteractor.swift and updated internal protocol and class names.
  • AIChat/Core/CreateAccount/CreateAccountView.swift
    • Updated to use presenter instead of viewModel for data binding and actions.
  • AIChat/Core/CreateAccount/CreateAccountViewModel.swift
    • Renamed to CreateAccountPresenter.swift and updated internal class name and property references.
  • AIChat/Core/CreateAvatar/CreateAvatarBuilder.swift
    • Updated to instantiate CreateAvatarPresenter with CreateAvatarInteractor.
  • AIChat/Core/CreateAvatar/CreateAvatarUseCase.swift
    • Renamed to CreateAvatarInteractor.swift and updated internal protocol and class names.
  • AIChat/Core/CreateAvatar/CreateAvatarView.swift
    • Updated to use presenter instead of viewModel for data binding and actions.
  • AIChat/Core/CreateAvatar/CreateAvatarViewModel.swift
    • Renamed to CreateAvatarPresenter.swift and updated internal class name and property references.
  • AIChat/Core/DevSettings/DevSettingsBuilder.swift
    • Updated to instantiate DevSettingsPresenter with DevSettingsInteractor.
  • AIChat/Core/DevSettings/DevSettingsUseCase.swift
    • Renamed to DevSettingsInteractor.swift and updated internal protocol and class names.
  • AIChat/Core/DevSettings/DevSettingsView.swift
    • Updated to use presenter instead of viewModel for data binding and actions.
  • AIChat/Core/DevSettings/DevSettingsViewModel.swift
    • Renamed to DevSettingsPresenter.swift and updated internal class name and property references.
  • AIChat/Core/Explore/ExploreBuilder.swift
    • Updated to instantiate ExplorePresenter with ExploreInteractor.
  • AIChat/Core/Explore/ExploreInteractor.swift
    • Modified protocol name from ExploreInteractor to ExploreInteractorProtocol.
    • Implemented ExploreInteractorProtocol with concrete dependency resolutions and methods previously found in ExploreUseCase.
  • AIChat/Core/Explore/ExploreUseCase.swift
    • Removed as its functionality was merged into ExploreInteractor.
  • AIChat/Core/Explore/ExploreView.swift
    • Updated to use presenter instead of viewModel for data binding and actions.
  • AIChat/Core/Explore/ExploreViewModel.swift
    • Renamed to ExplorePresenter.swift and updated internal class name and property references.
  • AIChat/Core/NewsDetails/NewsDetailsBuilder.swift
    • Updated to instantiate NewsDetailsPresenter with NewsDetailsInteractor.
  • AIChat/Core/NewsDetails/NewsDetailsUseCase.swift
    • Renamed to NewsDetailsInteractor.swift and updated internal protocol and class names.
  • AIChat/Core/NewsDetails/NewsDetailsView.swift
    • Updated to use presenter instead of viewModel for data binding and actions.
  • AIChat/Core/NewsDetails/NewsDetailsViewModel.swift
    • Renamed to NewsDetailsPresenter.swift and updated internal class name and property references.
  • AIChat/Core/NewsFeed/NewsFeedBuilder.swift
    • Updated architectural pattern comments to reflect VIPER.
    • Updated to instantiate NewsFeedPresenter with NewsFeedInteractor.
  • AIChat/Core/NewsFeed/NewsFeedUseCase.swift
    • Renamed to NewsFeedInteractor.swift and updated internal protocol and class names.
  • AIChat/Core/NewsFeed/NewsFeedView.swift
    • Updated to use presenter instead of viewModel for data binding and actions.
  • AIChat/Core/NewsFeed/NewsFeedViewModel.swift
    • Renamed to NewsFeedPresenter.swift and updated internal class name and property references.
  • AIChat/Core/Onboarding/ColorView/OnboardingColorBuilder.swift
    • Updated to instantiate OnboardingColorPresenter with OnboardingColorInteractor.
  • AIChat/Core/Onboarding/ColorView/OnboardingColorUseCase.swift
    • Renamed to OnboardingColorInteractor.swift and updated internal protocol and class names.
  • AIChat/Core/Onboarding/ColorView/OnboardingColorView.swift
    • Updated to use presenter instead of viewModel for data binding and actions.
  • AIChat/Core/Onboarding/ColorView/OnboardingColorViewModel.swift
    • Renamed to OnboardingColorPresenter.swift and updated internal class name and property references.
  • AIChat/Core/Onboarding/CommunityView/OnboardingCommunityBuilder.swift
    • Updated to instantiate OnboardingCommunityPresenter with OnboardingCommunityInteractor.
  • AIChat/Core/Onboarding/CommunityView/OnboardingCommunityInteractor.swift
    • Added new OnboardingCommunityInteractor file.
  • AIChat/Core/Onboarding/CommunityView/OnboardingCommunityUseCase.swift
    • Removed as its functionality was replaced by OnboardingCommunityInteractor.
  • AIChat/Core/Onboarding/CommunityView/OnboardingCommunityView.swift
    • Updated to use presenter instead of viewModel for data binding and actions.
  • AIChat/Core/Onboarding/CommunityView/OnboardingCommunityViewModel.swift
    • Renamed to OnboardingCommunityPresenter.swift and updated internal class name and property references.
  • AIChat/Core/Onboarding/CompletedView/OnboardingCompletedBuilder.swift
    • Updated to instantiate OnboardingCompletedPresenter with OnboardingCompletedInteractor.
  • AIChat/Core/Onboarding/CompletedView/OnboardingCompletedUseCase.swift
    • Renamed to OnboardingCompletedInteractor.swift and updated internal protocol and class names.
  • AIChat/Core/Onboarding/CompletedView/OnboardingCompletedView.swift
    • Updated to use presenter instead of viewModel for data binding and actions.
  • AIChat/Core/Onboarding/CompletedView/OnboardingCompletedViewModel.swift
    • Renamed to OnboardingCompletedPresenter.swift and updated internal class name and property references.
  • AIChat/Core/Onboarding/IntroView/OnboardingIntroBuilder.swift
    • Updated to instantiate OnboardingIntroPresenter with OnboardingIntroInteractor.
  • AIChat/Core/Onboarding/IntroView/OnboardingIntroUseCase.swift
    • Renamed to OnboardingIntroInteractor.swift and updated internal protocol and class names.
  • AIChat/Core/Onboarding/IntroView/OnboardingIntroView.swift
    • Updated to use presenter instead of viewModel for data binding and actions.
  • AIChat/Core/Onboarding/IntroView/OnboardingIntroViewModel.swift
    • Renamed to OnboardingIntroPresenter.swift and updated internal class name and property references.
  • AIChat/Core/Paywall/PaywallBuilder.swift
    • Updated to instantiate PaywallPresenter with PaywallInteractor.
  • AIChat/Core/Paywall/PaywallConfiguration.swift
    • Updated comments to refer to DevSettingsPresenter instead of DevSettingsViewModel.
  • AIChat/Core/Paywall/PaywallUseCase.swift
    • Renamed to PaywallInteractor.swift and updated internal protocol and class names.
  • AIChat/Core/Paywall/PaywallView.swift
    • Updated to use presenter instead of viewModel for data binding and actions.
  • AIChat/Core/Paywall/PaywallViewModel.swift
    • Renamed to PaywallPresenter.swift and updated internal class name and property references.
  • AIChat/Core/Profile/ProdProfileInteractor.swift
    • Removed as its functionality was merged into ProfileInteractor.
  • AIChat/Core/Profile/ProfileBuilder.swift
    • Updated to instantiate ProfilePresenter with ProfileInteractor.
  • AIChat/Core/Profile/ProfileInteractor.swift
    • Modified protocol name from ProfileInteractor to ProfileInteractorProtocol.
    • Implemented ProfileInteractorProtocol with concrete dependency resolutions and methods previously found in ProfileUseCase.
  • AIChat/Core/Profile/ProfileUseCase.swift
    • Removed as its functionality was merged into ProfileInteractor.
  • AIChat/Core/Profile/ProfileView.swift
    • Updated to use presenter instead of viewModel for data binding and actions.
  • AIChat/Core/Profile/ProfileViewModel.swift
    • Renamed to ProfilePresenter.swift and updated internal class name and property references.
  • AIChat/Core/Settings/SettingsBuilder.swift
    • Updated architectural pattern comments to reflect VIPER.
    • Updated to instantiate SettingsPresenter with SettingsInteractor.
  • AIChat/Core/Settings/SettingsUseCase.swift
    • Renamed to SettingsInteractor.swift and updated internal protocol and class names.
  • AIChat/Core/Settings/SettingsView.swift
    • Updated to use presenter instead of viewModel for data binding and actions.
  • AIChat/Core/Settings/SettingsViewModel.swift
    • Renamed to SettingsPresenter.swift and updated internal class name and property references.
  • AIChat/Core/Welcome/WelcomeBuilder.swift
    • Updated to instantiate WelcomePresenter with WelcomeInteractor.
  • AIChat/Core/Welcome/WelcomeUseCase.swift
    • Renamed to WelcomeInteractor.swift and updated internal protocol and class names.
  • AIChat/Core/Welcome/WelcomeView.swift
    • Updated to use presenter instead of viewModel for data binding and actions.
  • AIChat/Core/Welcome/WelcomeViewModel.swift
    • Renamed to WelcomePresenter.swift and updated internal class name and property references.
  • AIChat/Root/CoreBuilder.swift
    • Updated all feature builder calls to use presenter and interactor naming conventions.
  • AIChatTests/Core/Bookmarks/BookmarksUseCaseTests.swift
    • Renamed to BookmarksInteractorTests.swift and updated internal struct name and class references.
  • AIChatTests/Core/Bookmarks/BookmarksViewModelTests.swift
    • Renamed to BookmarksPresenterTests.swift and updated internal struct name and class references.
  • AIChatTests/Core/NewsFeed/NewsDetailsUseCaseTests.swift
    • Renamed to NewsDetailsInteractorTests.swift and updated internal struct name and class references.
  • AIChatTests/Core/NewsFeed/NewsFeedViewModelTests.swift
    • Renamed to NewsFeedPresenterTests.swift and updated internal struct name and class references.
  • AIChatTests/Core/Profile/AnyProfileInteractor.swift
    • Updated to conform to ProfileInteractorProtocol and removed ProdProfileInteractor initialization.
  • AIChatTests/Core/Profile/MockProfileInteractor.swift
    • Updated to conform to ProfileInteractorProtocol.
  • AIChatTests/Core/Profile/ProfileViewTests.swift
    • Updated test cases to use Presenter and Interactor names.
  • AIChatTests/IntegrationTests/InteractorInitializationTests.swift
    • Added new integration tests for Interactor initialization.
  • AIChatTests/IntegrationTests/UseCaseInitializationTests.swift
    • Removed old integration tests for UseCase initialization.
  • CLAUDE.md
    • Updated architectural overview from MVVM to VIPER.
    • Reflected new file naming conventions (Presenter, Interactor) in examples and guidelines.
  • QUICK_REFERENCE.md
    • Updated template name from MVVM to VIPER.
    • Reflected new file naming conventions (Presenter, Interactor) and architectural cheat sheet.
  • README.md
    • Updated architectural overview from MVVM to VIPER.
  • TEMPLATE_SETUP.md
    • Updated template name from MVVM to VIPER.
    • Reflected new file naming conventions (Presenter, Interactor) and usage examples.
  • XcodeTemplate/README.md
    • Updated to describe both VIPER and MVVM templates.
    • Reflected new file naming conventions for VIPER template.
  • XcodeTemplate/VIPERTemplate.xctemplate/TemplateInfo.plist
    • Added new template information plist for VIPER.
  • XcodeTemplate/VIPERTemplate.xctemplate/___FILEBASENAME___Builder.swift
    • Added new VIPER template file for Builder.
  • XcodeTemplate/VIPERTemplate.xctemplate/___FILEBASENAME___Interactor.swift
    • Added new VIPER template file for Interactor.
  • XcodeTemplate/VIPERTemplate.xctemplate/___FILEBASENAME___Presenter.swift
    • Added new VIPER template file for Presenter.
  • XcodeTemplate/VIPERTemplate.xctemplate/___FILEBASENAME___Router.swift
    • Added new VIPER template file for Router.
  • XcodeTemplate/VIPERTemplate.xctemplate/___FILEBASENAME___View.swift
    • Added new VIPER template file for View.
  • create-feature.sh
    • Modified script to generate files based on the VIPER template.
  • install-template.sh
    • Modified script to install both VIPER and MVVM Xcode templates.
  • verify-architecture.sh
    • Modified script to verify VIPER architectural patterns and file naming conventions.
Activity
  • The pull request was generated using Claude Code.
  • Claude Sonnet 4.5 was a co-author on this pull request.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request is a significant step in migrating the project from MVVM to VIPER. It updates documentation, supporting scripts, and Xcode templates to align with the VIPER architecture. The changes are consistent and well-executed, providing a solid foundation for developing new features using VIPER. While the PR title and description refer to changes in a specific App module which are not present in the diff, the overall changes to tooling and documentation are valuable. I have one suggestion to improve the completeness of a code example in the setup guide.

Comment thread TEMPLATE_SETUP.md
Comment on lines +111 to +129
@Observable
@MainActor
class NotificationsPresenter {
var notifications: [Notification] = []
var isLoading = false

private let notificationsInteractor: NotificationsInteractorProtocol
private let router: NotificationsRouterProtocol

func loadNotifications() async {
isLoading = true
do {
notifications = try await notificationsInteractor.fetchNotifications()
} catch {
notificationsInteractor.trackEvent(event: Event.loadFailed)
}
isLoading = false
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The code example for NotificationsPresenter is a great addition, but it's currently incomplete. It's missing the init method to initialize notificationsInteractor and router, and also the definition for the Event enum that is used in the catch block.

Adding these would make the example self-contained and easier for developers to use as a reference. Since this file is the main setup guide, a complete example would be very beneficial.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3b43294878

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread verify-architecture.sh
Comment on lines +21 to +22
"Presenter.swift"
"Interactor.swift"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Scope VIPER file checks to migrated modules

The verifier now requires Presenter.swift/Interactor.swift for every feature directory, but AIChat/Core/Admin is still MVVM (AdminViewModel.swift + AdminUseCase.swift), so verify-architecture.sh now returns a non-zero exit even on a clean tree. I confirmed this by running the script, which reports Admin as missing files and exits 1, so CI/local architecture checks will fail until legacy modules are excluded or migrated.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants