A comprehensive, production-ready Flutter application for managing trading journals across web, Android, and iOS platforms. Built with modern architecture patterns, responsive design, and extensible features.
- โ Authentication System - Sign up, sign in, password reset with service abstraction
- โ Responsive Navigation - Adaptive navigation for mobile, tablet, and desktop
- โ Dark/Light Themes - System theme support with manual toggle
- โ Local Storage - Offline-first data persistence with Hive
- ๐ Trade Journal - Add, edit, delete trades with filtering and grouping
- ๐ Trading Interface - Complex trade page with resizable chart and panels
- ๐ Broker Management - Connect and sync with multiple brokers
- ๐ Analytics Dashboard - Performance metrics and trade analysis
- โ Modern Architecture - Clean architecture with Riverpod state management
- โ Design System - Consistent UI components and design tokens
- โ Type Safety - Comprehensive data models with JSON serialization
- โ Responsive Design - Mobile-first design with tablet and desktop support
- ๐ Testing - Unit tests, widget tests, and CI/CD pipeline
- ๐ API Integration - RESTful API client with error handling and retry logic
lib/
โโโ core/ # Core functionality
โ โโโ constants/ # App-wide constants
โ โโโ theme/ # Design system (colors, typography, themes)
โ โโโ router/ # Navigation and routing
โ โโโ widgets/ # Core reusable widgets
โโโ features/ # Feature modules
โ โโโ auth/ # Authentication
โ โโโ dashboard/ # Dashboard and overview
โ โโโ trade/ # Trading and journal features
โ โโโ broker/ # Broker management
โโโ shared/ # Shared across features
โ โโโ models/ # Data models
โ โโโ services/ # Business logic services
โ โโโ repositories/ # Data access layer
โ โโโ widgets/ # Reusable UI components
โโโ main.dart # App entry point
- Clean Architecture - Separation of concerns with clear boundaries
- Repository Pattern - Abstraction layer for data access
- Provider Pattern - State management with Riverpod
- Service Layer - Business logic abstraction
- MVVM - Model-View-ViewModel pattern for UI
- Flutter SDK (>=3.10.0)
- Dart SDK (>=3.0.0)
- Android Studio / VS Code
- Git
-
Clone the repository
git clone <repository-url> cd vtrader
-
Install dependencies
flutter pub get
-
Generate code
flutter packages pub run build_runner build
-
Run the app
# Web flutter run -d chrome # Android flutter run -d android # iOS (macOS only) flutter run -d ios
-
Enable code generation watch mode
flutter packages pub run build_runner watch
-
Run tests
flutter test
-
Analyze code
flutter analyze
- Colors - Primary, secondary, semantic colors with light/dark variants
- Typography - Inter font family with consistent text styles
- Spacing - 8px grid system for consistent spacing
- Breakpoints - Mobile (โค450px), Tablet (451-800px), Desktop (โฅ801px)
- AppButton - Consistent button styling with variants
- AppInput - Form inputs with validation and accessibility
- ThemeToggleButton - System/light/dark theme switcher
- MainLayout - Responsive navigation shell
- Mobile - Bottom navigation with hamburger menu
- Tablet - Navigation rail with compact layout
- Desktop - Persistent sidebar navigation with full features
The app includes a mock authentication service for development and testing:
Demo Credentials:
- Email:
demo@vtrader.in
- Password:
password123
The authentication system is designed with abstraction in mind:
AuthService
- Abstract base classMockAuthService
- Development implementation- Easy to swap with Firebase Auth, REST API, or other providers
- Sign up with email/password
- Sign in with session persistence
- Password reset flow
- Profile management
- Secure session storage
- Hive - Primary local database for offline-first architecture
- SharedPreferences - User preferences and settings
- Secure Storage - Authentication tokens and sensitive data
- UserModel - User profile and preferences
- TradeModel - Trading transactions with P&L calculations
- BrokerModel - Broker connections and sync settings
- StrategyModel - Trading strategies with risk management
- PositionModel - Current market positions
- UI Layer - Widgets and pages
- State Layer - Riverpod providers and notifiers
- Service Layer - Business logic and validation
- Repository Layer - Data access abstraction
- Storage Layer - Local database and preferences
- Providers - Dependency injection and state management
- StateNotifiers - Complex state management with immutable updates
- FutureProviders - Async data loading with error handling
- StreamProviders - Real-time data updates
themeModeProvider
- Theme state managementrouterProvider
- Navigation configurationauthStateProvider
- Authentication statetradesProvider
- Trade data management
- Responsive design for desktop and mobile browsers
- PWA capabilities (future enhancement)
- URL-based routing with deep linking
- Material Design 3 components
- Adaptive layouts for phones and tablets
- Android-specific optimizations
- Cupertino design elements where appropriate
- iOS-specific navigation patterns
- Safe area handling
- Unit Tests - Business logic and data models
- Widget Tests - UI components and interactions
- Integration Tests - End-to-end user flows
test/
โโโ unit/ # Unit tests
โ โโโ models/ # Data model tests
โ โโโ services/ # Service layer tests
โ โโโ utils/ # Utility function tests
โโโ widget/ # Widget tests
โ โโโ components/ # Component tests
โ โโโ pages/ # Page tests
โโโ integration/ # Integration tests
โโโ flows/ # User flow tests
# All tests
flutter test
# Unit tests only
flutter test test/unit
# Widget tests only
flutter test test/widget
# Integration tests
flutter test integration_test
# Build for web
flutter build web --release
# Deploy to hosting service
# (Firebase Hosting, Netlify, Vercel, etc.)
# Build APK
flutter build apk --release
# Build App Bundle
flutter build appbundle --release
# Build for iOS
flutter build ios --release
# Archive and upload via Xcode
Create .env
file in project root:
API_BASE_URL=https://api.vtrader.in/v1
SENTRY_DSN=your_sentry_dsn
ANALYTICS_KEY=your_analytics_key
- Development - Local development with mock data
- Staging - Testing environment with staging APIs
- Production - Live environment with production APIs
- Lazy Loading - Load data and widgets on demand
- Image Caching - Efficient image loading and caching
- State Optimization - Minimal rebuilds with Riverpod
- Bundle Splitting - Code splitting for web builds
- Performance metrics tracking
- Error reporting with Sentry (future)
- Analytics with Firebase Analytics (future)
- Real-time chart integration
- Broker API integrations (Zerodha, Upstox, etc.)
- Advanced analytics and reporting
- Trade strategy backtesting
- Social features and community
- Mobile notifications
- Export/import functionality
- Multi-language support
- Comprehensive test coverage (>90%)
- CI/CD pipeline with GitHub Actions
- Performance monitoring
- Accessibility improvements
- Offline-first synchronization
- Real-time data streaming
- Fork the repository
- Create a feature branch
- Make changes with tests
- Run linting and tests
- Submit pull request
- Follow Flutter/Dart style guide
- Write comprehensive tests
- Document public APIs
- Use meaningful commit messages
- Description of changes
- Testing approach
- Screenshots (for UI changes)
- Breaking changes (if any)
This project is licensed under the MIT License - see the LICENSE file for details.
- Flutter team for the amazing framework
- Riverpod for excellent state management
- Material Design team for design system
- Open source community for packages and inspiration
Built with โค๏ธ using Flutter