A cross-platform blog management client built with Flutter, Provider (MVVM), Dio, and JSON serialization, designed for Android and iOS devices.
This app allows users to register, authenticate, view blog posts, and create/update/delete their own posts. It follows clean architectural patterns with proper state management and secure token storage.
The Flutter BlogPost App is the Flutter version of our previously built React Native blog system. It is connected to a Spring Boot backend that provides authentication, authorization, blog CRUD operations, and ownership logic.
The goal of this project is to demonstrate:
- A clean Flutter architecture (MVVM + Provider)
- Real-world networking with Dio
- Token handling with flutter_secure_storage
- JSON model generation with json_serializable
- Writing maintainable UI + Unit Tests
This is a perfect small-scale mobile app example for learning Flutter or showcasing production-quality structuring.
- Register
- Login
- Server-issued access & refresh tokens
- Tokens stored securely on the device
- Auto login if token exists
- View all blogs
- Create a blog post
- Edit a blog post (only if owner/co-owner)
- Delete a blog post
- Automatic UI updates (Provider)
- Secure token storage using
flutter_secure_storage
- Built with
dio - Clean API Client layer
- Repository pattern
The backend is a Spring Boot REST API, hosted on Render.
Render servers may sleep after ~45 minutes of inactivity.
To wake up the backend before using the app:
👉 Open this link in a browser:
https://blogpostspringboot.onrender.com/api/blogs
Once active, the Flutter app will work normally.
| iOS | Android |
|---|---|
Login Screen (iOS) |
Login Screen (Android) |
Register Screen (iOS) |
Register Screen (Android) |
| iOS | Android |
|---|---|
Home Screen (iOS) |
Home Screen (Android) |
Frontend (this app):
- Flutter 3.x
- Provider (MVVM State Management)
- Dio (HTTP Networking)
- Flutter Secure Storage
- JSON Serializable + Build Runner
Backend:
- Spring Boot REST API
- JWT Authentication
- Render Hosting
git clone https://github.com/shuvojoseph/BlogPostFlutter.git
cd blog_postflutter pub getopen -a Simulator
flutter runflutter emulators --launch Pixel_9_Pro
flutter runflutter testflutter test test/viewmodels/auth_viewmodel_test.dartWe use these command to generate mocked classes:
flutter pub run build_runner buildMocks are located in:
/test/mocks/mock_classes.dart
/test/mocks/mock_classes.mocks.dart
lib/
│
├── core/
│ ├── network/api_client.dart
│ ├── storage/secure_storage_service.dart
│ └── models/
│ ├── blog.dart
│ ├── blog.g.dart
│ ├── user.dart
│ └── user.g.dart
│
├── data/
│ └── repositories/
│ ├── auth_repository.dart
│ └── blog_repository.dart
│
├── viewmodels/
│ ├── auth_viewmodel.dart
│ ├── dashboard_viewmodel.dart
│ └── blog_form_viewmodel.dart
│
├── ui/
│ └── views/
│ ├── login_view.dart
│ ├── register_view.dart
│ ├── dashboard_view.dart
│ └── blog_form_view.dart
│
└── main.dart
This project is open-source under the MIT License.





