@teamnhz/create-9mn-app
v1.0.22
Published
A CLI tool to generate full-stack applications with NestJS and React Native
Downloads
79
Readme
Create 9MN App
A powerful CLI tool to generate full-stack applications with NestJS backend and React Native frontend, featuring modular architecture and comprehensive feature sets.
🚀 Features
- Full-Stack Generation: Generate complete applications with backend and frontend
- Modular Architecture: Include specific modules like payments, chat, user onboarding, etc.
- Multiple Backend Options: Support for NestJS and Laravel
- Frontend Options: React Native for mobile apps and React web admin panels
- Database Support: PostgreSQL, MySQL, and MongoDB
- Dynamic Schemas: Support for custom schema definitions
- Comprehensive Templates: Production-ready code with best practices
📋 Prerequisites
- Node.js >= 16.0.0
- npm or yarn package manager
🛠️ Installation
Global Installation (Recommended)
npm install -g @teamnhz/create-9mn-appLocal Installation
npm install @teamnhz/create-9mn-app
npx create-9mn-app🎯 Usage
Basic Usage
create-9mn-app <project-name>Advanced Usage with Options
create-9mn-app <project-name> [options]📖 Command Options
| Option | Description | Default |
|--------|-------------|---------|
| -b, --backend <backend> | Backend framework (nestjs, laravel) | - |
| -f, --frontend <frontend> | Frontend framework (react-native, web-admin) | - |
| -m, --modules <modules...> | Modules to include | - |
| -a, --app-name <appName> | Application display name | - |
| -d, --project-description <description> | Project description | - |
| -i, --bundle-identifier <bundleId> | Bundle identifier for React Native | - |
| --db <database> | Database type (postgresql, mysql, mongodb) | postgresql |
| --dynamic-schemas <file> | Path to JSON file with custom schemas | - |
🏗️ Available Modules
Backend Modules (NestJS)
- user-onboarding: User registration, authentication, profile management
- payments: Payment processing with Stripe integration
- chat: Real-time messaging with Socket.IO
- push-notifications: Firebase push notification system
- logs: Application logging system
- app-logs: User activity logging
Frontend Modules
- mobile: React Native mobile application
- web-admin: React web admin panel
📝 Examples
Generate a Basic App
create-9mn-app my-appGenerate App with Specific Modules
create-9mn-app my-app --modules payments chatGenerate App with Custom Configuration
create-9mn-app my-app \
--app-name "My Awesome App" \
--project-description "A full-stack application with payments and chat" \
--bundle-identifier com.mycompany.appname \
--db mongodb \
--modules payments chat user-onboardingGenerate App with Dynamic Schemas
create-9mn-app my-app \
--dynamic-schemas ./multi-schemas.json \
--modules payments chatGenerate Specific Backend/Frontend
create-9mn-app my-app \
--backend nestjs \
--frontend react-native \
--modules payments chat🗂️ Project Structure
Generated applications follow a modular structure:
my-app/
├── backend/ # Backend application
│ ├── src/
│ │ ├── modules/ # Feature modules
│ │ ├── schemas/ # Database schemas
│ │ ├── dtos/ # Data transfer objects
│ │ ├── guards/ # Authentication guards
│ │ ├── services/ # Business logic
│ │ └── controllers/ # API endpoints
│ ├── package.json
│ └── README.md
├── frontend/ # Frontend application
│ ├── mobile/ # React Native app
│ ├── web-admin/ # React web admin
│ └── README.md
└── README.md🔧 Backend Features (NestJS)
Authentication & Authorization
- JWT-based authentication
- Role-based access control
- Project-based authentication
- Admin user management
Database Integration
- MongoDB with Mongoose ODM
- PostgreSQL with TypeORM
- MySQL with TypeORM
- Automatic migrations and seeding
API Features
- RESTful API design
- Swagger/OpenAPI documentation
- Request/response validation
- Error handling middleware
- Rate limiting
Real-time Features
- Socket.IO integration
- WebSocket connections
- Real-time messaging
- Live notifications
Payment Processing
- Stripe integration
- Payment intents and refunds
- Webhook handling
- Transaction management
Email System
- Nodemailer integration
- AWS SES support
- Email templates
- Template variables
📱 Frontend Features (React Native)
Mobile App
- React Native with TypeScript
- Navigation with React Navigation
- State management with Zustand
- API integration with Axios
- Real-time features with Socket.IO
Web Admin Panel
- React with TypeScript
- TanStack Router for routing
- Shadcn UI components
- Admin dashboard
- User management interface
🗄️ Database Support
MongoDB
- Mongoose ODM
- Schema validation
- Indexing
- Aggregation pipelines
PostgreSQL
- TypeORM integration
- Migrations
- Relations
- Transactions
MySQL
- TypeORM integration
- Migrations
- Relations
- Transactions
🔄 Dynamic Schemas
Support for custom schema definitions using JSON files:
{
"schemas": [
{
"name": "Product",
"fields": [
{
"name": "name",
"type": "string",
"required": true
},
{
"name": "price",
"type": "number",
"required": true
}
]
}
]
}🚀 Getting Started
Install the generator:
npm install -g @teamnhz/create-9mn-appGenerate your app:
create-9mn-app my-app --modules payments chatNavigate to your project:
cd my-appStart the backend:
cd backend npm install npm run start:devStart the frontend:
cd frontend/mobile npm install npx expo start
📚 Documentation
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🆘 Support
For support and questions:
- Create an issue on GitHub
- Check the documentation
- Review the examples
🔗 Links
Built with ❤️ by NHZ Team
