Celtrix icon indicating copy to clipboard operation
Celtrix copied to clipboard

[BUG] Custom Solid frontend scaffolding overwrites App.tsx with React code

Open Nikhil1869 opened this issue 1 month ago • 2 comments

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

  1. Clone the Celtrix repository and install its dependencies.
  2. Run the CLI locally using node index.js.
  3. Select Custom Stack.
  4. Choose TypeScript as the language.
  5. Select SolidStart as the frontend framework.
  6. Complete the remaining configuration prompts and enable dependency installation.
  7. Inspect the generated App.tsx file 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.

Nikhil1869 avatar Oct 15 '26 12:10 Nikhil1869

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

  1. Clone the Celtrix repository and install its dependencies.
  2. Run the CLI locally using node index.js.
  3. Select Custom Stack.
  4. Choose TypeScript as the language.
  5. Select SolidStart as the frontend framework.
  6. Complete the remaining configuration prompts and enable dependency installation.
  7. Inspect the generated App.tsx file 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.

Nice Catch. Would u like to work on this issue ? @Nikhil1869

JoeCelaster avatar Oct 15 '26 12:10 JoeCelaster

Thanks, Joe! Yes, I'd love to work on this issue

Nikhil1869 avatar Oct 15 '26 12:10 Nikhil1869