A Flutter application for exploring local Indonesian tourist attractions with Firebase and Supabase integration.
Lokapandu is a mobile application that allows users to discover and explore various local tourist spots in Indonesia. This app is built using Flutter with Clean Architecture and integrates Firebase AI and Supabase as its backend.
- πΊοΈ Explore tourist attractions based on location
- π Detailed information about attractions (address, operating hours, facilities)
- πΌοΈ Photo gallery for each tourist spot
- π Google Maps integration
- π€ AI-powered recommendations (Firebase AI)
- π± Responsive design for various screen sizes
- π Trip planning and itinerary management
- π Bookmark favorite destinations
This project uses Clean Architecture with Brick Offline-First Architecture for the following layer division:
lib/
βββ brick/ # Brick offline-first configuration
βββ data/ # Data layer (models, repositories, data sources)
βββ domain/ # Domain layer (entities, repositories, use cases)
βββ presentation/ # Presentation layer (screens, widgets, providers)
βββ features/ # Feature-specific implementations
βββ common/ # Shared utilities and failure handling
βββ env/ # Environment configuration
βββ injection.dart # Dependency injection setup
This application uses Brick for its offline-first implementation:
- Local Storage: SQLite for local data storage
- Remote Sync: Automatic synchronization with Supabase
- Offline Capability: The app remains functional without an internet connection
- Data Consistency: Automatic conflict resolution and data merging
Benefits of Brick Architecture:
- β‘ High performance with local data
- π Automatic synchronization when online
- π± Consistent user experience
- π‘οΈ Resilient to unstable connections
- Framework: Flutter (SDK ^3.9.2)
- Language: Dart
- State Management: Provider, Riverpod
- Navigation: Go Router
- Backend: Supabase (Database, Authentication, Storage)
- Offline-First: Brick Architecture with SQLite
- AI Integration: Firebase AI (Gemini)
- Firebase Services: Analytics, Crashlytics, Authentication, Performance
- Architecture: Clean Architecture + Brick Offline-First
- Code Generation: Freezed, JSON Serialization
- Environment Management: Envied
- Dependency Injection: GetIt
- Maps: Google Maps Flutter
- Location Services: Location & Geocoding
Make sure you have installed:
- Flutter SDK (version 3.9.2 or newer)
- Dart SDK (version 3.9.2 or newer)
- Android Studio or VS Code
- Git
-
Clone the repository
git clone https://github.com/your-username/lokapandu.git cd lokapandu -
Install dependencies
flutter pub get
-
Setup Environment Variables
# Copy the .env.example file to .env cp .env.example .env # Edit the .env file and fill it with your configuration SUPABASE_URL=your-supabase-url SUPABASE_KEY=your-supabase-key
-
Setup Firebase
- Create a new project in the Firebase Console
- Download
google-services.jsonfor Android and place it inandroid/app/ - Download
GoogleService-Info.plistfor iOS and place it inios/Runner/ - Run the Firebase CLI for configuration:
firebase login flutterfire configure
-
Setup Supabase
- Create a new project on Supabase
- Get the URL and anon key from your Supabase dashboard
- Update the
.envfile with your Supabase credentials
-
Generate Code
flutter packages pub run build_runner build --delete-conflicting-outputs
-
Run the Application
# Debug mode flutter run # Release mode flutter run --release
lokapandu/
βββ android/ # Android-specific files
βββ ios/ # iOS-specific files
βββ assets/ # App assets (images, icons, illustrations)
βββ lib/
β βββ app.dart # Main app widget
β βββ main.dart # Entry point
β βββ injection.dart # Dependency injection
β βββ firebase_options.dart # Firebase configuration
β βββ brick/ # Brick offline-first configuration
β β βββ adapters/ # Data adapters for Brick
β β βββ db/ # SQLite database setup
β β βββ models/ # Brick models
β β βββ repositories/ # Brick repository implementations
β βββ common/ # Shared utilities
β β βββ analytics.dart # Analytics tracking
β β βββ config/ # App configuration
β β βββ errors/ # Error handling
β β βββ observers/ # Navigation observers
β β βββ routes/ # Routing configuration
β β βββ services/ # Common services
β β βββ themes/ # App theming
β β βββ utils/ # Utility functions
β βββ data/
β β βββ datasources/ # Remote & local data sources
β β βββ models/ # Data models
β β βββ mappers/ # Data mappers
β β βββ repositories/ # Repository implementations
β βββ domain/
β β βββ entities/ # Business entities
β β βββ repositories/ # Repository contracts
β β βββ usecases/ # Business logic
β β βββ validators/ # Input validation
β βββ features/ # Feature-based organization
β β βββ ai_chat/ # AI chat feature
β βββ env/
β β βββ env.dart # Environment configuration
β βββ presentation/
β βββ ai_chat/ # AI chat UI
β βββ auth/ # Authentication UI
β βββ bookmark/ # Bookmark UI
β βββ common/ # Shared UI components
β βββ home/ # Home screen
β βββ plan/ # Trip planning UI
β βββ settings/ # Settings UI
β βββ tourism_spot/ # Tourism spot UI
βββ test/ # Unit & widget tests
βββ docs/ # Project documentation
βββ .env.example # Environment variables template
βββ pubspec.yaml # Dependencies & project config
βββ README.md # Project documentation
# Run all tests
flutter test
# Run tests with coverage
flutter test --coverage
# Run specific test file
flutter test test/path/to/test_file.dartContributions are welcome! Please read our CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the terms of the license found in the LICENSE file.
# Build APK
flutter build apk --release
# Build App Bundle (for Google Play Store)
flutter build appbundle --release# Build iOS
flutter build ios --releaseThis project uses code generation for models and serialization:
# Generate code once
flutter packages pub run build_runner build
# Watch mode (auto-generates when files change)
flutter packages pub run build_runner watch
# Clean and rebuild
flutter packages pub run build_runner build --delete-conflicting-outputsUse the .env file for environment configuration:
SUPABASE_URL=your-supabase-url
SUPABASE_KEY=your-supabase-keyPlease read CONTRIBUTING.md for contribution guidelines.
This project is licensed under the MIT License.
If you encounter any issues or have questions:
- Check existing Issues
- Create a new issue if one doesn't already exist
- Contact the development team
- Flutter Team for the amazing framework
- Supabase for the backend-as-a-service
- Firebase for AI and analytics
- The Flutter Indonesia Community
Happy Coding! π