A relatively simple Node CLI, meant for bootstraping a frontend project under my usual requirements.
Opinionated, for simplicity and ease of usage.
The CLI setups a project based on the following technologies:
- React
- Next.js (with Turbo)
- TailwindCSS
- shadcn
- ESLint/Prettier
- Vitest
- Testing Library
- Cypress
- Zod
- Node.js
- TypeScript
- TSX
- Clack
- ESLint
This script was created with the intent of reducing repetition, since several projects on the market have similar overall structure, based on some key development patterns:
- SOLID;
- Composition Pattern;
- Custom Hooks;
Package manager: Pnpm is the best option due to its dependency caching, that allows package reusage between projects and saving a lot of space over time. It's very useful during testing, avoiding unnecessary bandwidth traffic.
Runtime: Bun was initially chosen for its native support of TypeScript, speed and usability. However, due to current compatibility issues with native Node.js APIs with Inquirer, Node and TSX was needed.
Node: v20.12.2
pnpm: 8.15.4
pnpm i
pnpm dev
- Move api.tsx to services.
- Add 'typography' folder to components.
- Github bots that check for updates, then open a PR. (Dependabot, Github Actions?)
- Installable npm package (once it is good enough).
https://stackoverflow.com/questions/61394928/get-user-input-through-node-js-console
https://codedamn.com/news/nodejs/how-to-get-current-directory-in-node-js
https://www.npmjs.com/package/ora#why-does-the-spinner-freeze
https://chatgpt.com/c/3014b422-2e2f-4d19-ae9f-5dc3a00ba625
https://stackoverflow.com/questions/40424298/how-to-get-os-username-in-nodejs