Skip to content

Lokapandu/Lokapandu

Repository files navigation

Lokapandu

A Flutter application for exploring local Indonesian tourist attractions with Firebase and Supabase integration.


πŸ“± About The App

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.


✨ Key Features

  • πŸ—ΊοΈ 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

πŸ—οΈ Architecture

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

🧱 Brick Offline-First Architecture

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

πŸ› οΈ Tech Stack

  • 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

πŸš€ Installation & Setup

Prerequisites

Make sure you have installed:

Installation Steps

  1. Clone the repository

    git clone https://github.com/your-username/lokapandu.git
    cd lokapandu
  2. Install dependencies

    flutter pub get
  3. 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
  4. Setup Firebase

    • Create a new project in the Firebase Console
    • Download google-services.json for Android and place it in android/app/
    • Download GoogleService-Info.plist for iOS and place it in ios/Runner/
    • Run the Firebase CLI for configuration:
      firebase login
      flutterfire configure
  5. Setup Supabase

    • Create a new project on Supabase
    • Get the URL and anon key from your Supabase dashboard
    • Update the .env file with your Supabase credentials
  6. Generate Code

    flutter packages pub run build_runner build --delete-conflicting-outputs
  7. Run the Application

    # Debug mode
    flutter run
    
    # Release mode
    flutter run --release

πŸ“ Project Structure

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

πŸ§ͺ Testing

# Run all tests
flutter test

# Run tests with coverage
flutter test --coverage

# Run specific test file
flutter test test/path/to/test_file.dart

🀝 Contributing

Contributions are welcome! Please read our CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the terms of the license found in the LICENSE file.


πŸ“± Build & Deploy

Android

# Build APK
flutter build apk --release

# Build App Bundle (for Google Play Store)
flutter build appbundle --release

iOS

# Build iOS
flutter build ios --release

πŸ”§ Development

Code Generation

This 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-outputs

Environment Variables

Use the .env file for environment configuration:

SUPABASE_URL=your-supabase-url
SUPABASE_KEY=your-supabase-key

🀝 Contributing

Please read CONTRIBUTING.md for contribution guidelines.


πŸ“„ License

This project is licensed under the MIT License.


πŸ“ž Support

If you encounter any issues or have questions:

  1. Check existing Issues
  2. Create a new issue if one doesn't already exist
  3. Contact the development team

πŸ™ Acknowledgments

  • Flutter Team for the amazing framework
  • Supabase for the backend-as-a-service
  • Firebase for AI and analytics
  • The Flutter Indonesia Community

Happy Coding! πŸš€

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages