This is a simple blog app created using Flutter and Firebase, with state management handled by GetX and following the MVC design pattern.
- User registration: Users can create an account by providing their email and password.
- User login: Users can log in to their account using their registered email and password.
- Persistent login state: The app remembers the user's login state, so they don't need to log in again after closing the app.
- Create a blog: Logged-in users can create new blog posts by providing a title, content, and optional image.
- Read blogs: Users can view all blogs created by other users.
- Update a blog: The original author of a blog can edit and update the blog post's title, content, and image.
- Delete a blog: The original author can also delete their blog post.
- Bookmark blogs: Users can bookmark their favorite blogs for later reference.
- Search Blog: User can search blogs using titles to match.
- Flutter: a UI toolkit for building natively compiled applications for mobile, web, and desktop.
- GetX: a powerful package for state management and navigation in Flutter applications.
- Firebase: a mobile and web application development platform that provides backend services and easy-to-use SDKs.
The app follows the MVC (Model-View-Controller) design pattern, where each component has a specific role:
- Model: Represents the data structures and business logic of the application.
- View: Handles the user interface, including the layout, widgets, and visual elements.
- Controller: Mediates between the model and the view, handling user input, processing data, and updating the model.
GetX is used for state management, providing reactive updates to the view whenever the model changes. It simplifies the process of managing app state, navigation, and dependency injection.
To run this app locally, follow these steps:
- Clone this repository:
https://github.com/aliasar1/Blogs-App.git
- Navigate to the project directory:
cd Blogs-App
- Ensure that you have Flutter installed on your machine. If not, follow the official Flutter installation guide: Flutter - Get Started
- Connect your device or start an emulator.
- Run the app:
flutter run
Make sure to configure Firebase in your project. Refer to the official Firebase documentation for detailed instructions on setting up Firebase with Flutter: Firebase for Flutter
Before running the app, make sure to configure the Firebase project in your Flutter app. You'll need to:
- Create a new Firebase project: Visit the Firebase Console and create a new project.
- Add google-services file which is generated.
- Enable Firebase Authentication: In the Firebase Console, navigate to the "Authentication" section and enable the desired authentication methods (e.g., email/password).
- Enable Firebase Firestore to use database service.
Contributions are welcome! If you find any bugs or have suggestions for new features, please open an issue or submit a pull request.
When contributing to this project, please follow the existing code style and conventions. Make sure to test your changes thoroughly before submitting a pull request.