Lite X is a full-featured, cross-platform social media application built with Flutter and Riverpod. It provides a complete X (Twitter-like) experience with modern architecture patterns, real-time messaging, and comprehensive user interactions.
Lite X is a feature-rich social media client that implements the complete X API surface, offering users a seamless experience for content creation, discovery, and social interaction. Built with Flutter 3.22+ and Dart 3, the app follows clean architecture principles with Riverpod for state management.
Complete authentication system supporting multiple OAuth providers and traditional login methods.
Key Capabilities:
- Multi-provider OAuth: Login with GitHub, Google, and other OAuth providers
- Traditional Authentication: Email/password registration and login
- Deep Link Integration: Seamless OAuth callback handling via deep links
- Secure Token Management: JWT token storage and automatic refresh
- Onboarding Flow: Interactive intro screens and account setup
- Persistent Sessions: Automatic login state persistence across app launches
Screens:
- Intro/Splash Screen
- Login Screen
- Sign Up Flow
- OAuth Provider Selection
- Account Creation Wizard
Authentication screens and OAuth flow
Architecture:
AuthRemoteRepository: Handles OAuth flows, login/logout, token managementAuthLocalRepository: Manages local token storage and user session data- Clean separation between remote API calls and local data persistence
Personalized content discovery with intelligent feed algorithms and comprehensive tweet interactions.
Key Capabilities:
- Dual Feed System: "For You" personalized feed and "Following" chronological feed
- Tweet Interactions: Like, retweet, quote, reply, bookmark, and share
- Tweet Management: Create, edit, and delete tweets with media support
- Engagement Insights: View lists of users who liked, retweeted, or quoted tweets
- AI-Powered Summaries: Get AI-generated summaries of tweet threads
- Hashtag Support: Browse and create posts with hashtags
- Mentions Feed: Track tweets where you're mentioned
- Thread Views: Complete reply threads with nested conversations
- Infinite Scroll: Cursor-based pagination for smooth feed browsing
Screens:
- Home Timeline (For You / Following)
- Tweet Detail Screen
- Create Post Screen
- Edit Tweet Screen
- Reply Composer
- Quote Tweet Composer
- Hashtag Posts Screen
- Mentioned Tweets Screen
- Quotes Screen
- Reposted By Screen
- Reply Thread View
Home timeline and tweet interactions
Architecture:
HomeRepository: Comprehensive API integration for all tweet operations- State management with Riverpod for real-time feed updates
- Cached timeline switching for instant feed transitions
- Media download integration for tweet images and videos
Complete user profile system with customization, follows management, and activity tracking.
Key Capabilities:
- Profile Customization: Update profile photo, cover image, bio, and personal details
- Profile Viewing: View your own and other users' profiles
- Activity Tracking: View user tweets, replies, media, and likes
- Follow System: Follow/unfollow users with real-time follower/following counts
- Connection Management: View followers and following lists
- Email Management: Change and verify email addresses
- Birthdate Handling: Update and manage birthdate information
- Profile Search: Search within user profiles
- Offline Support: Local caching of profile data for offline access
Screens:
- Profile Screen (with tabs for tweets, replies, media, likes)
- Edit Profile Screen
- Profile Photo/Cover Screen
- Following/Followers List Screen
- Birthdate Screen
- Change Email Screen
- Email Verification Screen
- Profile Search Screen
- Explore Profiles Screen
User profiles and customization options
Architecture:
ProfileRepointerface withProfileRepoImplimplementationProfileStorageService: Local profile data caching with Hive- Comprehensive error handling with offline fallback
- Optimistic UI updates for instant feedback
Real-time messaging system with WebSocket support for instant communication.
Key Capabilities:
- Real-Time Messaging: WebSocket-based instant message delivery
- Direct Messages: One-on-one private conversations
- Group Chats: Create and manage group conversations
- Message Types: Text, media, voice messages, and reactions
- User Search: Find and start conversations with users
- Conversation Management: View all active conversations
- Typing Indicators: Real-time typing status
- Message Status: Delivery and read receipts
- Message History: Persistent message storage and retrieval
- Offline Support: Local message caching and sync
Screens:
- Conversations List Screen
- Chat Screen (individual/group)
- User/Group Search Screen
Architecture:
SocketRepository: WebSocket connection management for real-time updatesChatRemoteRepository: RESTful API for chat operationsChatLocalRepository: Local message and conversation storage- Event-driven message handling with Riverpod streams
Comprehensive notification system with FCM integration for push notifications.
Key Capabilities:
- Activity Notifications: Likes, retweets, follows, and replies
- Mention Alerts: Get notified when mentioned in tweets
- Push Notifications: Firebase Cloud Messaging integration
- Notification Categories: Organized by type (All, Mentions, Verified)
- Real-Time Updates: Instant notification delivery
- Rich Notifications: Display user avatars, tweet content, and actions
- Notification History: Persistent notification storage
- Deep Linking: Tap notifications to navigate to relevant content
Screens:
- Notifications Screen (with filtered views)
- Mention-specific notifications
Notification center and alerts
Architecture:
NotificationRepository: Fetch and manage notificationsMentionsRepository: Handle mention-specific notificationsNotificationFCMService: Firebase integration for push notifications- Background notification handling for real-time delivery
Advanced search functionality for discovering content and users across the platform.
Key Capabilities:
- Multi-Tab Search: Search across Top, Latest, People, and Media
- Tweet Search: Find tweets by keywords and hashtags
- User Search: Discover users by name, username, or bio
- Real-Time Suggestions: Instant search suggestions as you type
- Search History: Track and manage recent searches
- Filter Options: Refine results by content type
- Media Search: Find tweets with specific media types
- User Profiles: View complete user info in search results
- Follow from Search: Quick follow/unfollow actions
Screens:
- Search Screen (with tab bar)
- Search Results Screen
Search functionality and results
Architecture:
SearchRepository: Handles all search queries and filtering- Tab-based search navigation (Top, Latest, People, Media)
- Debounced search input for optimized API calls
- Integration with Home and Profile repositories
Content discovery hub for finding trending topics and recommended users.
Key Capabilities:
- Curated Content: Discover trending topics and popular content
- Category Browsing: Explore content by categories
- Personalized Recommendations: Content suggestions based on interests
- Trending Topics: Real-time trending hashtags and discussions
- Visual Content: Image and video discovery feed
Screens:
- Explore Screen (main discovery hub)
Explore and discovery features
Architecture:
- Integration with Trends and Home repositories
- Category-based content organization
- Recommendation algorithms for personalized content
Track and explore trending topics, hashtags, and popular conversations.
Key Capabilities:
- Trending Hashtags: Real-time trending hashtags with tweet counts
- Trend Categories: Organized trends by topic (News, Sports, Entertainment, etc.)
- Trend Analytics: View trend history and engagement metrics
- Who to Follow: Suggested users based on interests and activity
- Hashtag Navigation: Browse tweets by specific hashtags
- Trend Persistence: Track trend evolution over time
Screens:
- Trends Screen
- Hashtag Tweets Screen
- Who to Follow Screen
- Explore Trends Screen
Architecture:
TrendsRepository: Fetch trending data and analytics- Category-based trend organization
- Integration with explore and search features
Comprehensive settings and privacy controls for user account management.
Key Capabilities:
- Account Settings: Manage username, email, and account details
- Privacy Controls: Configure privacy and safety settings
- Password Management: Change and reset password
- Block & Mute: Manage blocked and muted accounts
- Notification Preferences: Customize notification settings
- Data Sharing: Control data sharing and analytics preferences
- Account Information: View and edit personal information
- Security Features: Two-factor authentication and login alerts
Screens:
- Settings and Privacy Screen
- Your Account Screen
- Account Information Screen
- Change Password Screen
- Username Screen
- Privacy and Safety Screen
- Mute and Block Screen
- Blocked Accounts Screen
- Muted Accounts Screen
Architecture:
SettingsRepointerface with implementation- State management following ProfileBasicDataStates pattern
SettingsBasicDataNotifier: Riverpod StateNotifier for settings- Responsive design with mobile and web layouts
- Persistent settings storage
Complete media handling system for uploads, downloads, and processing.
Key Capabilities:
- Multi-Format Support: Images, videos, GIFs, and audio
- Upload Pipeline: Request → Upload → Confirm workflow
- Progress Tracking: Real-time upload/download progress
- Media Compression: Automatic optimization for bandwidth
- Cloud Storage: Integration with cloud media storage
- Media Gallery: Browse and manage media attachments
- Image Editing: Basic crop and filter capabilities
- Video Processing: Thumbnail generation and transcoding
- Audio Messages: Record and send voice messages
Architecture:
MediaRepowithMediaRepoImplimplementation- Three-phase upload process: request → S3 upload → confirm
upload_media.dartanddownload_media.dartutilities- File type detection and validation
- Progress streaming for large files
Reusable UI components and utilities used across features.
Key Capabilities:
- Custom Widgets: Buttons, cards, dialogs, and form elements
- Theming System: Consistent design language across the app
- Responsive Layouts: Adaptive UI for mobile, tablet, and web
- Loading States: Shimmer effects and loading indicators
- Error Handling: Consistent error display and recovery
- Animations: Smooth transitions and micro-interactions
Lite X follows Clean Architecture principles with clear separation of concerns:
lib/
├── core/ # Core utilities and shared resources
│ ├── classes/ # Core data classes and models
│ ├── models/ # Shared models (User, Tokens, etc.)
│ ├── providers/ # Global Riverpod providers
│ └── services/ # Core services (deep linking, etc.)
├── features/ # Feature-based modules
│ ├── auth/ # Authentication feature
│ │ ├── models/ # Auth-specific models
│ │ ├── repositories/ # Data layer (local + remote)
│ │ ├── view_model/ # State management
│ │ └── view/ # UI layer (screens + widgets)
│ ├── home/ # Home feed feature
│ ├── profile/ # Profile feature
│ ├── chat/ # Messaging feature
│ ├── notifications/ # Notifications feature
│ ├── search/ # Search feature
│ ├── explore/ # Explore feature
│ ├── trends/ # Trends feature
│ ├── settings/ # Settings feature
│ ├── media/ # Media management
│ └── shared/ # Shared UI components
└── l10n/ # Localization files
- View Layer: Flutter widgets and screens
- ViewModel Layer: Riverpod providers and state management
- Repository Layer: Data access abstraction (local + remote)
- Model Layer: Data models and entities
- Service Layer: Core services (network, storage, etc.)
Lite X supports multiple languages with Flutter's internationalization framework.
- English (en) - Default
- Arabic (ar) - Full RTL support
-
Edit ARB files in
lib/l10n/:app_en.arb(English)app_ar.arb(Arabic)
-
Generate localization code:
flutter gen-l10n -
Use in widgets:
import 'package:lite_x/l10n/app_localizations.dart'; Text(AppLocalizations.of(context)!.trendsTitle)
- Default: Follows system locale
- Manual: Set specific locale in
MaterialApp.router:locale: const Locale('ar')
- Flutter: 3.22+
- Dart: 3.0+
- Backend API: Running instance of the X-like backend
- Firebase: Configured project for FCM notifications
-
Clone the repository:
git clone <repository-url> cd Cross_Platform
-
Install dependencies:
flutter pub get
-
Configure environment variables:
- Create
.envfile with API endpoints and credentials - Update
firebase_options.dartwith your Firebase configuration
- Create
-
Generate code:
flutter pub run build_runner build --delete-conflicting-outputs flutter gen-l10n
-
Run the app:
flutter run
# Android
flutter run -d android
# iOS
flutter run -d ios
# Web
flutter run -d chrome
# Windows
flutter run -d windows
# macOS
flutter run -d macos
# Linux
flutter run -d linuxRun the test suite:
# Run all tests
flutter test
# Run specific test file
flutter test test/features/auth/auth_test.dart
# Run with coverage
flutter test --coveragetest/
├── core/ # Core utilities tests
└── features/ # Feature tests
├── auth/ # Authentication tests
├── home/ # Home feed tests
├── profile/ # Profile tests
└── ...
Note: Ensure tests include
ProviderScopefor Riverpod-dependent widgets.
- flutter_riverpod: State management
- dio: HTTP client with interceptors
- hive: Local database
- firebase_core & firebase_messaging: Push notifications
- go_router: Navigation
- socket_io_client: Real-time messaging
- cached_network_image: Image caching
- image_picker & image_cropper: Media selection
- flutter_svg: SVG support
- shimmer: Loading animations
- fpdart: Functional programming utilities
- intl: Internationalization
- url_launcher: External link handling
- path_provider: File system paths
See pubspec.yaml for complete list.
Update lib/core/providers/dio_interceptor.dart with your backend endpoints.
- Add your
google-services.json(Android) andGoogleService-Info.plist(iOS) - Configure FCM in
firebase_options.dart - Update notification handling in
NotificationFCMService
Configure deep link schemes in:
- Android:
android/app/src/main/AndroidManifest.xml - iOS:
ios/Runner/Info.plist
The app integrates with the following main API routes:
- Auth:
/api/auth/*,/oauth2/authorize/* - Tweets:
/api/home/*,/api/tweets/* - Users:
/api/users/* - Chat:
/api/dm/* - Notifications:
/api/notifications - Media:
/api/media/* - Search:
/api/search/* - Settings:
/api/settings/*
Refer to repository implementations for detailed endpoint documentation.
We welcome contributions! Please follow these guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For issues, questions, or contributions, please:
- Open an issue on GitHub
- Contact the development team
- Check the Flutter documentation
- Flutter team for the amazing framework
- Riverpod for excellent state management
- All open-source contributors






