Certainly! Below is the reformatted Read.me file for your app using Markdown and English language, aligning with the Clean Architecture principles in Swift.
This project adopts Clean Architecture to enhance the maintainability, scalability, and testability of the code. The architecture is divided into several layers:
Contains the essential elements of the business logic:
AppState
: Manages the global state of the app, such as the currently selected tab and navigation state.UserState
: Manages user status, including whether the user is logged in, their token, and user permissions.FabState
: Manages Fab information, including the list of Fabs, the currently selected Fab, the current system, and the system features list of each Fab.
Contains specific business rules:
UserInteractor
: Responsible for handling user-related actions from the view and retrieving data through theUserRepository
to update theUserState
.FabInteractor
: Responsible for handling Fab-related actions from the view and retrieving data through theFabRepository
to update theFabState
.
Transforms data from the format most convenient for use cases and entities to the format most convenient for frameworks and drivers:
UserRepository
: Manages user data access, with functions including login, logout, and uploading user behavior data.FabRepository
: Manages access to Fab data, with functions including retrieving a list of Fabs and the system features of specific Fabs.
Includes data storage, UI frameworks, and API interfaces:
Network Service
: Provides encapsulated API network services for use across the application, decoupled from specific business logic.
- Ensure the latest version of Xcode and the corresponding SwiftUI framework are installed before development.
- Code and tests should be written and reviewed according to Swift language and SwiftUI best practices.
- Use Git for version control and regularly commit to the main branch to keep the code synchronized.
- Each class and function should have corresponding unit tests to ensure code quality and correctness.
- Utilize the XCTest framework for testing purposes.
This Markdown-formatted Read.me offers a structured and readable overview of your project’s architecture and guidelines.