CLI to create TypeScript Express MongoDB GraphQL API projects
npm install @untools/starterA powerful CLI tool to scaffold production-ready TypeScript projects with GraphQL, Express, MongoDB, and Next.js.



@untools/starter helps you jump-start development by quickly scaffolding fully-configured TypeScript projects with modern stack technologies. Choose between:
- API: Robust GraphQL API powered by Express and MongoDB
- Frontend: Feature-rich Next.js frontend with authentication and GraphQL client
- Fullstack: Integrated API and frontend combo with preconfigured connections
Skip the hours of project setup and dive straight into building what matters.
- TypeScript: Full type safety with modern TypeScript configuration
- Express & Apollo Server: Industry-standard GraphQL server setup
- MongoDB Integration: Preconfigured with Mongoose models and connections
- Authentication System: Complete JWT-based auth with refresh tokens
- OAuth Integration: Ready-to-use Google authentication flow
- Role-Based Access Control: Built-in user permission system
- Email Services: Integrated Nodemailer and optional Resend.com support
- API Key Management: Secure key generation and validation system
- Password Reset Flow: Complete secure reset functionality
- Web Push Notifications: VAPID key generation and notification endpoints
- Payment Gateway: Optional payment processing integration
- AI Ready: Optional Google Gemini AI API configuration
- Smart Port Allocation: Consistent project-specific ports via @untools/port-gen
- Container Ready: Optional Docker and docker-compose configurations
- Environment Setup: Automatically configured .env files with secure generated secrets
- Next.js 15: Modern React with App Router architecture
- TypeScript: End-to-end type safety with GraphQL codegen
- Authentication UI: Complete login/signup flows and protected routes
- Responsive Design: Mobile-friendly layouts using Tailwind CSS
- State Management: Preconfigured global state with Zustand
- File Uploads: Optional Cloudinary media integration
- Push Notifications: Browser notification support
- GraphQL Client: Apollo Client with automatic type generation
- Monorepo Configuration: Preconfigured workspace for simultaneous development
- Connected Services: API and frontend pre-wired to work together
- Unified Commands: Single command to run both services
- Type Sharing: Full type safety between backend and frontend
``bashInstall globally
npm install -g @untools/starter
š ļø Usage
$3
`bash
Create an API project
@untools/starter starter --type apiCreate a Next.js frontend
@untools/starter my-client --type frontendCreate a full-stack project
@untools/starter my-app --type fullstack
`The CLI will guide you through configuration options with interactive prompts.
$3
`bash
Create with default settings
@untools/starter my-project --type api --yes
@untools/starter my-project --type frontend --yes
@untools/starter my-project --type fullstack --yes
`$3
| Option | Alias | Description | Default |
|--------|-------|-------------|---------|
|
--type | -t | Project type: api, frontend, or fullstack | api |
| --yes | -y | Skip all prompts and use defaults | false |āļø Configuration Options
The interactive setup offers extensive customization:
$3
- Basic Configuration:
- Application name and port
- Docker integration toggle
- Feature Selection:
- MongoDB database configuration
- Email service integration
- Google OAuth authentication
- Payment gateway services
- Google Gemini AI integration
- Web Push notification support
$3
- API Connectivity:
- GraphQL API URL configuration
- API key generation
- Service Integration:
- Cloudinary for media uploads
- Google OAuth credentials
- Web Push notifications setup
$3
All of the above options plus integrated workspace configuration.
š Security Features
@untools/starter automatically generates:
- Cryptographically secure random tokens for JWT authentication
- Webhook signature verification secrets
- API keys with secure generation patterns
- VAPID public/private keypairs for Push API
- Session secrets for Next.js
- MongoDB connection strings
šļø Generated Project Structure
$3
`bash
starter/
āāā src/
ā āāā config/ # Configuration management
ā āāā graphql/ # GraphQL schema and resolvers
ā ā āāā typeDefs/ # GraphQL type definitions
ā ā āāā resolvers/ # GraphQL resolvers
ā āāā middlewares/ # Express middleware functions
ā āāā models/ # Mongoose data models
ā āāā services/ # Business logic layer
ā āāā utils/ # Helper functions
ā āāā index.ts # Application entry point
āāā .env # Environment variables (pre-configured)
āāā tsconfig.json # TypeScript configuration
āāā package.json # Dependencies and scripts
āāā README.md # Generated documentation
āāā [Docker files] # Optional Docker configuration
`$3
`bash
starter/
āāā app/ # Next.js App Router structure
āāā components/ # Reusable UI components
āāā lib/ # Utility functions and hooks
āāā graphql/ # GraphQL queries and mutations
āāā styles/ # Global CSS and Tailwind config
āāā public/ # Static assets
āāā .env.local # Environment configuration
āāā codegen.ts # GraphQL code generation config
āāā package.json # Dependencies and scripts
āāā README.md # Generated documentation
`$3
`bash
starter/
āāā my-app-api/ # API project (structure as above)
āāā my-app-client/ # Frontend project (structure as above)
āāā package.json # Workspace configuration
āāā README.md # Project documentation
`š§ Philosophy
@untools/starter follows these principles:
1. Zero Configuration: Works out of the box with sensible defaults
2. Full Flexibility: Extensive customization when you need it
3. Production Ready: Security-focused with best practices built in
4. Developer Experience: Optimized for rapid development and maintenance
š¤ Contributing
Contributions are welcome! To contribute:
`bash
Clone the repository
git clone https://github.com/miracleonyenma/untools-starter.gitInstall dependencies
cd untools-starter
npm installRun in development mode
npm run dev
``MIT Ā© Miracle Onyenma
This project uses:
- miracleonyenma/express-ts-graphql-starter as the API template
- miracleonyenma/nextjs-starter-client for the Next.js template
- @untools/port-gen for consistent port allocation
- degit for template scaffolding