Skip to content

Commit 0d54dfb

Browse files
authored
Initial commit
0 parents  commit 0d54dfb

File tree

6 files changed

+3337
-0
lines changed

6 files changed

+3337
-0
lines changed

.github/workflows/terraform.yml

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# This workflow installs the latest version of Terraform CLI and configures the Terraform CLI configuration file
2+
# with an API token for Terraform Cloud (app.terraform.io). On pull request events, this workflow will run
3+
# `terraform init`, `terraform fmt`, and `terraform plan` (speculative plan via Terraform Cloud). On push events
4+
# to the "main" branch, `terraform apply` will be executed.
5+
#
6+
# Documentation for `hashicorp/setup-terraform` is located here: https://github.com/hashicorp/setup-terraform
7+
#
8+
# To use this workflow, you will need to complete the following setup steps.
9+
#
10+
# 1. Create a `main.tf` file in the root of this repository with the `remote` backend and one or more resources defined.
11+
# Example `main.tf`:
12+
# # The configuration for the `remote` backend.
13+
# terraform {
14+
# backend "remote" {
15+
# # The name of your Terraform Cloud organization.
16+
# organization = "example-organization"
17+
#
18+
# # The name of the Terraform Cloud workspace to store Terraform state files in.
19+
# workspaces {
20+
# name = "example-workspace"
21+
# }
22+
# }
23+
# }
24+
#
25+
# # An example resource that does nothing.
26+
# resource "null_resource" "example" {
27+
# triggers = {
28+
# value = "A example resource that does nothing!"
29+
# }
30+
# }
31+
#
32+
#
33+
# 2. Generate a Terraform Cloud user API token and store it as a GitHub secret (e.g. TF_API_TOKEN) on this repository.
34+
# Documentation:
35+
# - https://www.terraform.io/docs/cloud/users-teams-organizations/api-tokens.html
36+
# - https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets
37+
#
38+
# 3. Reference the GitHub secret in step using the `hashicorp/setup-terraform` GitHub Action.
39+
# Example:
40+
# - name: Setup Terraform
41+
# uses: hashicorp/setup-terraform@v1
42+
# with:
43+
# cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
44+
on:
45+
push:
46+
branches:
47+
- main
48+
- release/*
49+
50+
- name: Setup Node
51+
uses: actions/setup-node@v4
52+
with:
53+
node-version: '20.x'
54+
on:
55+
pull_request:
56+
branches:
57+
- main
58+
59+
jobs:
60+
test:
61+
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
62+
runs-on: ${{ matrix.os }}
63+
strategy:
64+
matrix:
65+
node_version: ['18.x', '20.x']
66+
os: [ubuntu-latest, windows-latest, macOS-latest]
67+
68+
steps:
69+
- uses: actions/checkout@v4
70+
- name: Use Node.js ${{ matrix.node_version }}
71+
uses: actions/setup-node@v4
72+
with:
73+
node-version: ${{ matrix.node_version }}
74+
75+
- name: npm install, build and test
76+
run: |
77+
npm install
78+
npm run build --if-present
79+
npm test
80+
81+
steps:
82+
- run: npm publish
83+
if: github.event_name == 'push'
84+
85+
name: 'Terraform'
86+
87+
on:
88+
push:
89+
branches: [ "main" ]
90+
pull_request:
91+
92+
permissions:
93+
contents: read
94+
95+
jobs:
96+
terraform:
97+
name: 'Terraform'
98+
runs-on: ubuntu-latest
99+
environment: production
100+
101+
# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
102+
defaults:
103+
run:
104+
shell: bash
105+
106+
steps:
107+
# Checkout the repository to the GitHub Actions runner
108+
- name: Checkout
109+
uses: actions/checkout@v3
110+
111+
# Install the latest version of Terraform CLI and configure the Terraform CLI configuration file with a Terraform Cloud user API token
112+
- name: Setup Terraform
113+
uses: hashicorp/setup-terraform@v1
114+
with:
115+
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
116+
117+
# Initialize a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc.
118+
- name: Terraform Init
119+
run: terraform init
120+
121+
# Checks that all Terraform configuration files adhere to a canonical format
122+
- name: Terraform Format
123+
run: terraform fmt -check
124+
125+
# Generates an execution plan for Terraform
126+
- name: Terraform Plan
127+
run: terraform plan -input=false
128+
129+
# On push to "main", build or change infrastructure according to Terraform configuration files
130+
# Note: It is recommended to set up a required "strict" status check in your repository for "Terraform Cloud". See the documentation on "strict" required status checks for more information: https://help.github.com/en/github/administering-a-repository/types-of-required-status-checks
131+
- name: Terraform Apply
132+
if: github.ref == 'refs/heads/"main"' && github.event_name == 'push'
133+
run: terraform apply -auto-approve -input=false

CONTRIBUTING.md

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
# Contributing to DevSphere
2+
<img width="375" alt="DevSphere (logo) (500 x 200 px)" src="https://github.com/user-attachments/assets/781fb372-c215-4bf3-b5d8-4827e225b428" />
3+
4+
Thank you for considering contributing to **DevSphere**! We welcome community contributions to improve and expand this project.
5+
## 💖 Sponsor DevSphere
6+
7+
DevSphere is an open-source project that thrives on community support! If you find this project useful, please consider [sponsoring us](https://github.com/sponsors/myHerbDev) to help us continue improving and maintaining it.
8+
9+
By becoming a sponsor, you’ll:
10+
- Support ongoing development and new features
11+
- Help us keep DevSphere free and open for everyone
12+
- Get your name or company listed as a sponsor
13+
14+
[![Sponsor DevSphere](https://img.shields.io/badge/Sponsor-DevSphere-ff69b4?logo=github-sponsors&style=for-the-badge)](https://github.com/sponsors/myHerbDev)
15+
16+
> Support DevSphere. Your sponsorship helps us build a better open-source data science platform for everyone. Click the Sponsor button and join our community of supporters!
17+
18+
## Table of Contents
19+
20+
- [How to Contribute](#how-to-contribute)
21+
- [Reporting Issues](#reporting-issues)
22+
- [Submitting Pull Requests](#submitting-pull-requests)
23+
- [Code Style](#code-style)
24+
- [Testing](#testing)
25+
- [Documentation](#documentation)
26+
- [Community Guidelines](#community-guidelines)
27+
- [Contact](#contact)
28+
- [Additional Resources](#additional-resources)
29+
30+
---
31+
32+
## How to Contribute
33+
34+
### Reporting Issues
35+
36+
If you encounter bugs or have suggestions, please [open an issue](https://github.com/myHerbDev/DevSphere/issues). When reporting, include:
37+
- A clear and descriptive title
38+
- A detailed description of the problem or suggestion
39+
- Steps to reproduce the issue (if applicable)
40+
- Any relevant screenshots or logs
41+
42+
Please use the appropriate [issue labels](https://github.com/myHerbDev/DevSphere/labels) (e.g., `bug`, `enhancement`, `help wanted`).
43+
44+
### Submitting Pull Requests
45+
46+
We welcome pull requests for bug fixes, new features, and improvements. To submit a pull request:
47+
48+
1. **Fork the repository**: Click the "Fork" button at the top right of the repository page.
49+
2. **Clone your fork**:
50+
```bash
51+
git clone https://github.com/your-username/DevSphere.git
52+
```
53+
3. **Create a new branch**:
54+
```bash
55+
git checkout -b feature/your-feature-name
56+
```
57+
4. **Make your changes** in the new branch.
58+
5. **Commit your changes**:
59+
```bash
60+
git commit -m "Describe your changes briefly"
61+
```
62+
- Use clear, concise, and imperative language in commit messages.
63+
- Reference relevant issues (e.g., `Fixes #123`).
64+
6. **Push to your fork**:
65+
```bash
66+
git push origin feature/your-feature-name
67+
```
68+
7. **Open a pull request**: Go to the original repository and click "New Pull Request". Fill in the template and provide a clear description.
69+
70+
#### Example Pull Request Template
71+
72+
```markdown
73+
### Summary
74+
Briefly describe what this PR does.
75+
76+
### Related Issue(s)
77+
Closes #ISSUE_NUMBER
78+
79+
### Checklist
80+
- [ ] Tests added/updated
81+
- [ ] Documentation updated
82+
```
83+
84+
### Code Style
85+
86+
- Follow the existing code style and conventions
87+
- Write clear and concise comments where necessary
88+
- Ensure your code is well-documented and readable
89+
90+
### Testing
91+
92+
- Ensure your changes do not break any existing functionality
93+
- Run all tests with:
94+
```bash
95+
# Replace with your project's test command
96+
pytest
97+
```
98+
- If you add new features, include appropriate tests
99+
100+
### Documentation
101+
102+
- Update or add documentation for new features or changed behavior
103+
- Documentation files are located in the `/docs` directory
104+
- If unsure, ask maintainers for guidance
105+
106+
---
107+
108+
## Community Guidelines
109+
110+
- Be respectful and considerate of others
111+
- Provide and be open to constructive feedback
112+
- Follow our [Code of Conduct](CODE_OF_CONDUCT.md)
113+
114+
---
115+
116+
## Contact
117+
118+
Questions or need help? Reach out to the maintainers by:
119+
- Opening an issue and tagging `@myHerbDev`
120+
- Emailing: [your-email@example.com](mailto:your-email@example.com)
121+
122+
---
123+
124+
## Additional Resources
125+
126+
- [Code of Conduct](CODE_OF_CONDUCT.md)
127+
- [Issue Templates](.github/ISSUE_TEMPLATE)
128+
- [Project Wiki](https://github.com/myHerbDev/DevSphere/wiki)
129+
130+
---
131+
132+
Thank you for contributing to DevSphere! Together, we can make this project even better. 🌟
133+
134+
---
135+
136+
Feel free to adapt this guide to better fit the needs of your project.
137+
138+
---
139+
140+
Let me know if you want this tailored further, or if you'd like it formatted or customized for specific workflows/tools in your repository!

FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
github: [myHerbAI, myHerbDev]
2+
patreon: myherb
3+
custom: ["https://www.paypal.me/myherb", "https://myherb.co.il", "https://sphere.myherb.co.il"]

README.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# 🌍 DevSphere
2+
3+
**DevSphere: An Open-Source Initiative Dedicated to Eco-Friendly Codes, Applications, Scripts, and Solutions for Developers**
4+
![myherb devsphere animation gif](https://github.com/user-attachments/assets/839aa151-f0aa-4527-b938-42b39dd7b238)
5+
6+
DevSphere is an innovative open-source initiative designed to provide developers with an extensive collection of eco-friendly tools, codes, applications, scripts, and comprehensive solutions. This initiative aims to assist developers in minimizing their environmental impact throughout the software development lifecycle by offering valuable resources and knowledge that promote sustainability.
7+
8+
## 🚀 Mission
9+
10+
The core mission of DevSphere is to empower developers to make informed, conscious choices that prioritize sustainability while developing software applications. By integrating sustainable practices into the development process from the outset, DevSphere seeks to foster a culture that collectively reduces the environmental footprint of the software industry. It is the belief of this initiative that every line of code and design decision has the potential to contribute positively to the health of the planet.
11+
12+
## 📚 Scope
13+
14+
DevSphere encompasses a diverse array of eco-friendly resources, each tailored to support developers in adopting and implementing sustainable practices. The following sections outline the specific areas covered by DevSphere:
15+
16+
### 🌱 Energy-Efficient Coding Practices
17+
18+
This section offers comprehensive techniques and strategies for developers to significantly reduce energy consumption during both the coding and execution phases. Key components include:
19+
20+
- Best practices for writing efficient code
21+
- Optimizing algorithms
22+
- Utilizing lazy loading methods
23+
- Employing benchmarking tools to assess energy usage
24+
25+
By implementing these techniques, developers can produce software that operates effectively while consuming less power.
26+
27+
### 🧮 Resource-Optimized Algorithms
28+
29+
This category provides in-depth guidance on designing algorithms that minimize resource usage, including:
30+
31+
- Reducing CPU cycles
32+
- Minimizing memory allocation
33+
- Lowering network bandwidth consumption
34+
35+
The resources in this section include both theoretical principles and practical examples, as well as case studies illustrating the application of resource-optimized algorithms in real-world scenarios.
36+
37+
### ☁️ Green Cloud Computing
38+
39+
This segment examines sustainable cloud computing strategies that developers can adopt to create eco-friendly applications, featuring:
40+
41+
- Selection of cloud service providers that prioritize renewable energy sources
42+
- Use of serverless architecture to optimize resource allocation
43+
- Implementation of auto-scaling features that adjust resource usage based on demand
44+
45+
By choosing green cloud solutions, developers can significantly reduce the carbon footprint of their applications.
46+
47+
### 🔧 Sustainable Software Design
48+
49+
The resources on sustainable software design emphasize the necessity of considering environmental impacts throughout the software development lifecycle. This includes:
50+
51+
- Conducting lifecycle assessments to evaluate the environmental impact of software from inception to end-of-life
52+
- Discussing best practices for designing maintainable and upgradeable software
53+
54+
These practices aim to extend the usable life of applications and reduce electronic waste.
55+
56+
## 🤝 Contributions
57+
58+
DevSphere encourages collaboration and community engagement. Contributions from developers and organizations around the globe are essential for enhancing and diversifying the repository of eco-friendly resources. The following types of contributions are particularly welcomed:
59+
60+
### 💡 Eco-Friendly Code Snippets
61+
62+
Developers are invited to share specific code snippets, which may include:
63+
64+
- Examples showcasing energy-efficient practices
65+
- Resource optimization techniques
66+
- Innovative solutions for common development challenges
67+
68+
Each contribution enriches the valuable library of examples that others can reference and implement in their projects.
69+
70+
### 📱 Open-Source Eco-Friendly Applications
71+
72+
This category highlights software applications created with sustainability as a core focus. Developers can submit applications across a variety of fields, including:
73+
74+
- Web development
75+
- Mobile applications
76+
- Data science
77+
78+
These submissions reflect a commitment to minimizing environmental impact and fostering a community dedicated to sustainable software solutions.
79+
80+
### 🛠️ Scripts and Tools for Eco-Friendly Development
81+
82+
DevSphere invites contributions of scripts and tools that facilitate the adoption of sustainable development practices, such as:
83+
84+
- Monitoring energy consumption
85+
- Optimizing code performance
86+
- Providing guidelines for implementing best practices in eco-friendly software development
87+
88+
### 📖 Documentation and Tutorials
89+
90+
Educational resources play an essential role in promoting sustainability in software development. DevSphere welcomes comprehensive tutorials and documentation that guide developers on how to effectively integrate sustainability into their workflows. Topics may include:
91+
92+
- Eco-friendly coding practices
93+
- Green cloud solutions
94+
- Sustainable software design principles
95+
96+
## 🌟 Impact
97+
98+
The implementation of eco-friendly coding practices and solutions can yield substantial benefits for both the environment and the software industry as a whole. Notable impacts include:
99+
100+
### 🔋 Reduced Energy Consumption
101+
102+
By adopting best practices and energy-efficient algorithms, developers can significantly lower the energy demands of their software applications. This reduction contributes to decreased operational costs and leads to lower greenhouse gas emissions, promoting a cleaner environment.
103+
104+
### ⚙️ Minimized Resource Usage
105+
106+
Focusing on resource optimization alleviates the burden on computing infrastructure, conserving valuable resources. This approach promotes sustainable computing practices and mitigates the environmental impacts associated with technological advancements.
107+
108+
### 🏢 Sustainable Cloud Computing Practices
109+
110+
By consciously choosing cloud service providers and optimizing usage patterns, developers can substantially reduce the environmental footprint of their cloud-based applications. This section highlights strategies for implementing best practices in cloud management that prioritize sustainability.
111+
112+
### ♻️ Sustainable Software Design
113+
114+
By designing software with sustainability as a guiding principle, developers can create applications that are longer-lasting, less wasteful, and environmentally friendly. This approach can lead to a reduction in hardware disposal issues and a lower overall environmental impact.
115+
116+
## 🌈 Join the Movement
117+
118+
DevSphere invites developers from diverse backgrounds and regions to join the initiative and actively participate in the shared mission of fostering sustainable software development. Together, the community can create a significant and positive impact on the environment, advocate for a more sustainable future within the software industry, and inspire others to embrace similar practices.
119+
120+
Let us unite our skills and expertise to develop software for a greener tomorrow. 🌿vvvvvvvvvvvvvvvvvvvv

0 commit comments

Comments
 (0)