Project Templates
Choose from optimized project templates designed for different use cases. Each template includes intelligent defaults, modern tooling, and best practices.
Available Templates
API Server
--template=apiPerfect for REST APIs, GraphQL servers, and backend services
Best For:
Traditional backend APIs, microservices, GraphQL endpoints
Key Features:
TypeScript configuration
Request validation middleware
API documentation generation
Testing framework setup
+4 more features
Create projectbash
1npx @morojs/cli init my-project --template=apiMicroservice
--template=microserviceLightweight services optimized for serverless deployment
Best For:
Serverless functions, edge computing, event-driven architectures
Key Features:
Minimal dependencies
Fast cold start optimization
Edge runtime ready
Auto-scaling configuration
+4 more features
Create projectbash
1npx @morojs/cli init my-project --template=microserviceFull-Stack Application
--template=fullstackComplete application with frontend integration support
Best For:
Complete web applications, dashboards, content management systems
Key Features:
Frontend integration
WebSocket support
Session management
File upload handling
+4 more features
Create projectbash
1npx @morojs/cli init my-project --template=fullstackFeature Comparison
| Feature | API Server | Microservice | Full-Stack |
|---|---|---|---|
| TypeScript Setup | |||
| Validation Middleware | |||
| Database Integration | |||
| Authentication | |||
| WebSocket Support | |||
| File Uploads | |||
| Session Management | |||
| Static Assets | |||
| Cold Start Optimized | |||
| Minimal Dependencies | |||
| Edge Runtime Ready |
Template Details
API Server
Perfect for REST APIs, GraphQL servers, and backend services
Use Cases:
- REST API servers
- GraphQL endpoints
- Microservices
- Backend for mobile apps
- Third-party integrations
Project Structure
src/ ├── modules/ │ └── health/ ├── middleware/ ├── config/ ├── types/ └── server.ts tests/ docs/ package.json tsconfig.json
All Features
TypeScript configuration
Request validation middleware
API documentation generation
Testing framework setup
Database integration ready
Authentication middleware
Rate limiting
CORS configuration
Create api serverbash
1# Basic api project
2npx @morojs/cli init my-api --template=api
3
4# With specific runtime and database
5npx @morojs/cli init my-api \
6 --template=api \
7 --runtime=vercel-edge \
8 --database=postgresql \
9 --features=auth,cors,docsMicroservice
Lightweight services optimized for serverless deployment
Use Cases:
- AWS Lambda functions
- Vercel Edge functions
- Cloudflare Workers
- Event processors
- API Gateway backends
Project Structure
src/ ├── handlers/ ├── lib/ ├── types/ └── index.ts deployment/ package.json tsconfig.json
All Features
Minimal dependencies
Fast cold start optimization
Edge runtime ready
Auto-scaling configuration
Event-driven patterns
Lightweight middleware
Optimized bundle size
Cloud-native patterns
Create microservicebash
1# Basic microservice project
2npx @morojs/cli init my-microservice --template=microservice
3
4# With specific runtime and database
5npx @morojs/cli init my-microservice \
6 --template=microservice \
7 --runtime=vercel-edge \
8 --database=postgresql \
9 --features=auth,cors,docsFull-Stack Application
Complete application with frontend integration support
Use Cases:
- Web applications
- Admin dashboards
- Content management
- E-commerce platforms
- Social platforms
Project Structure
src/ ├── modules/ ├── middleware/ ├── public/ ├── views/ ├── uploads/ └── server.ts frontend/ tests/ docs/
All Features
Frontend integration
WebSocket support
Session management
File upload handling
Static asset serving
Template engine support
Authentication flows
Admin dashboard ready
Create full-stack applicationbash
1# Basic fullstack project
2npx @morojs/cli init my-fullstack --template=fullstack
3
4# With specific runtime and database
5npx @morojs/cli init my-fullstack \
6 --template=fullstack \
7 --runtime=vercel-edge \
8 --database=postgresql \
9 --features=auth,cors,docs