Repository navigation
feat(cli): improve sm new project to scaffold a complete working app - #7
Merged
Merged
Conversation
Rewrites `sm new project` to generate a fully functional project with: - Host project (Blazor SSR + Inertia.js) from template - Items starter module with API endpoint, welcome page, and tests - All root config files (slnx, package.json, biome.json, tsconfig, etc.) - NuGet package references to framework (local feed at nupkg/) - Frontend build pipeline (Vite + React + module pages) Key changes: - Add HostTemplates class for Host project file generation - Add root config templates (package.json, biome.json, tsconfig, etc.) - Make SolutionContext discover Host/Api csproj dynamically - Make framework projects packable as local NuGet packages - Source generator dynamically resolves host assembly namespace - Build targets gracefully skip when monorepo tools are missing - Register baseline auth and DefaultPublicMenuProvider in framework - Use EnsureCreated fallback when no migrations exist - Add welcome page with gradient landing design and dark mode - Add minimal CSS for Blazor layout without Tailwind compilation - Add doctor checks: ModuleAttribute, ContractsIsolation, ViewEndpoint, PagesRegistry, ViteConfig, PackageJson, NpmWorkspace - Improve sm new module with spinner, tree output, and dry-run - Improve sm new feature with React view scaffolding
antosubash
force-pushed
the
claude/strange-heyrovsky
branch
from
March 26, 2026 20:21
329368c to
925a7e1
Compare
2 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rewrites
sm new projectto generate a fully functional, runnable project from the template — instead of an empty skeleton.What
sm new project TestAppnow creates:GET /api/items), welcome landing page, and test projectsnupkg/)The generated project works out of the box:
Changes
CLI (
cli/SimpleModule.Cli/)HostTemplatesclass for Host project file generationSolutionContextdiscovers Host/Api csproj dynamicallysm new moduleimproved with spinner, tree output, dry-runsm new featureimproved with React view scaffoldingFramework
SimpleModule.Host)0.1.0-local)analyzers/dotnet/cs/AddAuthentication/AddAuthorizationregistered in infrastructureDefaultPublicMenuProviderregistered (prevents crash without Dashboard module)EnsureCreatedfallback when no migrations exist (with logging)Test plan
dotnet build— full solution (5 projects) compiles with 0 errorsdotnet test— 106 CLI tests + 2 module tests passdotnet run— app starts on HTTPS, SQLite tables auto-createdGET /— welcome page renders (gradient + nav bar, light & dark mode)GET /api/items— returns[](200 OK)GET /swagger— Swagger UI shows Items APIGET /health/live— returns "Healthy"npm install && npm run build— frontend builds (Items.pages.js + app.js)template/SimpleModule.Hoststill builds with 0 errorssm new project --dry-runshows planned files without writing🤖 Generated with Claude Code