A collection of pre-configured development environment templates for various frameworks and languages, optimized for GitHub Codespaces.
- π Quick Start: Get started with new projects instantly
- β‘ Optimized: Pre-configured for performance and best practices
- π Version Controlled: All templates are tracked in Git
- π€ Automated: CI/CD pipeline keeps templates up-to-date
.
βββ .github/ # GitHub configurations
β βββ workflows/ # GitHub Actions workflows
βββ deployed_templates/ # Auto-deployed templates (managed by CI/CD)
βββ scripts/ # Deployment and utility scripts
β βββ deploy_templates.sh # Script to deploy templates
βββ templates/ # Source templates
βββ templates.json # Template manifest
βββ react/ # React template
βββ nextjs/ # Next.js template
βββ express/ # Express template
βββ ... # Other templates
| Template | Category | Description | Tags | Launch |
|---|---|---|---|---|
| React | Frontend | Modern React with Vite and TypeScript | react, typescript, vite |
|
| Next.js | Fullstack | React framework with SSR | nextjs, react, typescript |
|
| Express | Backend | Minimal Node.js web framework | nodejs, express, javascript |
|
| Django | Backend | High-level Python web framework | python, django, sqlite |
|
| Flask | Backend | Lightweight Python WSGI framework | python, flask, rest |
|
| Jupyter | Data Science | Jupyter Notebook environment | python, jupyter, data-science |
|
| Preact | Frontend | Fast React alternative | preact, javascript, vite |
|
| Rails | Fullstack | Ruby on Rails framework | ruby, rails, postgresql |
|
| .NET Core | Backend | Cross-platform .NET | csharp, dotnet, webapi |
Our CI/CD pipeline automates the validation, testing, and deployment of templates. The workflow is defined in .github/workflows/deploy.yml.
-
Automated Validation: Every push and PR is validated for:
- JSON schema compliance
- Required files and directory structure
- Template metadata completeness
-
Environment-based Deployments:
development: For testing changesstaging: For pre-production verificationproduction: For stable releases
-
Deployment Triggers:
- Push to
mainbranch (auto-deploys to production) - Manual trigger via GitHub Actions UI
- Pull Request validation (no deployment)
- Push to
Deploy to a specific environment using GitHub CLI:
# Deploy to staging
git checkout main
git pull
gh workflow run deploy.yml -f environment=staging- Deployment Status: View in GitHub Actions > Workflows
- Environments: Check deployment history in Repository Settings > Environments
- Logs: Detailed logs available for each workflow run
All templates must pass validation before deployment. The validation checks:
-
Schema Compliance:
- Required fields in
templates.json - Valid JSON structure
- Version compatibility
- Required fields in
-
File Structure:
template-name/ βββ .devcontainer/ β βββ devcontainer.json # Required: Dev container config βββ README.md # Required: Template documentation βββ ... # Template-specific files -
Metadata Requirements:
- Unique template ID
- Description and category
- Version and compatibility info
- Maintainer details
- Make changes to templates in the
templates/directory - Test your changes locally:
./scripts/deploy_templates.sh
- Commit and push changes to the
mainbranch - GitHub Actions will automatically deploy changes to
deployed_templates/
- Create a new directory in
templates/for your template - Add required files:
README.md: Template documentation.devcontainer/devcontainer.json: Codespace configuration- Any other necessary files
- Update
templates/templates.jsonwith your template's metadata - Submit a pull request
The deployment pipeline (.github/workflows/deploy.yml) handles:
- β Automatic template validation
- π Parallel deployment of templates
- π Detailed deployment logs
- π Automatic updates to
deployed_templates/
- Store sensitive data in GitHub Secrets
- Use environment-specific configuration
- Rotate secrets regularly
- Follow principle of least privilege
- Require code reviews for production changes
- Use branch protection rules
- Dependencies are scanned for vulnerabilities
- Regular security audits
- Compliance with organizational policies
- Git
- Python 3.10+
- GitHub CLI (
gh) - Docker (for local testing)
-
Clone the repository:
git clone https://github.com/your-org/codespace-templates.git cd codespace-templates -
Install dependencies:
pip install -r requirements-dev.txt
-
Run local validation:
./scripts/validate_templates.sh
- Make your changes in the
templates/directory - Run the deployment script locally:
./scripts/deploy_templates.sh --dry-run
- Verify the output and fix any issues
- Commit and push your changes
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-template - Make your changes and verify them locally:
# Run tests and validation ./scripts/run_tests.sh ./scripts/validate_templates.sh - Commit your changes with a descriptive message:
git commit -m "feat(templates): add new template for [framework]" - Push to your fork:
git push origin feature/amazing-template - Create a pull request with a clear description of your changes
- Include tests for new features
- Update documentation
- Ensure all validations pass
- Get required approvals before merging
- All deployments are logged with timestamps
- Detailed error messages for troubleshooting
- Structured JSON logs for parsing
- Deployment success/failure rates
- Template usage statistics
- Performance metrics
- Failed deployments
- Security vulnerabilities
- Performance degradation
This project is licensed under the MIT License - see the LICENSE file for details.
- GitHub Actions for CI/CD
- JSON Schema for validation
- The open source community for inspiration and tools