Logo Lanfrica

MrazTevin/viral_tweets_ke

Domaine:

digital infrastructure

Type de record:

software
Créateur:
Mra
Hôte:
Viral KE is a mobile app that tracks and visualizes the most viral tweets in Kenya # Viral KE An offline-first Flutter application tracking viral tweets across Kenyan regions using clean architecture, Bloc state management, and efficient caching strategies. ## Getting Started 1. Clone the repository ``` git clone github.com cd viral_tweets_ke ```` 2. Install dependencies ``` flutter pub get ``` 3. Run the application on a connected device or emulator ``` flutter run ``` You can also specifiy a target if you have multiple devices connected ``` flutter run -d ``` To build a release version ``` flutter build apk # For Android flutter build ios # For iOS ``` 4. Troubleshooting > - Ensure your Flutter SDK is upto date ```flutter upgrade``` > - If dependencies fail to resolve run ```flutter clean``` then ```flutter pub get``` ## System Design Overview ``` ┌──────────────────────┐ │ Twitter API v2 │ │ (tweets/search/recent)│ └──────────┬───────────┘ │ JSON Response ▼ ┌──────────────────────┐ │ Data Layer │ │ (Repository Pattern) │ ├──────────────────────┤ │ RemoteDataSource │───► Fetch new tweets by country │ LocalDataSource │───► Hive/SQLite cache read/write └──────────┬───────────┘ │ Clean data models (Freezed) │ ▼ ┌──────────────────────┐ │ Domain Layer │ │ (Use Cases / Logic) │ ├──────────────────────┤ │ GetViralTweets() │── fetches & scores tweets │ SyncTweets() │── handles refresh + cache update │ GetCachedTweets() │── reads offline data └──────────┬───────────┘ │ Business rules (virality scoring, filtering) │ ▼ ┌──────────────────────┐ │ Presentation Layer │ │ (Bloc State Mgmt) │ ├──────────────────────┤ │ ViralBloc (feeds) │── manages state │ Country Bloc │ │ FavoritesBloc │── bookmarks, offline reads └──────────┬───────────┘ │ UI Widgets │ ▼ ┌──────────────────────┐ │ Flutter UI Layer │ ├──────────────────────┤ │ Home Screen │ │ Tweet Feed Screen │── viral tweets list │ Tweet Detail Screen …