iCoinic Tracker X Crypto Portfolio Tracker
デベロッパー
公開チャット
製品詳細
Description
iCoinic Tracker X is a crypto portfolio tracker built with CoinMarketCap and empowered with web3swift package.
This app depends on public rpc nodes that are provided by Pocket supporting ether based blockchain networks.
This app provides basic functionalities to track cryptocurrencies and convert crypto prices to/ from fiat currencies at market prices as provided by CoinMarketCap api endpoints.
This app utilizes basic web3 functionalities to add existing ether based wallets to core data and gets current balances of accounts/ cryptocurrencies added for each wallet.
Design Details
Data structure is divided into:
- User Defaults to save parameters that are essential to run this app, and
- Core Data to store sensitive data like supported networks and wallets details.
Views architecture consists of one parent view (ContentView) container of all child views:
- Exchange/ Converter View
- Favorites View
- Accounts View
Main View is managed by a view model with the assistance of service classes that are responsible for:
- listening to available connectivity to public internet
- providing methods to fetch data from api endpoints
- making available web3 services as provided by web3swift package
Architecture
App architecture is composed of:
- Core Components (Models, Views and View Model)
- Peripheral Components (Services, Utilities, UI Components and Extensions)
Core Components
Core Components make up the app skeleton:
Models
Data models:
- Core Data:
- Wallet Entity
- Network Entity
- User Defaults:
- Favorites
- Portfolio Data
- API Data Maps:
- Coin Map: api coin map -> coin model of local type
- Fiat Map: api fiat map -> fiat currency model of local type
- Platform Map: api platform map -> platform map of local type
- Ticker Map: api quote latest -> ticker model of local type
- api response model
- Local Data Models:
- Wallet Model: Wallet Entity (core data) -> Wallet Entity Data Model (representative of wallet entity) -> Wallet Model
- Network Model: Network Entity (core data) -> Network Entity Data Model (representative of wallet entity) -> Network Model
- Portfolio Model: Portfolio Data
Views
Interface flow architecture:
- Exchange: provides interface to converter screen and functionalities for converting assets prices. This screen is empowered with add and remove functionalities of coins/ tokens that are supported by api service provider.
- Favorites: provides interface to favorites screen and functionalities to track selected coins/ tokens. This screen is also empowered with add and remove functionalities of coins/ tokens that are supported by api service provider.
- Accounts: provides interface to access wallet details like balances in crypto units and fiat currency. This screen is empowered with web3swift package capabilities to access blockchain rpc node and get requested information.
View Model
View Model is data repository and view manager that is responsible to make local data available to parent view (ContentView), cascade data to children views and make all methods available to user.
Other Components
Other Components manage data flow and style.
Services
API Service class is responsible to manage url session calls with api endpoints to fetch data. API methods are built utilizing Apple Combine framework and async-await for structured concurrency.
Utilities
- End Point - URL Builder uses url components and query parameters to build a callable url session link.
- Network Manager - Network Engine is responsible to establish url session to download data from api endpoint.
- Modifiers - Used to format data display on screens with several levels including Header, Body and Footer. In addition to component background styling: frame with focus and frame with background. As well as indicator.
UI Components
- Element Text Field - used to modify wallet label on screen and saves changes.
- Tab Bar View - custom tab bar view.
- Action Button - custom button for basic actions.
- Async Image View - custom view of logo images.
- NavigationBar - custom navigation bar.
- Scroll Up Button - custom action button to scroll to top of active screen.
- Search Bar - custom search bar.
- Sorting Label and Symbols - custom sorting button.
- Swipe Action Row - customer swipe action.
Extensions
- Sequence - provides custom sequence functionality using keyPath and direction indicator.
- Color Extension - provides theme colors.
- Double Extension - provides custom formatted number presentation.
- Bundle: provides generic decoding method of json file.
- CGFloat: provides standard sizing.
Database
Local database uses Core Data, which is composed of:
- Wallet Model represented by Wallet Entity.
- Network Model represented by Network Entity.
Those two core data entities are accessed through two separate structures (Wallet Entity Data Model and Network Entity Data Model) that work as middle-man between structures of local data and entities of core data.
Combine framework and async-await are used to maintain proper synchronization while adding data to or deleting data from core data.
Features
- Built entirely in SwiftUI
- Supports iOS 16.1 and above
- MVVM Architecture
- Combine Framework
- Async-await for structured concurrency
- Custom UI Components
- Generic/ Reusable Components
- User defaults capability
- Core Data
- Responsive UI
External Sources
The app relies on 3 external sources:
- CoinMarketCap api endpoints for fetching data (https://coinmarketcap.com/api/).
- web3swift package for communicating with blockchain rpc nodes (https://swiftpackageindex.com/web3swift-team/web3swift).
- Pocket Network (TCP/IP of Web3 node infrastructure) – a multi-chain relay protocol that incentivizes RPC nodes to provide DApps and their users with unstoppable Web3 access (https://docs.pokt.network/).
Deployment
Requirements
- XCode 14.1
- iOS 16.1 simulator or device
- API Key from CoinMarketCap
Installation
Xcode
- Unpack the source code zip file inside developer folder.
- Use Xcode to open project file - (File -> Open) and navigate to Xcode project name iCoinicTrackerX.
- Update the Signing and Capabilities of this project target in Xcode to create a new bundle identifier.
- web3swift should be installed automatically.
- Once the API Key from CoinMarketCap is ready:
- create a plist file and name it APIKey-Info.plist
- insert the api key in the value field of a new record with property name “API_KEY_CMC”
CoinMarketCap
Visit CoinMarketCap api page (https://coinmarketcap.com/api/) and navigate to get an API Key.
Built entirely in SwiftUISupports iOS 16.1 and above
MVVM Architecture
Combine Framework
Async-await for structured concurrency
Custom UI Components
Generic/ Reusable Components
User defaults capability
Core Data
Responsive UI
ファイルツリー
-
📁 iCoinic Tracker X Crypto Portfolio Tracker