Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamline init Command by Removing Scaffolds Flag and Integrating Full-Stack Setup #1849

Open
chasefleming opened this issue Nov 26, 2024 · 0 comments

Comments

@chasefleming
Copy link
Member

Problem

The current init command in the Flow CLI has two separate flows: one for basic setup and another with the --scaffold flag for frontend scaffolds. These flows don’t build on each other, and scaffolds often become outdated, creating maintenance challenges. This separation complicates the user experience and leads to inconsistencies in project setup.

Description

To simplify the Flow CLI and ensure consistency, the init command should replace the scaffolds flag and integrate everything into a single, cohesive flow. The init command will handle all project setup, including core contracts, scripts, transactions, and tests. It will also include a prompt asking users if they’d like to set up a Next.js app with FCL pre-configured.

This change will ensure that:

  1. The dependency manager installation flow remains intact.
  2. Scaffolds are kept up to date as part of the main CLI development.
  3. The process is streamlined for both smart contract-level and full-stack developers.

Prompt After Running init

After running flow init, the user will see the following prompt:

Would you like to set up a Next.js app with Flow Client Library (FCL) pre-configured? [y/N]  
  • If the user selects Yes, the CLI will:

    • Add a Next.js app to the project, fully configured with FCL for easy integration with the Flow blockchain.
    • Install necessary dependencies using the system’s package manager (e.g., npm or yarn).
    • Provide clear instructions for running and customizing the app.
  • If the user selects No, the CLI will proceed with the standard setup of core contracts, scripts, transactions, and tests without adding a frontend component.

Benefits

  • Simplifies the CLI by consolidating separate flows into one.
  • Eliminates outdated scaffolds, ensuring a consistent and maintainable setup.
  • Provides an intuitive onboarding experience for full-stack developers.
  • Reduces maintenance overhead for the repo maintainers.

This approach makes the init command a one-stop solution for all Flow project setups, whether at the smart contract level or full-stack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant