Skip to content

quickcodes/flutter_shell_script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Flutter Clean Architecture (TDD) Boilerplate

A ready-to-use project structure for scalable and testable Flutter apps using Clean Architecture principles and Test-Driven Development (TDD).

📦 What’s Included

  • Architecture: Clean Architecture (Domain, Data, Presentation)
  • State Management: BLoC
  • Dependency Injection: get_it
  • Networking: Dio
  • Code Generation: Freezed, JsonSerializable
  • Testing: Unit, Bloc, and Widget Tests

🗂️ Folder Structure

lib/
├── core/
│   ├── di/
│   ├── error/
│   └── usecases/
├── features/
│   └── auth/
│       ├── data/
│       ├── domain/
│       └── presentation/
└── main.dart
.
test/
└── features/
.   └── auth/
.       ├── data/
.       ├── domain/
.       └── presentation/
    

🧪 Test Coverage Summary

  • Model Layer: UserModel JSON serialization/deserialization, equality, and factory tests
  • Repository Layer: AuthRepositoryImpl unit tests for both success and failure cases
  • Use Cases: Login use case tested for correct interaction with repository and error handling
  • BLoC: Comprehensive tests for all AuthBloc states:
    • Initial, Loading, Success, Failure transitions
    • Mocked use case integration
  • UI Tests: LoginPage widget tests:
    • Input validations
    • Form submission dispatch
    • Success and failure snackbar behaviors

⚙️ Setup Instructions

  1. Make the script executable:
    chmod +x script.sh
  2. Create your app:
    ./script.sh <your_app_name>
  3. Run tests when prompted or manually:
    flutter test
Note: This boilerplate is designed for long-term scalability, maintainability, and high test coverage from day one.
Platform Note: This script runs best on macOS/Linux. Use Git Bash or WSL on Windows.
Created with ❤️ for scalable Flutter development.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published