[BUG] Custom Solid frontend scaffolding overwrites App.tsx with React code
Description
When creating a custom project with SolidStart as the selected frontend framework, Celtrix appears to overwrite the generated Solid App.tsx file with a React-specific component.
In utils/customGenerators/frontendGenerator.js, the generateFrontend() function scaffolds the selected frontend framework and then unconditionally writes the output of getFrontendAppTemplate(). However, this template contains React-specific code, including import React from 'react', regardless of the selected framework.
As a result, selecting Solid may produce a frontend component that is incompatible with the generated Solid project and may cause build or type-checking errors.
Steps to Reproduce
- Clone the Celtrix repository and install its dependencies.
- Run the CLI locally using
node index.js. - Select Custom Stack.
- Choose TypeScript as the language.
- Select SolidStart as the frontend framework.
- Complete the remaining configuration prompts and enable dependency installation.
- Inspect the generated
App.tsxfile in the frontend directory.
Expected Behavior
Celtrix should generate a valid Solid component that follows the selected framework's conventions and works with the generated project's dependencies.
Actual Behavior
The frontend generator writes a React-specific component into App.tsx, even when Solid is selected. The generated component may therefore be incompatible with the Solid project.
Proposed Solution
Make frontend starter-component generation framework-aware. Preserve the framework's generated component or generate a valid Solid component when Solid is selected, while keeping the existing React scaffolding behavior unchanged.
Relevant File
utils/customGenerators/frontendGenerator.js
The generateFrontend() function unconditionally calls getFrontendAppTemplate() after scaffolding the selected frontend framework.
Description
When creating a custom project with SolidStart as the selected frontend framework, Celtrix appears to overwrite the generated Solid
App.tsxfile with a React-specific component.In
utils/customGenerators/frontendGenerator.js, thegenerateFrontend()function scaffolds the selected frontend framework and then unconditionally writes the output ofgetFrontendAppTemplate(). However, this template contains React-specific code, includingimport React from 'react', regardless of the selected framework.As a result, selecting Solid may produce a frontend component that is incompatible with the generated Solid project and may cause build or type-checking errors.
Steps to Reproduce
- Clone the Celtrix repository and install its dependencies.
- Run the CLI locally using
node index.js.- Select Custom Stack.
- Choose TypeScript as the language.
- Select SolidStart as the frontend framework.
- Complete the remaining configuration prompts and enable dependency installation.
- Inspect the generated
App.tsxfile in the frontend directory.Expected Behavior
Celtrix should generate a valid Solid component that follows the selected framework's conventions and works with the generated project's dependencies.
Actual Behavior
The frontend generator writes a React-specific component into
App.tsx, even when Solid is selected. The generated component may therefore be incompatible with the Solid project.Proposed Solution
Make frontend starter-component generation framework-aware. Preserve the framework's generated component or generate a valid Solid component when Solid is selected, while keeping the existing React scaffolding behavior unchanged.
Relevant File
utils/customGenerators/frontendGenerator.jsThe
generateFrontend()function unconditionally callsgetFrontendAppTemplate()after scaffolding the selected frontend framework.
Nice Catch. Would u like to work on this issue ? @Nikhil1869
Thanks, Joe! Yes, I'd love to work on this issue