1.0.3 ⢠Published 4 months ago
project-structure-creator v1.0.3
Project Structure Creator
A powerful CLI tool to generate well-structured React and Next.js applications with best practices and modern tooling.
Features
- š Generate React or Next.js projects with optimal folder structure
- š¦ TypeScript/JavaScript support
- š ESLint and Prettier configuration
- š± Includes Old and Latest versions of React/Next.js
- ā”ļø Fast and interactive setup
Installation
You can use this package in several ways:
Using npx (Recommended)
npx project-structure-creator@latest
Global Installation
npm install -g project-structure-creator
- Now run following command in terminal
create-project-structure
Local Installation
npm install project-structure-creator
- Then add to your package.json scripts:
{
"scripts": {
"create": "create-project-structure"
}
}
- Run using npm
npm run create
Usage
Interactive Mode
Simply run:
npx project-structure-creator@latest
Follow the interactive prompts to:
- Choose framework (React/Next.js)
- Select TypeScript/JavaScript
- Configure ESLint
- Set up Prettier
- Choose framework version
- Name your project
Direct Mode
Specify the framework directly:
npx project-structure-creator@latest react
# or
npx project-structure-creator@latest next
Project Structure
The generated project includes:
src/
āāā components/ # Reusable UI components
ā āāā ui/ # Basic UI components (buttons, inputs)
ā āāā layout/ # Layout components (header, footer)
ā āāā shared/ # Shared/common components
ā āāā providers/ # Context providers or other providers
ā
āāā hooks/ # Custom React hooks
āāā context/ # React Context definitions
āāā store/ # State management
ā āāā slices/ # Redux/state slices
ā
āāā services/ # API and external services
āāā layouts/ # Page layout templates
āāā views/ # Page views
āāā locales/ # Localization files
ā
āāā utils/ # Utility functions
āāā lib/ # Third-party library configs
āāā config/ # App configuration files
āāā constants/ # App constants and enums
āāā types/ # TypeScript types
āāā schemas/ # Schemas for validation/data
ā
āāā assets/ # Static assets
ā āāā images/ # Image files
ā āāā icons/ # Icon files
āāā styles/ # Global styles and themes
# React-specific
āāā routes/ # Route definitions
# Additional for Next.js with App Router
āāā app/ # App router pages
ā āāā (auth)/ # Auth group routes
ā āāā (dashboard)/ # Dashboard group routes
ā āāā api/ # API routes
āāā actions/ # Server actions
# Next.js with Pages Router
āāā pages/ # Pages router
ā āāā api/ # API routes
āāā middleware.ts # Next.js middleware
Examples
Creating a React Project
npx project-structure-creator@latest react
Creating a Next.js Project
npx project-structure-creator@latest next
Support
If you encounter any issues or have questions:
- Check the GitHub Issues
- Create a new issue if your problem isn't already reported
- Join our Discord Community for real-time help
Contributing
We welcome contributions! Please see Contributing Guide for details.
Changelog
See CHANGELOG.md for release history.
License
MIT Ā© Meet5555
Contact
- GitHub: @Meet5555
- Email: bhimanimeet55555@gmail.com