A modern cryptocurrency and NFT tracking application built with Flutter, demonstrating Clean Architecture principles and best practices in modern mobile development.
| Market | NFT |
|---|---|
![]() |
![]() |
- π° Cryptocurrency Tracking β Real-time crypto market data from CoinGecko
- π¨ NFT Marketplace β Browse NFT collections via Reservoir API
- β Favorites System β Save and manage your favorite coins and NFTs
- π Authentication β Secure user authentication with Supabase
- π Detailed Analytics β View comprehensive coin and NFT details
- π Theme Support β Light and dark mode
- π± Responsive Design β Optimized for all screen sizes
This project follows Clean Architecture principles with clear separation of concerns across three layers:
lib/
βββ core/ # Shared utilities and base classes
β βββ constants/ # App-wide constants
β βββ errors/ # Error handling
β βββ network/ # HTTP client configuration
β βββ theme/ # App theming
β βββ utils/ # Helper functions
βββ features/ # Feature modules
β βββ coin/ # Cryptocurrency feature
β β βββ data/ # Data layer
β β β βββ coin_service.dart # API service
β β β βββ models/ # Data models
β β β βββ coin_repository_impl.dart
β β βββ domain/ # Business logic layer
β β β βββ entities/ # Domain entities
β β β βββ coin_repository.dart
β β βββ presentation/ # UI layer
β β βββ pages/ # Screens
β β βββ widgets/ # Reusable widgets
β β βββ providers/ # Riverpod providers
Data Layer
- API services for external data sources
- Data models with JSON serialization
- Repository implementations
- Local storage management
Domain Layer
- Business entities
- Repository interfaces
- Use cases (business logic)
Presentation Layer
- UI screens and widgets
- Riverpod providers for state management
- View models
Core
- Flutter SDK:
3.9+ - Dart:
3.9.2+ - Architecture: Clean Architecture
- State Management: Riverpod 2.6.1
Key Dependencies
| Package | Purpose |
|---|---|
riverpod / flutter_riverpod |
State management & dependency injection |
go_router |
Declarative routing & navigation |
dio |
HTTP client for API requests |
fpdart |
Functional programming (Either for error handling) |
supabase_flutter |
Backend-as-a-Service (Auth + Database) |
shared_preferences |
Local data persistence |
cached_network_image |
Image caching and loading |
flutter_svg |
SVG rendering |
intl |
Internationalization and formatting |
Free cryptocurrency data API providing:
- Market data for 10,000+ cryptocurrencies
- Price charts and historical data
- Market statistics and trends
- No API key required
Base URL: https://api.coingecko.com/api/v3/
NFT marketplace aggregator providing:
- NFT collection data
- Floor prices and sales
- Collection metadata
Base URL: https://api.reservoir.tools/
(May require API key for production)
Used for:
- User authentication (email/password)
- Session management
- Database operations
- Flutter SDK 3.9 or higher
- Dart 3.9.2 or higher
- iOS Simulator / Android Emulator or physical device
- Supabase account (for authentication features)
git clone https://github.com/teasec4/flutter-crypto-app.git
cd flutter-crypto-appflutter pub getCreate file lib/core/secrets/app_secrets.dart:
class AppSecrets {
static const String supabaseUrl = 'YOUR_SUPABASE_URL';
static const String supabaseAnonKey = 'YOUR_SUPABASE_ANON_KEY';
}Get your credentials from Supabase:
- Create a new project
- Go to Settings β API
- Copy the Project URL and anon/public key
flutter runπ± Android
flutter build apk --release
# or
flutter build appbundle --releaseπ iOS
flutter build ios --releasefinal coinRepositoryProvider = Provider<CoinRepository>((ref) {
return CoinRepositoryImpl(CoinService());
});
final coinListProvider = StateNotifierProvider<CoinListNotifier, AsyncValue<List<Coin>>>((ref) {
return CoinListNotifier(ref.read(coinRepositoryProvider));
});Future<Either<Failure, List<Coin>>> getCoins() async {
try {
final coins = await _service.fetchCoins();
return Right(coins);
} catch (e) {
return Left(ServerFailure(e.toString()));
}
}final router = GoRouter(
redirect: (context, state) {
// Auth guard logic
},
routes: [
StatefulShellRoute(
builder: (context, state, navigationShell) {
return ScaffoldWithNavBar(navigationShell: navigationShell);
},
branches: [
// Coins, NFTs, Favorites, Profile tabs
],
),
],
);β
Clean Architecture β Proper separation of concerns
β
Riverpod β Modern state management & DI
β
Go Router β Declarative navigation
β
Functional Programming β Robust error handling
β
API Integration β REST APIs
β
Supabase β Authentication & backend
β
Repository Pattern β Data abstraction
β
Dependency Injection β Testable code
β
Responsive UI β Adaptive layouts
β
Local Storage β Favorites persistence
# Run all tests
flutter test
# Run with coverage
flutter test --coverage
# Run integration tests
flutter test integration_test- Browse cryptocurrency market
- Search and filter coins
- View detailed coin information
- Price charts and statistics
- Add to favorites
- Explore NFT collections
- View collection details
- Floor prices and volume
- Metadata display
- Save favorite coins & NFTs
- Local persistence
- Quick access to saved items
- Email/password authentication
- Session management
- Protected routes
- User profile
Example environment config:
class EnvConfig {
static const bool isProduction = bool.fromEnvironment('dart.vm.product');
static const String apiBaseUrl = String.fromEnvironment(
'API_BASE_URL',
defaultValue: 'https://api.coingecko.com/api/v3/',
);
}Run with:
flutter run --dart-define=API_BASE_URL=https://your-api.com- Fork the project
- Create a feature branch:
git checkout -b feature/AmazingFeature
- Commit your changes:
git commit -m 'Add some AmazingFeature' - Push to the branch:
git push origin feature/AmazingFeature
- Open a Pull Request
This project was created for educational purposes.
teasec4
- GitHub: @teasec4
- CoinGecko β for free crypto API
- Reservoir β for NFT data
- Supabase β for backend services
- Flutter & Dart communities for excellent tools
βοΈ If this project helped you learn Flutter and Clean Architecture, give it a star!

