From 78d51563cad562f188c61dba4738a1eb690e8558 Mon Sep 17 00:00:00 2001 From: Carlos Date: Tue, 1 Jul 2025 23:05:31 -0400 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20add=20strategic=20CLI=20enh?= =?UTF-8?q?ancements=20and=20ecosystem=20growth=20roadmap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TODO.md | 48 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 6 deletions(-) diff --git a/TODO.md b/TODO.md index 54e5139..ad9f022 100644 --- a/TODO.md +++ b/TODO.md @@ -46,20 +46,37 @@ - `npm run start` โ†’ `vite` - `npm run build` โ†’ `vite build` +### ๐Ÿ”ง CLI Engine & Language +- [ ] ๐Ÿ”ง **TypeScript Core Logic**: Extract core CLI logic into TypeScript for better typing, editor support, and DX while keeping entrypoints in JS for simplicity and npx support. +- [ ] ๐Ÿ”ง **Multi-Language Plugin Support**: Allow plugins or commands to be authored in other languages (e.g., JSON/YAML configs or .ts generators). +- [ ] โšก **Fast CLI Performance**: Ensure the CLI runs fast even without a build step (no ts-node dependency unless explicitly supported). +- [ ] ๐ŸŽฏ **Internal TS, External JS**: Keep CLI entrypoints in JS for simplicity + npx support, but use internal core logic in TS for maintainability. + ### ๐ŸŽจ Enhanced UI & Styling - [ ] ๐ŸŽจ **Implement CSS Modules Logic**: Add support for CSS Modules, styled-components, and emotion based on user selection. - [ ] ๐ŸŽฏ **UI Framework Integration**: Create actual component templates and setup for Ant Design, Material UI, Chakra UI, and Radix UI. - [ ] ๐ŸŽจ **Dynamic Style Generation**: Generate appropriate style files and imports based on user's styling choice. +### ๐Ÿ“ฆ Ecosystem Growth +- [ ] ๐ŸŽจ **Additional UI Libraries**: Add support for: + - โœ… Tailwind CSS + - โœ… ShadCN UI + - โœ… TanStack Router + - โœ… TanStack Query +- [ ] ๐Ÿ” **Authentication Setup**: Add auth flag or plugin (e.g., setup NextAuth/Auth0 template) +- [ ] ๐Ÿ“š **Starter Templates**: Create example templates under `examples/`: + - `crafter-blog` - Blog template + - `crafter-dashboard` - Dashboard template + - `crafter-admin` - Admin panel template + ### ๐Ÿงช Comprehensive Testing -- [ ] ๐Ÿงช **Expand Testing Framework Support**: Add support for: - - โœ… Jest (unit testing) - - โœ… Cypress (E2E testing) - - โœ… Playwright (E2E testing) - - โœ… Vitest (unit testing) - - โœ… None +- [ ] ๐Ÿงช **Testing Framework Separation**: Split testing choices into: + - โœ… **Unit Testing**: Jest, Vitest + - โœ… **E2E Testing**: Cypress, Playwright + - โœ… **None**: Allow skipping testing setup entirely - [ ] ๐Ÿงช **Test Configuration**: Generate proper Jest/Vitest config files and sample tests. - [ ] ๐Ÿงช **Selective Package Installation**: Only install test packages for the selected framework. +- [ ] ๐Ÿงช **Sample Component Tests**: Add sample tests for generated components to demonstrate testing patterns. ### ๐Ÿ—ƒ๏ธ State Management - [ ] ๐Ÿ” **Fix Redux TypeScript Support**: Ensure Redux store and slices are properly typed when TypeScript is selected. @@ -92,6 +109,12 @@ ``` - [ ] ๐Ÿ“ฆ **Plugin System**: Add a plugin system for optional features like Auth, Firebase, CI setup, etc. +### ๐Ÿงฑ Architecture + Filesystem +- [ ] ๐Ÿ—๏ธ **Folder Structure Consistency**: Improve folder structure consistency across generated projects. +- [ ] ๐Ÿ”ง **Environment Setup**: Add optional .env setup with common environment variables. +- [ ] ๐Ÿ“ **Default Folders**: Add utils, hooks, and services folders by default (optionally toggle). +- [ ] ๐ŸŽฏ **Project Layout Options**: Let users choose between "Feature-based" vs "Layer-based" project layout. + ### ๐Ÿ“š Documentation & Community - [ ] ๐Ÿ“œ **Dynamic README Generation**: Generate project-specific README based on selected stack. - [ ] ๐Ÿš€ **Demo Repository**: Create a demo repo using react-crafter to showcase production-quality setup. @@ -101,6 +124,12 @@ - awesome-nodejs - Reddit /r/reactjs or Hacker News +### ๐Ÿš€ CLI UX Enhancements +- [ ] โš™๏ธ **Global Configuration**: Support global config file (`~/.reactcrafterrc` or `crafter.config.js`) to remember default stack preferences. +- [ ] ๐Ÿ‘€ **Dry Run Mode**: Add `--dry-run` mode for previewing what files or packages would be created. +- [ ] ๐Ÿ”‡ **Silent & Debug Modes**: Add `--silent` and `--debug` modes for different verbosity levels. +- [ ] ๐Ÿ” **Git Auto-Detection**: Auto-detect if Git repo is missing, and offer to run `git init`. + ### ๐Ÿ› ๏ธ CLI Generator Commands - [ ] ๐Ÿงฉ **Component Generator**: Create a CLI subcommand `g` or `generate` for structured file generation: ```bash @@ -149,6 +178,13 @@ - Add `g context` or `g hook` generators - Use template strings or external files to allow community-generated scaffolds +### ๐Ÿ”Œ Advanced Generators +- [ ] ๐Ÿช **Hook Generator**: `react-crafter g hook useAuth` - Generate custom React hooks +- [ ] ๐Ÿงฉ **Context Generator**: `react-crafter g context ThemeContext` - Generate React contexts +- [ ] ๐Ÿ“„ **Page Generator**: `react-crafter g page Home` - Generate page components +- [ ] ๐Ÿ›ฃ๏ธ **Route Generator**: `react-crafter g route /dashboard` - Generate route configurations +- [ ] ๐ŸŽจ **Customizable Templates**: Make generator templates customizable via `templates/` folder + ### ๐Ÿ” Code Analysis Findings Based on my analysis of the codebase, here are the specific technical issues found: