@jttc/projen-project-types
v1.0.0-beta.10
Published
> **Opinionated project templates for [projen.io](https://projen.io) that accelerate development with best practices built-in**
Readme
🏗️ Projen Project Types
Opinionated project templates for projen.io that accelerate development with best practices built-in
✨ What is this?
This package provides ready-to-use project templates that extend projen with opinionated configurations, saving you hours of setup time while ensuring consistency and best practices across your projects.
Instead of manually configuring Prettier, ESLint, VSCode settings, CI/CD pipelines, and other tools for every project, these templates give you everything pre-configured and battle-tested.
🚀 Quick Start
# Create a CDK construct library
npx projen new --from @jttc/projen-project-types cdk-library
# Create a CDK application
npx projen new --from @jttc/projen-project-types cdk-app
# Create a CDK8s construct library with Kubernetes support
npx projen new --from @jttc/projen-project-types cdk8s-library
# Create a CDK8s application with Kubernetes support
npx projen new --from @jttc/projen-project-types cdk8s-app
# Create an NX monorepo workspace
npx projen new --from @jttc/projen-project-types nx-monorepo📦 Available Project Types
| Project Type | Description | Best For | |--------------|-------------|----------| | CDK Library | AWS CDK construct libraries | Creating reusable AWS infrastructure components | | CDK App | AWS CDK applications | Building and deploying AWS infrastructure | | CDK8s Library | CDK8s libraries with Kubernetes | Creating reusable Kubernetes constructs | | CDK8s App | CDK8s applications with Kubernetes | Building and deploying Kubernetes applications | | NX Monorepo | NX monorepo workspace | Managing multiple related packages in a single repository |
🧩 Available Components
| Component | Description | Documentation | |-----------|-------------|---------------| | CDK8s Component | Kubernetes manifest generation with TypeScript | Add to any project type | | K3d Component | Local Kubernetes development with K3d | Included in CDK8s apps, add to any project | | Commitzent Component | Conventional Commits with interactive prompts | Included by default |
⚡ What You Get Out of the Box
Every project template includes:
- 🎨 Prettier - Consistent code formatting
- 🔧 VSCode Setup - Optimized editor experience with recommended extensions
- 📋 Commitzent - Conventional commits with interactive prompts
- 📝 TypeScript - Best practices and configurations
- 🧪 Jest Testing - Ready-to-use testing framework
- 🚢 CI/CD Pipelines - GitHub Actions workflows
- 📚 Documentation - Auto-generated API docs
- 🔒 Security - Dependabot and security scanning
💡 Example Usage
CDK Library with Custom Configuration
// .projenrc.ts
import { CdkLibrary } from '@jttc/projen-project-types';
const project = new CdkLibrary({
name: 'my-awesome-constructs',
author: 'Your Name',
authorAddress: '[email protected]',
repositoryUrl: 'https://github.com/yourusername/my-awesome-constructs.git',
cdkVersion: '2.1.0',
defaultReleaseBranch: 'main',
// Customize as needed
prettier: true,
vscode: true,
});
project.synth();CDK8s Library with Kubernetes Support
// .projenrc.ts
import { Cdk8sLibrary, K8sVersion } from '@jttc/projen-project-types';
const project = new Cdk8sLibrary({
name: 'my-k8s-constructs',
author: 'Your Name',
authorAddress: '[email protected]',
repositoryUrl: 'https://github.com/yourusername/my-k8s-constructs.git',
cdkVersion: '2.1.0',
defaultReleaseBranch: 'main',
// CDK8s specific options
k8sVersion: K8sVersion.V1_31,
appPath: 'src/k8s',
imports: ['[email protected]'],
});
project.synth();🏗️ Architecture
projen-project-types/
├── 📁 Project Types/ # Complete project templates
│ ├── CDK Library # AWS CDK construct libraries
│ ├── CDK App # AWS CDK applications
│ └── CDK8s Library # Kubernetes + CDK8s libraries
├── 🧩 Components/ # Reusable functionality
│ └── CDK8s Component # Kubernetes manifest generation
└── ⚙️ Common Config/ # Shared configurations
├── Prettier # Code formatting
├── VSCode # Editor setup
└── TypeScript # Language configuration📚 Documentation
Comprehensive documentation is available at: jumptothecloud.github.io/projen-project-types
🛠️ Development
Prerequisites
- Node.js (v18+)
- Yarn package manager
- Python 3 (for documentation)
Setup
# Clone the repository
git clone https://github.com/JumpToTheCloud/projen-project-types.git
cd projen-project-types
# Install dependencies
yarn install
# Run tests
yarn test
# Build the project
yarn buildDocumentation Development
# Install documentation dependencies
pip3 install mkdocs mkdocs-material mike
# Serve documentation locally with hot reload
yarn docs:serve
# Build documentation
yarn docs:buildThe documentation will be available at http://localhost:8099 when using the serve command.
🗺️ Roadmap
Planned features and project types:
- Next.js Projects - Full-stack TypeScript applications
- Node.js APIs - REST and GraphQL API templates
- React Libraries - Component library templates
- Terraform Modules - Infrastructure as Code templates
- Docker Components - Containerization support
- Serverless Functions - AWS Lambda and other FaaS templates
🤝 Contributing
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and add tests
- Run tests:
yarn test - Update documentation if needed
- Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
Contribution Guidelines
- All new features should include tests
- Documentation should be updated for new project types or components
- Follow the existing code style and patterns
- Ensure all CI checks pass
❓ Support
- Documentation: jumptothecloud.github.io/projen-project-types
- Issues: GitHub Issues
- Discussions: GitHub Discussions
📄 License
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
🌟 Credits
Built with ❤️ by the JumpToTheCloud team.
Special thanks to the projen community for creating such an amazing tool for project configuration management.
