orange-project-init
v0.1.0
Published
CLI to scaffold projects with Vue/Astro/React frontend and Koa/Go backend templates
Maintainers
Readme
orange-project-init
A CLI to scaffold projects with Vue/Astro/React frontend and Koa/Go backend templates.
Features
- Multiple frontend frameworks: Vue 3, Astro, React (TypeScript by default)
- Multiple backend frameworks: Koa (Node + TS), Go
- Flexible project types: Full-stack, Frontend only, Backend only
- Customizable add-ons: ESLint, Prettier, cspell
- Package manager support: npm, pnpm, bun, yarn
- Git initialization: Optional automatic git init
- Blank templates: Clean starting point without boilerplate code
Usage
npm create orange-project-init@latest
# or
pnpm create orange-project-init
# or
bun create orange-project-init
# or
yarn create orange-project-initOr with a project name directly:
npx orange-project-init my-appInteractive Prompts
The CLI guides you through the following options:
- Project name: Your project directory name
- Project type:
- Full-stack (separated frontend & backend)
- Frontend only
- Backend only
- Frontend framework (if applicable): Vue, Astro, React
- Backend framework (if applicable): Koa (Node + TS), Go
- Add-ons (multi-select): ESLint, Prettier, cspell
- Git initialization: Yes/No
- Package manager: npm, pnpm, bun, yarn
Project Structure
Frontend Only
my-app/
├── src/
├── package.json
├── vite.config.ts
└── tsconfig.jsonBackend Only
my-app/
├── src/
├── package.json
└── tsconfig.jsonFull-stack
my-app/
├── frontend/ # Selected frontend framework
├── server/ # Selected backend framework
├── .gitignore
└── (add-on configs)Templates
Templates are hosted as separate GitHub repositories:
| Template | Repository | Description | |----------|-----------|-------------| | Vue | template-vue | Vue 3 + Vite + TS + Pinia + Vue Router | | React | template-react | React + Vite + TS | | Astro | template-astro | Astro + TS | | Koa | template-koa | Koa + TS backend | | Go | template-go | Go backend |
Templates are developed in the orange-templates monorepo.
Add-ons
ESLint
Generates eslint.config.js with framework-specific rules:
- Vue:
eslint-plugin-vue - Astro:
eslint-plugin-astro - React:
@eslint-react/eslint-plugin - Backend:
typescript-eslintrecommended
Prettier
Generates .prettierrc.cjs with opinionated defaults:
- Print width: 150
- Tabs: 2 spaces
- Single quotes
- Trailing commas: ES5
- End of line: LF
cspell
Generates cspell.json for spell checking with customizable dictionary.
Development
Prerequisites
- Node.js >= 18
- npm / pnpm / bun / yarn
Setup
git clone https://github.com/aDarkMaker/orange-project-init.git
cd orange-project-init
npm installBuild
npm run buildLocal Testing
npm link
orange-project-init test-projectProject Structure
orange-project-init/
├── src/
│ ├── index.ts # CLI entry
│ ├── prompts.ts # Interactive prompts
│ ├── generate.ts # Template download & generation
│ ├── configs/ # Config file generators
│ │ ├── prettier.ts
│ │ ├── eslint.ts
│ │ ├── cspell.ts
│ │ └── gitignore.ts
│ └── utils.ts # Utilities
├── dist/ # Build output
└── package.jsonRoadmap
Planned features for future releases:
- [ ] More frontend frameworks (Svelte, Solid, Qwik)
- [ ] More backend frameworks (Express, Fastify, NestJS, Gin)
- [ ] Database templates (PostgreSQL, MongoDB, SQLite)
- [ ] Docker support
- [ ] CI/CD templates (GitHub Actions, GitLab CI)
- [ ] Monorepo support (Turborepo, Nx)
- [ ] Custom template support (user-defined templates)
- [ ] Plugin system for extensibility
Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
Adding New Templates
- Fork the orange-templates repository
- Add your template in
templates/<name>/ - Submit a pull request
- Update this README and CLI to register the new template
Template Requirements
- Must be a blank/starting template (no business logic)
- Must include
package.jsonwith__PROJECT_NAME__placeholder - Must include basic build configuration
- Should follow existing code style
License
MIT
