- π― Overview
- β¨ Feature Matrix
- π Current Development Status
- π οΈ Recent Updates
- ποΈ Architecture
- π§ Tech Stack
- π± Screenshots
- π Getting Started
- π¨ Development
- π§ͺ Testing
- π¦ Build & Deploy
- π€ Contributing
- π Support & Contact
- π License
Stream Cart Mobile is a productionβoriented live commerce + eβcommerce superβapp built with Flutter and powered by a microservices backend. It implements Domain-Driven Design (DDD) + Clean Architecture, enabling clear separation of concerns, scalability, testability, and rapid feature evolution.
π»π³ TΓ³m tαΊ―t: Ứng dα»₯ng thΖ°Ζ‘ng mαΊ‘i Δiα»n tα» & livestream vα»i kiαΊΏn trΓΊc sαΊ‘ch (DDD, Clean Architecture) hα» trợ giα» hΓ ng, ΔΖ‘n hΓ ng, voucher, chat realtime, thΓ΄ng bΓ‘o ΔαΊ©y, livestream (LiveKit), SignalR, tΓ¬m kiαΊΏm, quαΊ£n lΓ½ Δα»a chα», biαΊΏn thα» sαΊ£n phαΊ©m, cα»a hΓ ng.
- π Unified Commerce: Catalog, variants, vouchers, cart, checkout, orders
- π₯ Interactive Live Streaming: LiveKit + realtime chat + pinned products
- π¬ Real-time Chat & Notifications: SignalR + Firebase Cloud Messaging
- β‘ Reactive UX: BLoC state management & granular loading states
- π Secure: JWT auth, secure token storage, guarded APIs
- π§© Extensible Domain Model: Modular feature packages & use cases
- β Home / Explore (products, categories, shops, banners)
- β Authentication & Profile (JWT, secure storage)
- β Product Variants, Cheapest Variant Resolution
- β Cart (add / update / bulk select / preview / clear)
- β Checkout Preview & Order Creation Flow (price breakdown)
- β Order Management (status tabs, detail, timeline, reviews scaffold)
- β Live Streaming (join, active streams, products, pinned items, messages)
- β Real-time Chat (rooms, unread count, typing indicators)
- β Notifications (list, mark read, unread counter, SignalR + FCM + local)
- β Address Book (CRUD, default selection)
- β Vouchers (shop vouchers apply / list)
- β Search (products + search history service)
- β Theming & Responsive Layout (Material 3 + Google Fonts)
- β Push Notifications (foreground / background handlers)
- β Dependency Injection (GetIt) & modular use cases
- π§ Payment Gateway Integration (stubbed payment method selection)
- π§ Stream Analytics / Insights
- π§ Advanced Recommendation Engine
- Products & Categories (filter, search, variants, cheapest variant resolver)
- Shops (listing, product count per shop)
- Vouchers (list + apply at checkout preview)
- Cart (add/update/remove, multiβselect, preview order, bulk deletion)
- Checkout Preview (price breakdown, shipping, voucher, payment method select)
- Orders (tabbed status lists, detail, status timeline, price breakdown, review scaffold)
- Addresses (CRUD + default selection)
- Join active live streams (LiveKit join token connect)
- Products & pinned products per stream (debounced reload)
- Live stream chat (separate from standard chat domain)
- Viewer stats & real-time events pipeline
- SignalR abstraction (chat + notifications + typing indicators)
- Chat Rooms (user/shop, load messages, search, unread counts)
- Typing indicators, join/leave events, reconnection strategy
- FCM + local notifications (foreground / background / terminated)
- SignalR real-time push (new + updated notification merging)
- Pagination & filtering (type, read state), unread counter
- JWT Login / Me endpoint, secure storage, automatic token hydration
- Role awareness (user / shop contexts prepared)
- Profile display & avatar
- DDD Layers (Entities, Repositories, UseCases)
- Clean separation (data / domain / presentation)
- GetIt DI (ready for Injectable codegen)
- Consistent error & loading state modeling
- Modular BLoC per feature (auth, cart, chat, order items, notification, livestream, address, voucher, variants, etc.)
- Secure token storage (flutter_secure_storage)
- Graceful reconnection routines (SignalR, LiveKit probes)
- Defensive parsing & failure surfaces (Either / Failures)
- Build runner ready (retrofit, json_serializable, hive, injectable)
- Search history service persisted locally
- Clear feature folder conventions
- Payment gateway integration (online methods)
- Advanced analytics (viewer retention, conversion funnels)
- Recommendation / personalization engine
- Inβstream purchase overlay & scheduled pinning
- Moderation tools & reporting flows
- Multi-language i18n expansion
- Full cart lifecycle (bulk selection + preview + voucher application)
- Order listing, detail, status timeline & price breakdown
- Live streaming join/connect flow (LiveKit + join token handshake)
- Real-time chat (typing, unread counts, reconnection, search)
- Unified notifications (SignalR + FCM + local)
- Product variants + cheapest variant / availability use cases
- Shop vouchers & shop listing components
- Address management & checkout integration
- Payment gateway integration layer
- Stream analytics & engagement metrics
- Recommendation & personalization services
- Advanced moderation & reporting in streams
- Multi-language i18n expansion
- Full test coverage ramp-up (unit + widget + integration)
- Reconnection improvements (SignalR & LiveKit lifecycle aware)
- Debounced product reload in live streams (API efficiency)
- Notification pagination + unread counter sync issues resolved
- Variant price resolution & null safety hardening
- Order domain (detail, status timeline, review scaffold)
- Live stream chat + pinned products + viewer stats events
- Vouchers (list + apply) & address integration in checkout preview
- Bulk cart operations & selected items preview order path
- Search history persistence service
- Local + push notification orchestration service
- Consistent skeleton shimmer loading states
- Payment + status badge components
- Improved empty / error / retry states across lists
- Unified typography (Be Vietnam Pro via Google Fonts)
Stream Cart Mobile follows Clean Architecture + DDD with featureβoriented modularity:
lib/
βββ π― core/ # Config, constants, env, DI, routing, network, services
βββ π data/ # Datasources (remote/local), models, repos impl
βββ π’ domain/ # Entities, repositories (contracts), use cases
βββ π¨ presentation/ # BLoCs, pages, widgets, themes
Additional Feature Domains Present:
- cart/, order_item/, notification/, chat/, livestream/, address/, voucher/, product_variants/, shop/, search/
SignalRServiceβ unified hub connection & callbacks (chat, notifications)LiveKitServiceβ media session, room events, probing & metricsFirebaseNotificationServiceβ FCM + local notification orchestrationSearchHistoryServiceβ persistent recent searches
SignalR events β Bloc events β UI state updates (chat, notifications, typing, viewer stats) LiveKit room events β LiveStreamBloc (participants, probing, pinned products sync)
- β
Auth:
/api/auth/login,/api/auth/me - β
Categories:
/api/categorys - β
Products:
/api/products,/api/products/search - β
Product Variants:
/api/product-variants/* - β
Cart:
/api/cart/* - β
Orders:
/api/orders/* - β
Vouchers:
/api/vouchers/*,/api/shop-vouchers/* - β
Live Streams:
/api/livestreams/*+ LiveKit signaling - β
Notifications:
/api/notifications/*+ SignalR hub - β
Chat:
/api/chat/*+ SignalR hub - β
Addresses:
/api/addresses/* - π§ Payments: (gateway integration pending)
- Flutter 3.7.2+, Dart 3.7.2+
- flutter_bloc (feature BLoCs) + equatable
- dio, retrofit, json_serializable, signalr_core, livekit_client
- flutter_secure_storage, shared_preferences, hive / hive_flutter
- get_it (ready for injectable code generation)
- build_runner, retrofit_generator, json_serializable, hive_generator, injectable_generator
- crypto, flutter_dotenv, dartz, intl
- Material 3, Google Fonts (Be Vietnam Pro), cached_network_image, shimmer, flutter_svg, flutter_slidable
- Custom routing (
AppRouter+ observer)
- firebase_core, firebase_messaging, flutter_local_notifications
Screenshots (updated set incoming). The app currently features:
π Home - Catalog + categories + banners + search
π€ Profile - Authenticated user info
π Cart & Checkout Preview - Voucher + price breakdown
π¦ Orders - Status tabs & detail timeline
π₯ Live Stream - Realtime video + chat + pinned products
π¬ Chat - Realtime rooms & typing indicators
π Notifications - Realtime + push hybrid
Run on Web: flutter run -d web
Ensure you have:
- β Flutter SDK 3.7.2+ (includes Dart)
- β Android Studio or VS Code with Flutter extension
- β Git
- β Firebase project (for push notifications) β optional for core features
- Clone repository
git clone https://github.com/yourusername/stream-cart-mobile.git cd stream-cart-mobile/stream_cart_mobile - Install dependencies
flutter pub get
- (Optional) Create
.envecho "API_BASE_URL=https://brightpa.me" > .env echo "ENVIRONMENT=development" >> .env
- Run the app
flutter run -d web # or flutter run
Default API base points to production:
https://brightpa.me.
API_BASE_URL=https://brightpa.me
API_TIMEOUT=30000
ENVIRONMENT=development
ENABLE_DEBUG_LOGGING=trueCore API (subset):
- Auth:
/api/auth/login,/api/auth/me - Catalog:
/api/products,/api/products/search,/api/categorys - Cart:
/api/cart/*| Orders:/api/orders/*| Vouchers:/api/vouchers/* - Live Streams, Chat & Notifications: REST + SignalR hubs + LiveKit server
Auth Flow: Provide valid backend credentials (no demo account bundled).
flutter run -d web
flutter run # auto device detection
flutter run -d android # specify platformflutter run --dart-define=ENVIRONMENT=developmentRun when adding retrofit APIs / json models / hive adapters / injectable config:
flutter pub run build_runner build --delete-conflicting-outputs
flutter pub run build_runner watchflutter format .
flutter analyze
dart fix --applyflutter test
flutter test --coveragetest/
βββ unit/ # Domain, use cases, blocs
βββ widget/ # Widget tests (goldens planned)
βββ integration/ # End-to-end flows
Current: Core flows manually tested; automated coverage ramp-up in progress.
flutter build apk --release
flutter build appbundle --release
flutter build apk --release --obfuscate --split-debug-info=build/debug-info/flutter build ios --release
flutter build ipa --releaseflutter build web --releaseflutter run -d windows- Android: Sign, upload AAB to Play Console
- iOS: Archive in Xcode, distribute via App Store Connect
- Web: Host
/build/webon static hosting / CDN
- Fork repository
- Create feature branch:
git checkout -b feature/amazing-feature
- Implement & test
- Ensure quality:
flutter analyze flutter test flutter format .
- Commit & push:
git commit -m "feat: add amazing feature" git push origin feature/amazing-feature - Open Pull Request
- Effective Dart style
- Tests for new logic (where reasonable)
- Clear commit messages (conventional preferred)
- π§ Email: bolicious123@gmail.com
- π¬ Issues: GitHub Issues
- π Wiki: Project documentation (work in progress)
- π Demo:
flutter run -d web
- Stage: Active Development (Core FeatureβComplete)
- API: Production microservices connected
- Real-time Stack: SignalR + LiveKit + FCM operational
- Platforms: β Web β Android β iOS β Windows (dev)
- Last Updated: Aug 2025
Licensed under the MIT License β see LICENSE.
Made with β€οΈ using Flutter
π₯ Core Features ProductionβReady
β Star this repo if it helps you!
Quick Start: git clone β cd stream_cart_mobile β flutter pub get β flutter run -d web