npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

flutter-clean-cli

v1.0.6

Published

CLI to scaffold Flutter projects with clean architecture — BLoC, injectable, freezed, FCM

Downloads

384

Readme

flutter-arch-gen

CLI to scaffold Flutter projects with clean architecture — shared API, BLoC, injectable, freezed.

No files to copy. No git. No cloud. Just install once and use anywhere.


Install

# Global install (recommended)
npm install -g flutter-arch-gen

# Or use without installing via npx
npx flutter-arch-gen setup

Usage

1. Setup a new Flutter project

flutter create my_new_app
cd my_new_app
flutter-arch-gen setup

That's it. One command does everything:

| Step | Action | |------|--------| | 1 | Creates all folders (shared, features, assets) | | 2 | Writes all template files with correct package imports | | 3 | Updates pubspec.yaml (deps + fonts + assets) | | 4 | Runs flutter pub get | | 5 | Runs build_runner (freezed · injectable · json_serializable) |


2. Add a new feature

Run from inside your Flutter project:

flutter-arch-gen feature auth
flutter-arch-gen feature user_profile
flutter-arch-gen feature dashboard

Generates full clean architecture for the feature:

lib/features/auth/
├── domain/
│   ├── models/        auth_response.dart      (freezed model)
│   ├── repositories/  auth_repository.dart    (abstract interface)
│   └── services/      auth_service.dart       (implements repo)
├── bloc/
│   ├── auth_bloc.dart
│   ├── auth_event.dart
│   └── auth_state.dart
└── screen/
    └── auth_screen.dart

What gets generated by setup

lib/
├── firebase_options.dart
├── main.dart
├── Injectable/
│   ├── injection.dart
│   └── injection.config.dart
├── shared/
│   ├── api/
│   │   ├── endpoint/        api_endpoints.dart
│   │   └── network/         network.dart, env_config.dart,
│   │                        api_exceptions.dart, connectivity_cubit/
│   ├── bloc_observer/       app_bloc_observer.dart
│   ├── constants/           colors.dart, result.dart
│   ├── helper/enum/         api_fetch_status.dart
│   ├── routes/              routes.dart, route_generator.dart, navigator.dart
│   ├── themes/              app_theme.dart, font_palette.dart (Manrope)
│   ├── utils/auth/          auth_utils.dart
│   └── widget/              appbar, buttons, text_fields, loading,
│                            padding, and 13 stub widgets
└── features/
    └── home/                Full working home feature as reference pattern
        ├── bloc/
        ├── dashboard/
        │   ├── models/
        │   ├── repositories/
        │   └── services/
        └── view/

assets/
├── fonts/     (Manrope declared — add .ttf files)
├── icons/
├── images/
└── animations/

pubspec.yaml dependencies injected

dependencies:
  freezed_annotation: ^2.4.4
  json_annotation: ^4.9.0
  get_it: ^9.0.5
  injectable: ^2.6.0
  dio: ^5.7.0
  connectivity_plus: ^6.1.1
  flutter_bloc: ^8.1.6
  firebase_core: ^3.8.1
  shared_preferences: ^2.3.3

dev_dependencies:
  build_runner: ^2.4.13
  freezed: ^2.5.7
  json_serializable: ^6.9.5
  injectable_generator: ^2.7.0

After setup — checklist

  • Copy Manrope .ttf fonts into assets/fonts/
  • Update lib/firebase_options.dart with your Firebase config
  • Fill in lib/shared/routes/ files

Architecture pattern (per feature)

domain/models/        → Freezed data model (fromJson)
domain/repositories/  → Abstract interface (contract)
domain/services/      → Implements repository using Dio
bloc/                 → BLoC: event → state (freezed)
screen/               → UI: BlocProvider + BlocBuilder

HomeRepository is abstract. HomeService implements it and is registered via @LazySingleton(as: HomeRepository). GetIt resolves it automatically.


License

MIT