CLI tool to scaffold React/Next.js projects with DDD, Clean Architecture, and Atomic Design patterns
npm install @daawoonkim/create-arch-app


!Status


š Language: English | ķźµģ“
An interactive CLI tool to create React/Next.js projects with DDD, Clean Architecture, and Atomic Design patterns.
š¦ npm: https://www.npmjs.com/package/@daawoonkim/create-arch-app
š CHANGELOG: English | ķźµģ“
> ā ļø Currently in MVP (Minimum Viable Product) stage. Core features are working, but actively developing and accepting feedback. Please report issues or suggestions on GitHub Issues!
⨠4 Architecture Patterns
- DDD (Domain-Driven Design)
- Clean Architecture
- Atomic Design
- Default (simple structure)
š Framework Options
- React (with Vite)
- Next.js (App Router / Pages Router)
š TypeScript by Default
šØ Styling Options
- Tailwind CSS
- CSS Modules
š API Integration
- HTTP Clients: Axios, Fetch API
- Data Fetching: TanStack Query (React Query), SWR
š¦ Optional Libraries
- State Management: Zustand, Context API
- Forms: React Hook Form
- Testing: Vitest + Testing Library
``bashCreate project in a new directory
npx @daawoonkim/create-arch-app my-app
$3
`bash
npm install -g @daawoonkim/create-arch-appCreate project in a new directory
create-arch-app my-appCreate in current directory
create-arch-app .
`> Note: When using current directory (
.), the directory must be empty.$3
When you run the CLI, you'll answer these questions:
1. Framework: React or Next.js
2. Next.js Version (Next.js only): Latest (recommended), 15.x, 14.x, 13.x
3. Router (Next.js only): App Router (recommended) or Pages Router
4. Architecture Pattern: DDD, Clean, Atomic, Default
5. Styling: Tailwind CSS or CSS Modules
6. State Management: Zustand, Context API, None
7. Form Library: React Hook Form or None
8. HTTP Client: Axios, Fetch API, None
9. Data Fetching: TanStack Query (React Query), SWR, None
10. Testing: Include Vitest + Testing Library
Example Usage
`bash
npx @daawoonkim/create-arch-app my-enterprise-appInteractive prompts
? Select framework: Next.js
? Select Next.js version: Latest (Recommended)
? Select Next.js router: App Router (Recommended)
? Select architecture pattern: DDD (Domain-Driven Design)
? Select styling tool: Tailwind CSS
? Select state management: Zustand
? Select form library: React Hook Form
? Select HTTP client: Axios (Recommended)
? Select data fetching library: TanStack Query (React Query) - Recommended
? Include testing tools? Yes⨠Creating project...
š¦ Setting up TypeScript project (default)
š Using Next.js App Router
ā
Project created!
š Project successfully created!
Get started with:
cd my-enterprise-app
npm install
npm run dev
`Architecture Patterns
$3
Perfect for enterprise-grade applications.
`
domain/ # Business entities and logic
āāā entities/
āāā repositories/
āāā services/
application/ # Use cases
āāā usecases/
āāā ports/
infrastructure/ # External service integration
āāā api/
āāā persistence/
presentation/ # UI components
āāā components/
āāā pages/
`$3
Focuses on dependency rules and layer separation.
`
core/ # Business logic
āāā entities/
āāā usecases/
āāā interfaces/
features/ # Feature modules
āāā [feature]/
āāā domain/
āāā data/
āāā presentation/
shared/ # Shared components
āāā components/
āāā utils/
`$3
Optimized for UI component-driven development.
`
components/
āāā atoms/ # Smallest UI units
āāā molecules/ # Combinations of atoms
āāā organisms/ # Combinations of molecules
āāā templates/ # Page layouts
āāā pages/ # Actual pages
hooks/
utils/
`$3
Simple structure for quick start.
`
components/
hooks/
pages/ (or app/)
utils/
styles/
types/
`Generated File Structure
$3
`
my-app/
āāā src/
ā āāā [architecture folders]
ā āāā App.tsx
ā āāā main.tsx
ā āāā index.css
āāā index.html
āāā vite.config.ts
āāā tsconfig.json
āāā package.json
āāā README.md
`$3
`
my-app/
āāā src/
ā āāā app/
ā ā āāā layout.tsx
ā ā āāā page.tsx
ā ā āāā globals.css
ā āāā [architecture folders]
āāā next.config.js
āāā tsconfig.json
āāā package.json
āāā README.md
`$3
`
my-app/
āāā src/
ā āāā pages/
ā ā āāā _app.tsx
ā ā āāā _document.tsx
ā ā āāā index.tsx
ā āāā styles/
ā ā āāā globals.css
ā āāā [architecture folders]
āāā next.config.js
āāā tsconfig.json
āāā package.json
āāā README.md
`Requirements
- Node.js 18.0.0 or higher
Version History
$3
Major Updates:
- ā
API library integration (Axios, Fetch API, TanStack Query, SWR)
- ā
Architecture-specific API file generation
- ā
Improved Next.js project structure (
src/ directory + absolute paths)
- ā
CI/CD automation (GitHub Actions)
- ā
Automatic npm deployment on main branch merge
- ā
Enhanced documentation (CHANGELOG, CONTRIBUTING, WORKFLOWS)See CHANGELOG.md for details.
$3
Features:
- ā
4 architecture patterns (DDD, Clean Architecture, Atomic Design, Default)
- ā
React (Vite) & Next.js (App Router / Pages Router) support
- ā
Next.js version selection (Latest, 15.x, 14.x, 13.x)
- ā
TypeScript by default
- ā
Styling: Tailwind CSS, CSS Modules
- ā
State Management: Zustand, Context API
- ā
Forms: React Hook Form
- ā
Testing: Vitest + Testing Library
- ā
Current directory creation support (
.` option)Bug reports, feature suggestions, and PRs are welcome!
See CONTRIBUTING.md for details.
MIT
daawoonkim
This project is based on modern frontend development best practices and various architectural patterns.