Introduction
The FLEX Platform
Section titled “The FLEX Platform”FLEX is a platform and ecosystem of starter kits, packages, and tools that help you build modern, scalable and customizable eCommerce storefronts. FLEX provides an opinionated approach and starting point for creating your own commerce mobile and web apps, and allows you to focus on writing clean, productive code for an amazing user experience.
Why FLEX?
Section titled “Why FLEX?”After years of experience building enterprise eCommerce apps, we have formed an opinion on the standard packages, best practices and architecture that allow you to build and deploy amazing, large-scale mobile apps. We created FLEX with the goal of providing a platform that accelerates development, eases maintenance, and gets you live in production!
Creating a FLEX App
Section titled “Creating a FLEX App”Installing the FLEX CLI
Section titled “Installing the FLEX CLI”To use the FLEX CLI, you need to install it globally as an npm package. This allows you to run the flexcli
command from anywhere on your system.
Install the CLI globally using npm:
npm install -g flex_cli
After installation, you can verify it by running:
flexcli --version
This should print the installed version of the FLEX CLI.
Installing Flutter
Section titled “Installing Flutter”Before creating your first FLEX app, make sure you have Dart and Flutter installed on your machine.
If you don’t have Dart and Flutter installed, you can follow this guide.
Creating an App
Section titled “Creating an App”After you have installed Dart, Flutter and the FLEX CLI, you’re ready to create a new FLEX app. The FLEX CLI will prompt you to select your preferred starter kit:
flexcli new example_app
Once the app has been created, you can navigate into your new project directory:
cd example_app
How the FLEX CLI Works
Section titled “How the FLEX CLI Works”This repository contains the FLEX CLI, a command-line tool designed to streamline the creation and management of Flutter apps using Starter Kits and modular features.
- Starter Kits: When you run
flexcli new
, the CLI scaffolds a new Flutter app based on your selected starter kit. Starter kits provide a pre-configured project structure, recommended dependencies, and initial code to help you get started quickly. - Features: The CLI supports adding modular features to your app using the
flexcli add
command. Features are reusable components (such as authentication, onboarding, etc.) that follow best practices and integrate seamlessly into your project.
Adding a Feature
Section titled “Adding a Feature”To add a new feature to your FLEX app, use the following command:
flexcli add feature <feature-name>
Replace <feature-name>
with the name of the feature you want to add (for example, auth
or profile
). The CLI will generate the necessary files and update your project automatically.
Example
Section titled “Example”flexcli add feature onboarding
This will create a new feature module in your app, including the required Dart files, widgets, and state management (using Cubit if specified).
Summary of CLI Commands
Section titled “Summary of CLI Commands”flexcli new <app-name>
: Create a new Flutter app from a Starter Kit.flexcli add feature <feature-name>
: Add a new modular feature to your app.
Next Steps
Section titled “Next Steps”- Explore the generated code and project structure.
- Add more features as needed using the CLI.
- Start building your Flutter app!