Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mini Social Feed

Welcome to Mini Social Feed — a Flutter demo app inspired by apps like Instagram and Twitter.
The app features a modern social feed experience with smooth scrolling, photo & video posts, offline caching, dark mode, and profile navigation.


✨ Features

  • 📱 Infinite scrolling social feed
  • 🖼️ Photo posts using Picsum images
  • 🎥 Video posts with autoplay/pause support
  • ❤️ Instant like updates (works offline too)
  • 💬 Comments bottom sheet
  • 👤 Profile page navigation
  • 🌙 Dark / Light mode toggle
  • 📦 Offline caching with Hive
  • ⚡ Smooth and optimized scrolling experience

🛠️ Tech Stack

Layer Technology
Framework Flutter 3.22+
Architecture Clean Architecture + BLoC
State Management flutter_bloc
Networking dio
Navigation go_router
Local Storage hive / hive_flutter
Media Caching cached_network_image
Video Playback video_player
Connectivity connectivity_plus

🚀 Getting Started

1. Verify Flutter Installation

Make sure Flutter 3.22+ is installed:

flutter --version

2. Clone the Repository

git clone <your-repo-url>
cd mini_social_feed

3. Create Platform Folders

flutter create .

4. Install Dependencies

flutter pub get

📱 Android Setup

Open:

android/app/src/main/AndroidManifest.xml

Add internet permission:

<uses-permission android:name="android.permission.INTERNET"/>

Also ensure:

minSdkVersion 21
targetSdkVersion 34

▶️ Run the App

Android

flutter run -d emulator-5554

iOS

flutter run -d "iPhone 15 Pro"

🧱 Project Architecture

The project follows Clean Architecture with BLoC for scalable and maintainable code.

Architecture Layers

UI Layer

Responsible for:

  • Screens
  • Widgets
  • User interactions
  • Rendering feed & profile pages

BLoC Layer

Handles:

  • Business logic
  • Events & states
  • Feed refresh
  • Infinite scrolling
  • Like toggling

Domain Layer

Contains:

  • Entities (Post, User)
  • Use cases
  • Repository contracts

Data Layer

Responsible for:

  • API calls
  • Local caching
  • DTOs/models
  • Repository implementations

📂 Data Sources

Source Purpose
JSONPlaceholder Mock users/posts
Picsum Photos Random images
Sample MP4 URLs Demo video content
Hive Offline caching

📦 Packages Used

dependencies:
  flutter_bloc:
  equatable:
  dio:
  go_router:
  hive:
  hive_flutter:
  cached_network_image:
  video_player:
  visibility_detector:
  connectivity_plus:
  timeago:

🔄 Offline Support

The app supports offline usage using Hive local storage.

Cached Data Includes:

  • Feed posts
  • Like states
  • Theme preference

When network is unavailable:

  • Cached posts are loaded automatically
  • Likes continue working locally

🎥 Video Behavior

Videos:

  • Autoplay when visible
  • Pause automatically when out of view
  • Uses visibility_detector for better performance

🌙 Theme Support

The app includes:

  • Dark Mode
  • Light Mode
  • Persistent theme preference storage

🧭 Navigation Flow

Feed Screen
   ├── Comments Bottom Sheet
   └── Profile Screen

Navigation is handled using go_router.


📐 Architecture Diagram

Figma Architecture Diagram


📌 Future Improvements

  • Real backend integration
  • Firebase authentication
  • Real-time comments
  • Push notifications
  • Story feature
  • Search & explore page
  • Upload posts/media

👨‍💻 Author

Built with Flutter using scalable architecture and modern mobile development practices.

About

A modern Flutter social media demo app featuring infinite scrolling feeds, photo & video posts, offline caching, dark mode support, and Clean Architecture with BLoC.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages