CoinVue is a Swift & SwiftUI application that allows users to track cryptocurrency prices and trends. It leverages the MVVM architecture, Combine framework, Core Data for data persistence, and the CoinGecko API for real-time cryptocurrency data.
-
CoinGecko API Integration: Utilizes CoinGecko API to fetch real-time data on various cryptocurrencies.
-
Dynamic Coin List: Displays a scrollable list of cryptocurrencies and implements filtering options for users to easily find specific coins.
-
Marketplace Information: Provides essential marketplace data, including 24-hour volume and market capitalization for each cryptocurrency.
-
Portfolio Management: Allows users to add and track their cryptocurrency holdings and calculates and displays the real-time value of the user's portfolio based on current market data.
-
Coin Details: Enables users to click on a specific coin to view detailed information and displays a price chart illustrating the coin's performance over the past week.
The CoinVue app is designed following the MVVM (Model-View-ViewModel) architecture, promoting a clear separation of concerns and maintainability. The structure is organized into three main components:
-
Model: Represents the data and business logic. In this app, it includes the data models for cryptocurrencies and portfolio holdings.
-
View: Displays the user interface, ensuring a responsive and visually appealing design. SwiftUI is utilized for building the UI components.
-
ViewModel: Acts as an intermediary between the Model and View. It handles data transformation and manipulation, as well as communication with the backend through Combine publishers.
Combine framework is extensively used for handling asynchronous operations and managing data flow within the app. Publishers and subscribers are employed to establish a reactive data flow, ensuring real-time updates and efficient handling of API responses. For example:
-
API calls are wrapped in Combine publishers, allowing seamless integration with the CoinGecko API.
-
Data updates trigger subscribers, ensuring UI components reflect the latest information.
CoreData is employed for efficient data persistence, enabling users to store and manage their cryptocurrency portfolios. The app uses CoreData entities to represent the different data models and ensures a robust and scalable solution for storing user-related information locally.
To enhance app performance and responsiveness, multi-threading techniques are implemented. Key tasks, such as API calls and data processing, are offloaded to background threads, preventing UI freezes and ensuring a smooth user experience.
The combination of MVVM architecture, Combine framework, CoreData for data persistence, and multi-threading practices results in a well-organized, reactive, and performant solution. CoinVue offers a user-friendly experience for tracking cryptocurrency data, managing portfolios, and staying updated with real-time market information.
- Xcode: The integrated development environment for building iOS applications.
- Swift: The programming language used for building native iOS applications.
- SwiftUI: A modern UI framework for building user interfaces across all Apple platforms.
- SF Symbols: Apple's iconography system for scalable and customizable symbols.
Before running the application, ensure you have Xcode installed and follow the steps below:
-
Clone the repository to your local machine:
git clone https://github.com/jurmadani/CoinVue.git
-
Open the Xcode project file:
cd CoinVue open CoinVue.xcodeproj
Simulator.Screen.Recording.-.Iphone.-.2024-01-06.at.20.05.29.mp4
-
Understanding Project Requirements: Conducted a thorough analysis of project requirements, focusing on key features and functionalities for the SwiftUI Coin Vue application.
-
Evaluation of Technologies: Explored and assessed technologies and frameworks suitable for SwiftUI, Swift, and SF Symbols to ensure optimal cross-platform compatibility, performance, and an enhanced developer experience.
-
Development Environment Setup: Configured the development environment, leveraging Xcode as the primary IDE for SwiftUI and Swift development. Ensured the inclusion of essential tools, libraries, and dependencies.
-
Modular Architecture Design: Implemented a modular architecture pattern to enhance code organization and maintainability. Utilized small, reusable components to facilitate separation of concerns and enable efficient testing.
-
Git for Collaboration: Employed Git for collaborative development, effective code management, and tracking changes. Utilized version control to streamline collaboration among project contributors.
This approach ensured a structured development process, leveraging SwiftUI and Swift to create a visually appealing Coin Vue with a focus on modularity, maintainability, and collaboration.
Whether you use this project, have learned something from it, or just like it, please consider supporting it by buying me a coffee, so I can dedicate more time on building open-source projects like this :)
The Coin Vue is open-source and released under the GNU General Public License
For any inquiries or questions regarding the Coin Vue application, please contact me at [email protected]