Skip to content

[Feature] Introduce "App Type" option - generate real-world project templates #6

@Arjun544

Description

@Arjun544

Overview

Currently FlutterInit generates a bare-bones app with onboarding, auth, and
a blank home screen. This is not enough for developers who want to hit the
ground running on a real project.

This issue introduces a new "App Type" config option that lets users select
what kind of app they are building. FlutterInit will then generate a
fully-structured, real-world project for that app type, not just folders,
but working screens, models, and logic scaffolded for that domain.


App Type System

The appType option must be data-driven, not hardcoded. Each app type is a
self-contained template bundle that lives in templates/flutter/apps/.

New app types should be addable by simply dropping a new folder into
templates/flutter/apps/ and registering it, zero changes to the generator
core required. This makes app types a natural contribution surface for the
community.

Initial app types shipped with this feature:

  • todo - Task management app
  • ecommerce - Product listing, cart, checkout, orders
  • chat - Conversations, messages, contacts
  • fintech - Wallet, transactions, send/receive money

What Each App Type Should Generate

Todo

  • Task model (id, title, description, dueDate, isCompleted)
  • Task list screen
  • Create/edit task screen
  • Filter by status (all, active, completed)
  • Local persistence (Hive or SharedPreferences)

E-commerce

  • Product model (id, name, price, images, category)
  • Product listing screen with search & filter
  • Product detail screen
  • Cart screen
  • Checkout screen
  • Order history screen

Chat

  • Message model (id, senderId, content, timestamp, type)
  • Conversation list screen
  • Chat screen with message bubbles
  • Contact/user search screen
  • Real-time ready structure (WebSocket or Supabase Realtime hooks)

Fintech

  • Transaction model (id, amount, type, status, timestamp)
  • Wallet/balance screen
  • Transaction history screen
  • Send money screen
  • Receive money screen
  • PIN/biometric auth hook

Implementation Plan

1. Schema

  • Add appType field to app/lib/config/schema.ts
  • Update web dashboard UI to show the App Type selector
  • Pass appType flag through generator to templates

2. Templates

  • Create templates/flutter/apps/ as the root for all app bundles
  • Each app folder mirrors the standard template structure but with
    domain-specific screens, models, and logic
  • Registering a new app type should require no core generator changes

3. Generator Logic

  • Update app/lib/ generator to dynamically load the correct app
    bundle based on appType
  • Ensure all existing flags (architecture, state management, routing,
    theme) compose correctly on top of any app type

4. Quality

  • dart analyze passes with zero errors for every app type
  • Test all app types × all architectures (Clean, MVVM, Feature-First)

Metadata

Metadata

Assignees

No one assigned

    Labels

    big featureLarge scope, discuss approach in comments before opening a PRenhancementNew feature or requesttemplatesRelated to Handlebars templates in templates/flutter/

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions