desishub-cli
v2.2.1
Published
π A modern, beautiful CLI tool to scaffold production-ready applications across multiple frameworks. Create Node.js, Next.js, Expo, Hono, and full-stack monorepos with TypeScript, best practices, and zero configuration.
Maintainers
Readme
π DesisHub CLI
A modern CLI tool for scaffolding production-ready applications
From idea to full-stack application in 2 minutes
β¨ What is DesiHub CLI?
DesiHub CLI is a modern scaffolding tool that creates production-ready applications with zero configuration. Choose from 5 carefully crafted templates, each packed with industry best practices, modern tooling, and real-world features.
π Quick Start
# Install globally
npm install -g desishub-cli
# Create a new project
desishub new my-awesome-app
# Start developing
cd my-awesome-app
pnpm run devπ¦ Available Templates
| Template | Description | Features | Best For | | -------------------------- | ------------------------------ | ------------------------------------------- | ----------------------------------- | | ποΈ Full-Stack Monorepo | Complete development ecosystem | Next.js + Hono API + Expo + Shared Types | Enterprise apps, MVP development | | π’ Node.js + Express | Backend API with TypeScript | Prisma ORM, Sample endpoints | REST APIs, Microservices | | βοΈ Next.js 15 | Full-stack React app | 5 API routes, Frontend pages, Dashboard | Web applications, E-commerce | | π₯ Hono | Edge-optimized API | OpenAPI docs, 3 endpoints, Vercel ready | Serverless APIs, Edge computing | | π± Expo | React Native mobile app | Product listing, Dynamic routes, NativeWind | Mobile applications, Cross-platform |
ποΈ Full-Stack Monorepo (NEW!)
Complete development ecosystem with Next.js web app, Hono API, Expo mobile app, and shared TypeScript types - all in one repository.
π οΈ What's Included
- Turborepo - High-performance monorepo build system
- Next.js 15 Web App - Modern React frontend with App Router
- Hono Edge API - Ultra-fast serverless backend
- Expo Mobile App - Cross-platform React Native app
- Shared Types Package - TypeScript types across all apps
- Unified Development - Single command to run all apps
- Type Safety - End-to-end type safety across the entire stack
ποΈ Architecture
my-fullstack-app/
βββ apps/
β βββ web/ # Next.js 15 application
β βββ api/ # Hono API server
β βββ mobile/ # Expo React Native app
βββ packages/
β βββ types/ # Shared TypeScript types
βββ turbo.json # Turborepo configuration
βββ package.json # Root package.jsonπ Next.js Web App Features
- Modern React 18+ with App Router
- 5 API Routes - Products, categories, users, stats
- Frontend Pages - Home, store, product details, dashboard
- Admin Dashboard - Analytics, product management
- Tailwind CSS - Utility-first styling
- Shadcn/ui Components - Beautiful, accessible UI
- React Query - Powerful data fetching and caching
- Infinite Scroll - Seamless product loading
- SEO Optimized - Meta tags and performance
π₯ Hono API Features
- Edge Runtime - Optimized for Vercel/Cloudflare
- OpenAPI Documentation - Interactive API docs with Scalar
- Type-Safe Routes - Full TypeScript integration
- Zod Validation - Schema validation for all endpoints
- Authentication - API key-based auth system
- High Performance - Ultra-fast cold starts
- Database Integration - Prisma ORM support
π± Expo Mobile App Features
- React Native - Cross-platform mobile development
- Expo SDK - Latest managed workflow
- NativeWind - Tailwind CSS for React Native
- Tab Navigation - Beautiful bottom tab navigation
- Product Screens - List, detail, and category pages
- React Query - Consistent data fetching with web app
- Pull to Refresh - Native mobile interactions
- Offline Support - Basic offline functionality
π Shared Types Package
- Single Source of Truth - Types defined once, used everywhere
- Zod Schemas - Runtime validation across all apps
- Auto-sync - Type changes automatically propagate
- API Contracts - Consistent data shapes across frontend and backend
β‘ Development Experience
# Start all apps simultaneously
pnpm dev
# Run individual apps
pnpm dev --filter=web # Next.js on :3000
pnpm dev --filter=api # Hono API on :3001
pnpm dev --filter=mobile # Expo mobile app
# Build all apps
pnpm build
# Type checking across all apps
pnpm type-checkπ§ Type Safety Example
// Shared type definition (packages/types/src/products.schema.ts)
export const ProductSchema = z.object({
id: z.string(),
name: z.string().min(1, "Product name is required"),
price: z.number().positive("Price must be positive"),
image: z.string().url().optional(),
});
export type Product = z.infer<typeof ProductSchema>;
// Usage in Hono API (apps/api/src/routes/products.ts)
import { ProductSchema, CreateProductSchema } from "@repo/types/products";
app.post("/products", async (c) => {
const body = await c.req.json();
const validatedData = CreateProductSchema.parse(body);
// Fully type-safe API logic
});
// Usage in Next.js (apps/web/src/app/api/products/route.ts)
import { Product, ProductSchema } from "@repo/types/products";
export async function GET(): Promise<Product[]> {
// Type-safe API route
}
// Usage in Expo (apps/mobile/src/hooks/useProducts.ts)
import { Product } from "@repo/types/products";
export const useProducts = (): Product[] => {
// Type-safe mobile data fetching
};π Getting Started
# Create new monorepo
desishub new my-fullstack-app --template monorepo
cd my-fullstack-app
# Install dependencies
pnpm install
# Start all apps
pnpm devπ Access Your Apps
- Web App: http://localhost:3000
- API: http://localhost:3001
- API Docs: http://localhost:3001/docs
- Mobile: Follow Expo CLI instructions
π± Mobile Development
# Start Expo development server
pnpm dev --filter=mobile
# Run on iOS simulator
pnpm mobile ios
# Run on Android emulator
pnpm mobile android
# Run on web
pnpm mobile webπ― Perfect For
- MVP Development - Get all platforms running quickly
- Enterprise Applications - Scalable monorepo architecture
- Team Development - Shared types prevent API mismatches
- Full-Stack Projects - Single repository for all code
- Type-Safe Development - End-to-end TypeScript safety
π’ Node.js + Express + TypeScript
Enterprise-grade backend API with modern tooling and best practices.
π οΈ What's Included
- TypeScript - Fully configured with strict mode
- Express.js - Fast, minimalist web framework
- Prisma ORM - Type-safe database client
- Sample Endpoints - Ready-to-use API structure
- ESLint & Prettier - Code quality and formatting
- Environment Configuration -
.envsetup with validation
π Project Structure
my-express-app/
βββ src/
β βββ routes/ # API route handlers
β βββ middleware/ # Custom middleware
β βββ utils/ # Utility functions
β βββ index.ts # Application entry point
βββ prisma/
β βββ schema.prisma # Database schema
βββ .env.example # Environment variables template
βββ package.jsonπ Getting Started
desishub new my-api --template nodejs
cd my-api
npm run devβοΈ Next.js 15 Full-Stack Application
Complete e-commerce application with frontend, API routes, and admin dashboard.
π οΈ What's Included
- Next.js 15 - Latest React framework with App Router
- TypeScript - Full type safety across the application
- React Query - Powerful data fetching and caching
- Tailwind CSS - Utility-first styling
- Shadcn/ui - Beautiful, accessible components
π Frontend Pages
- Home Page - Landing page with featured content
- Store Page - Product catalog with filtering
- Product Detail - Individual product pages
- Category Detail - Category-specific product listings
πͺ Dashboard Pages
- Analytics Dashboard - Stats and metrics overview
- Products Table - Manage products with CRUD operations
- Categories Table - Category management interface
π API Routes (5 Endpoints)
GET /api/categories # List all categories
GET /api/categories/[id] # Single category
GET /api/products # List products (with infinite scroll)
GET /api/products/[id] # Single product
GET /api/stats # Dashboard statisticsβ‘ Advanced Features
- Infinite Scroll - Seamless product loading
- Data Fetching - Optimized with React Query
- Responsive Design - Mobile-first approach
- SEO Optimized - Meta tags and structured data
- Performance - Image optimization and lazy loading
π Project Structure
my-nextjs-app/
βββ src/
β βββ app/
β β βββ (dashboard)/ # Dashboard routes
β β βββ (store)/ # Store routes
β β βββ api/ # API route handlers
β β βββ page.tsx # Home page
β βββ components/
β β βββ ui/ # Shadcn/ui components
β β βββ dashboard/ # Dashboard components
β β βββ store/ # Store components
β βββ lib/ # Utilities and configurations
β βββ hooks/ # Custom React hooks
βββ package.jsonπ Getting Started
desishub new my-store --template nextjs
cd my-store
npm run devπ₯ Hono Edge API
Ultra-fast serverless API with OpenAPI documentation and best practices.
π οΈ What's Included
- Hono.js - Ultra-fast edge framework
- TypeScript - Full type safety
- Scalar Docs - Beautiful OpenAPI documentation
- Zod Validation - Schema validation for all endpoints
- Prisma ORM - Database integration
- Pino Logger - High-performance logging
- Vercel Ready - Zero-config deployment
π API Endpoints (3 Endpoints)
GET /api/products # List products with pagination
POST /api/products # Create new product
GET /api/products/:id # Get single product
GET /api/api-keys # List API keys
POST /api/api-keys # Generate new API key
DELETE /api/api-keys/:id # Revoke API key
GET /api/users # List users
POST /api/users # Create user
GET /api/users/:id # Get user profileπ API Documentation
- Interactive Docs - Scalar-powered OpenAPI interface
- Schema Validation - Zod schemas for all requests/responses
- Type Safety - Full TypeScript integration
- Authentication - API key-based auth system
β‘ Performance Features
- Edge Optimized - Runs on Cloudflare Workers/Vercel Edge
- Serverless - Pay per request, scales to zero
- Fast Cold Starts - Optimized for edge runtime
- Caching - Built-in response caching
π§ Development Features
- Strict ESLint - Tight rules for code quality
- Best Practices - Industry-standard patterns
- Error Handling - Comprehensive error responses
- Request Logging - Structured logging with Pino
π Project Structure
my-hono-api/
βββ src/
β βββ routes/
β β βββ products.ts # Product endpoints
β β βββ api-keys.ts # API key management
β β βββ users.ts # User endpoints
β βββ middleware/ # Authentication & logging
β βββ lib/
β β βββ db.ts # Database connection
β β βββ logger.ts # Pino logger setup
β β βββ validation.ts # Zod schemas
β βββ index.ts # Application entry
βββ prisma/
β βββ schema.prisma # Database schema
βββ vercel.json # Vercel deployment configπ Getting Started
desishub new my-edge-api --template hono
cd my-edge-api
npm run devπ Deployment
# Deploy to Vercel (zero config)
# Push your code to git and deploy on vercelπ± Expo React Native App
Cross-platform mobile application with modern navigation and styling.
π οΈ What's Included
- Expo SDK - Latest Expo with managed workflow
- TypeScript - Full type safety for mobile development
- React Query - Data fetching and state management
- NativeWind - Tailwind CSS for React Native
- Expo Icons - Comprehensive icon library
- Tab Navigation - Beautiful bottom tab navigation
π± Screens & Navigation
- Product Listing Screen - Grid/list view of products
- Product Detail Screen - Detailed product information
- Dynamic Routes - Parameter-based navigation
- Tab Navigation - Home, Products, Profile tabs
- Stack Navigation - Nested navigation structure
β‘ Features
- Infinite Scroll - Seamless product loading
- Pull to Refresh - Native refresh functionality
- Image Optimization - Lazy loading and caching
- Responsive Design - Adapts to different screen sizes
- Offline Support - Basic offline functionality with React Query
π¨ UI/UX
- NativeWind Styling - Tailwind CSS classes for React Native
- Custom Components - Reusable UI components
- Loading States - Skeleton screens and spinners
- Error Handling - User-friendly error messages
- Animations - Smooth transitions and micro-interactions
π Project Structure
my-expo-app/
βββ src/
β βββ screens/
β β βββ ProductListScreen.tsx
β β βββ ProductDetailScreen.tsx
β β βββ HomeScreen.tsx
β βββ components/
β β βββ ProductCard.tsx
β β βββ LoadingSpinner.tsx
β β βββ ErrorMessage.tsx
β βββ navigation/
β β βββ TabNavigator.tsx
β β βββ StackNavigator.tsx
β βββ hooks/
β β βββ useProducts.ts
β β βββ useProduct.ts
β βββ services/
β β βββ api.ts
β βββ types/
β βββ index.ts
βββ assets/ # Images, fonts, icons
βββ app.json # Expo configurationπ Getting Started
desishub new my-mobile-app --template expo
cd my-mobile-app
npm run startπ± Development
# Start development server
npm run start
# Run on iOS simulator
npm run ios
# Run on Android emulator
npm run android
# Run on web
npm run webπ Available Scripts
npm run start- Start Expo development servernpm run ios- Run on iOS simulatornpm run android- Run on Android emulatornpm run web- Run on web browsernpm run build- Build for productionnpm run lint- Run ESLint
π¦ Building for Production
# Build for iOS
npx eas build --platform ios
# Build for Android
npx eas build --platform android
# Submit to app stores
npx eas submitπ οΈ CLI Commands
Create Project
# Interactive mode
desishub new my-project
# Specify template
desishub new my-monorepo --template monorepo # Full-stack monorepo
desishub new my-api --template nodejs # Node.js + Express
desishub new my-app --template nextjs # Next.js 15
desishub new my-edge-api --template hono # Hono Edge API
desishub new my-mobile-app --template expo # Expo React NativeList Templates
# Show all available templates
desishub list
# or
desishub lsGet Help
# General help
desishub --help
# Command-specific help
desishub new --helpVersion
# Check CLI version
desishub --versionπ§ Requirements
- Node.js >= 16.0.0
- pnpm >= 8.0.0 (recommended for monorepo)
- npm >= 8.0.0
- Git (for repository initialization)
Optional Dependencies
- PostgreSQL (for Prisma-based templates)
- Vercel CLI (for Hono deployment)
- Expo CLI (for mobile development)
π Development Workflow
1. Install CLI
npm install -g desishub-cli2. Create Project
# For full-stack development
desishub new my-project --template monorepo
# For specific platform
desishub new my-project --template nextjs3. Start Development
cd my-project
# Monorepo: Start all apps
pnpm dev
# Single app: Start development server
npm run dev4. Build & Deploy
# Monorepo: Build all apps
pnpm build
# Single app: Build for production
npm run buildπ― Template Comparison
| Feature | Monorepo | Node.js | Next.js | Hono | Expo | | --------------------- | -------- | ------- | ------- | ---- | ---- | | Web Frontend | β | β | β | β | β | | API Backend | β | β | β | β | β | | Mobile App | β | β | β | β | β | | Shared Types | β | β | β | β | β | | TypeScript | β | β | β | β | β | | Database (Prisma) | β | β | β | β | β | | Authentication | β | β | β | β | β | | OpenAPI Docs | β | β | β | β | β | | Edge Deployment | β | β | β | β | β | | Monorepo Build | β | β | β | β | β |
π€ Contributing
We welcome contributions! Here's how you can help:
Adding New Templates
- Fork the repository
- Create a new template repository
- Add template configuration to
index.js - Update documentation
- Submit a pull request
Reporting Issues
- Use GitHub Issues for bug reports
- Provide minimal reproduction steps
- Include CLI version and environment details
Feature Requests
- Open a GitHub Discussion
- Describe the use case and expected behavior
- Community feedback helps prioritize features
π Roadmap
v2.2 (Current Release)
- [x] Full-Stack Monorepo template
- [x] Shared types across all apps
- [x] Turborepo integration
- [x] Enhanced mobile app features
v2.3 (Next Release)
- [ ] Laravel template
- [ ] Django template
- [ ] VS Code extension
- [ ] Template customization options
v2.4 (Future)
- [ ] Clerk authentication integration
- [ ] Database seeding utilities
- [ ] CI/CD pipeline templates
- [ ] Docker integration
v3.0 (Long-term)
- [ ] GUI interface
- [ ] Template marketplace
- [ ] Team collaboration features
- [ ] Enterprise features
π Troubleshooting
Common Issues
CLI command not found
# Reinstall globally
npm uninstall -g desishub-cli
npm install -g desishub-cliPermission errors
# On macOS/Linux
sudo npm install -g desishub-cli
# Or use npx
npx desishub-cli new my-projectMonorepo pnpm issues
# Install pnpm globally
npm install -g pnpm
# Clear pnpm cache
pnpm store pruneGit clone failures
- Check internet connection
- Verify GitHub access
- Try again with VPN if behind firewall
Dependency installation fails
- Clear npm cache:
npm cache clean --force - Clear pnpm cache:
pnpm store prune - Check Node.js version compatibility
Monorepo Specific Issues
Types not found across apps
# Rebuild types package
pnpm build --filter=@repo/types
# Restart TypeScript server in your IDETurborepo cache issues
# Clear turbo cache
pnpm turbo clean
# Force rebuild
pnpm build --forceπ Support
- Documentation: This README
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: [email protected]
π License
MIT License - see LICENSE file for details.
π Acknowledgments
- Turborepo team for the excellent monorepo tooling
- Next.js team for the amazing framework
- Hono.js team for the fast edge framework
- Expo team for mobile development tools
- Prisma team for the excellent ORM
- All contributors who help improve this project
Built with β€οΈ by JB WEB DEVELOPER
β Star on GitHub β’ π¦ Follow on Twitter β’ πΌ Connect on LinkedIn
Happy coding! π
