The method
Use this prompt when starting a new JavaScript project and unsure which framework best fits your needs. Input project details like size, features, and performance requirements. Evaluate the prompt's suggestions. Then, use the second prompt to create a basic project setup based on your framework choice.
The prompts
Prompt 1
I am starting a new JavaScript project. The project is a [type of application, e.g., single-page application, e-commerce site, data visualization dashboard]. It will involve [key features, e.g., user authentication, real-time data updates, complex UI components]. The expected scale is [small, medium, large] with an anticipated user base of [number or range]. Performance is [critical, important, not a major concern]. Consider factors such as ease of development, maintainability, community support, and performance when recommending a framework. Based on these requirements, which JavaScript framework (e.g., React, Angular, Vue.js, Svelte, Next.js, Remix) do you recommend and why? Explain the key advantages of the framework in the context of this project.
Prompt 2
Based on the recommendation for [framework name], generate the basic project setup including folder structure, necessary dependencies using [package manager, e.g., npm, yarn, pnpm], and a simple 'Hello World' component. Include the commands to install dependencies and run the application. For example, if the framework is React, use create-react-app. If it's Next.js, demonstrate how to setup the pages directory and a simple route. Ensure the instructions are clear and concise for someone new to the framework. Provide guidance on how to extend the setup for more complex features. Consider suggesting best practices for organizing components and managing state in this framework.