Skip to content

A comprehensive, technology-agnostic boilerplate providing production-ready infrastructure, DevOps tooling, and project templates for any tech stack. Start any project with Docker, Kubernetes, monitoring, and CI/CD out of the box.

License

Notifications You must be signed in to change notification settings

3m-abro/universal-boilerplate

Repository files navigation

Universal Boilerplate

A comprehensive, production-ready boilerplate infrastructure for any type of application - web, mobile, or backend. This repository provides all the DevOps tooling, infrastructure, and configuration files you need to quickly start any project with any technology stack.

🚀 Features

  • Multi-Project Support: Backend, frontend, mobile, and shared code
  • Infrastructure as Code: Terraform for AWS, Kubernetes manifests
  • Containerization: Docker and Docker Compose configurations
  • CI/CD: GitHub Actions with automated testing and deployment
  • Monitoring: Prometheus, Grafana, and comprehensive logging
  • Security: Infrastructure security, secrets management, and best practices
  • Testing: Testing framework templates for any technology
  • Templates: Technology-agnostic project structure templates
  • Documentation: Comprehensive guides and best practices

📁 Project Structure

boilerplate/
├── .github/workflows/     # GitHub Actions CI/CD
├── argocd/               # ArgoCD applications
├── docs/                 # Documentation
├── k8s/                  # Kubernetes manifests
├── monitoring/           # Monitoring configuration
├── nginx/                # Nginx configuration
├── scripts/              # Deployment and utility scripts
├── src/                  # Source code directory
│   ├── backend/          # Backend implementations
│   ├── frontend/         # Frontend applications
│   ├── mobile/           # Mobile applications
│   └── shared/           # Shared code
├── templates/            # Project templates
│   ├── backend/          # Backend templates
│   ├── frontend/         # Frontend templates
│   └── mobile/           # Mobile templates
├── terraform/            # Infrastructure as code
├── tests/                # Test suites
├── docker-compose.yml    # Docker Compose configuration
└── README.md            # This file

🛠️ Quick Start

Prerequisites

  • Docker and Docker Compose
  • Git
  • A code editor (VS Code recommended)

Using This Boilerplate

  1. Clone the repository

    git clone <your-repo-url>
    cd boilerplate
  2. Choose your project type and copy a template

    # For a basic backend
    cp -r templates/backend/basic/* src/backend/
    
    # For an advanced frontend
    cp -r templates/frontend/advanced/* src/frontend/
    
    # For a basic mobile app
    cp -r templates/mobile/basic/* src/mobile/
  3. Set up your project

    # Add technology-specific files (package.json, requirements.txt, etc.)
    # Install dependencies for your chosen technology
    cd src/backend && npm install  # or pip install, go mod tidy, etc.
    cd src/frontend && npm install  # or yarn install, etc.
    # etc.
  4. Start development

    # Using Docker Compose for infrastructure
    docker-compose -f docker-compose.dev.yml up -d
    
    # Start your specific project (adapt to your technology)
    cd src/backend && npm run dev      # Node.js
    cd src/backend && python app.py    # Python
    cd src/backend && go run main.go   # Go
    cd src/frontend && npm run dev     # React/Vue/Angular
    cd src/mobile && npm start         # React Native
    cd src/mobile && flutter run       # Flutter
  5. Access your application

🧪 Testing

Run Tests

Each template includes its own testing setup. Navigate to your project directory and run:

# For backend projects
cd src/backend && npm test

# For frontend projects
cd src/frontend && npm test

# For mobile projects
cd src/mobile && npm test

# Run all tests (if you have multiple projects)
npm run test:all

🚀 Deployment

Docker Deployment

# Build and run with Docker Compose
docker-compose up --build

Kubernetes Deployment

# Deploy to Kubernetes
kubectl apply -f k8s/

# Check deployment status
kubectl get pods -n boilerplate
kubectl get services -n boilerplate

Production Deployment

# Set up infrastructure
cd terraform
terraform init
terraform plan
terraform apply

# Deploy application
./scripts/deploy.sh production

📋 Available Templates

Backend Templates

  • Basic Backend - Minimal structure for simple APIs and microservices
  • Advanced Backend - Comprehensive structure for complex enterprise applications

Frontend Templates

  • Basic Frontend - Simple structure for small applications and prototypes
  • Advanced Frontend - Complex structure for large applications and enterprise frontends

Mobile Templates

  • Basic Mobile - Simple structure for small mobile apps and prototypes
  • Advanced Mobile - Complex structure for large mobile applications and enterprise apps

Template Philosophy

  • Technology Agnostic - No specific tech stack assumptions
  • Structure Focus - Emphasis on project organization and best practices
  • Flexible - Easy to adapt to any technology choice
  • Scalable - Designed to grow with your project

🎯 How to Use This Boilerplate

  1. Start a new project by copying a template structure
  2. Choose your technology stack (any language/framework)
  3. Add technology-specific files (package.json, requirements.txt, etc.)
  4. Customize the template for your specific needs
  5. Use the infrastructure (Docker, K8s, Terraform) as-is
  6. Deploy using the provided scripts and configurations
  7. Scale using the monitoring and infrastructure setup

🌟 Key Benefits

  • Technology Freedom: Use any programming language or framework
  • No Assumptions: No specific authentication, database, or API implementations
  • Consistent Structure: Follow proven organizational patterns
  • Production Ready: Complete DevOps and infrastructure setup
  • Scalable: Designed to grow from prototype to enterprise
  • Best Practices: Built-in testing, monitoring, and deployment
  • Time Saving: Skip the setup, focus on building features
  • Clean Slate: Start with infrastructure, add your own implementations

🔧 Configuration

Environment Variables

Each template includes environment variable examples. After copying a template, customize the .env files for your specific technology stack and project needs.

Common variables include:

  • Database connection strings
  • API endpoints
  • Application configuration
  • Third-party service credentials
  • Custom secrets (add your own authentication, API keys, etc.)

📊 Monitoring

🔒 Security

The boilerplate includes security best practices and configurations:

  • Infrastructure Security: Secure Docker and Kubernetes configurations
  • Network Security: Proper firewall and network policies
  • Monitoring: Security event logging and alerting
  • Secrets Management: Secure handling of sensitive data
  • Best Practices: Security guidelines and recommendations

Specific security implementations depend on your chosen technology stack.

⚠️ What's NOT Included

This boilerplate is technology-agnostic and does NOT include:

  • Authentication Systems - No JWT, OAuth, or login implementations
  • Database Schemas - No specific user tables or data models
  • API Endpoints - No specific REST/GraphQL implementations
  • Business Logic - No application-specific functionality
  • Technology Dependencies - No package.json, requirements.txt, etc.

What IS included:

  • Infrastructure - Docker, Kubernetes, Terraform
  • DevOps - CI/CD, Monitoring, Logging
  • Project Structure - Templates and organization patterns
  • Configuration - Environment setup and secrets management

📚 Documentation

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Run the test suite
  6. Submit a pull request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🆘 Support

For support and questions:

  • Create a GitHub issue
  • Check the documentation in the docs/ folder
  • Review the troubleshooting section

Happy coding! 🎉

About

A comprehensive, technology-agnostic boilerplate providing production-ready infrastructure, DevOps tooling, and project templates for any tech stack. Start any project with Docker, Kubernetes, monitoring, and CI/CD out of the box.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors