This is a Flutter blog application built using the BLoC pattern and Clean Architecture. The app includes features such as login, signup, displaying blogs, and adding new blogs. It uses Supabase for backend services. FpDart functional programming and GetIt is used for dependency injection.
- User Authentication (Login & Signup)
- Display Blogs
- Add New Blog
- Offline Storage with Hive
The app follows the Clean Architecture principles and is divided into three main layers:
- Presentation Layer: Contains the UI and the state management logic.
- Domain Layer: Contains the business logic and entities.
- Data Layer: Contains the data sources, repositories, and models.
lib
├── core
│ ├── constants
│ └── widgets
├── features
│ ├── auth
│ │ ├── data
│ │ │ ├── models
│ │ │ ├── repositories
│ │ │ └── datasources
│ │ ├── domain
│ │ │ └── repository
│ │ │ ├── entities
│ │ │ └── usecases
│ │ └── presentation
│ │ ├── blocs
│ │ └── screens
│ │ ├── widgets
│ ├── blog
│ │ ├── data
│ │ │ ├── models
│ │ │ ├── repositories
│ │ │ └── datasources
│ │ ├── domain
│ │ │ └── repository
│ │ │ ├── entities
│ │ │ └── usecases
│ │ └── presentation
│ │ ├── blocs
│ │ └── screens
│ │ ├── widgets
└── init_dependencies.dart
└── main.dart
- Flutter SDK
- Supabase account
-
Clone the repository:
git clone https://github.com/aliasar1/Blog-App-BLoC-Flutter.git cd Blog-App-BLoC-Flutter
-
Install dependencies:
flutter pub get
-
Setup Supabase:
- Create a new project on Supabase.
- Get the
URL
andanonKey
from the Supabase dashboard. - Replace the placeholders in the code with your Supabase credentials.
-
Run the app:
flutter run
- Thanks to Rivaan Ranawat for the tutorial on building a blog app with Flutter and Supabase.