Skip to content

Commit

Permalink
refactoring: added README.md back
Browse files Browse the repository at this point in the history
  • Loading branch information
mahendraintelops committed Nov 4, 2023
1 parent 8938096 commit e9e7411
Show file tree
Hide file tree
Showing 336 changed files with 765 additions and 507 deletions.
33 changes: 9 additions & 24 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ If you find a bug while working with the Compage, please [open an issue on GitHu
You are more than welcome to open issues in this project to [suggest new features](https://github.com/intelops/compage/issues/new?labels=kind%2Ffeature&template=feature-request.md&title=Feature%20Request:).

## Contributing Code
This project is written in Golang, Node.js(TypeScript) and ReactJs(TypeScript).

![block-diagram.png](images/architecture-high.png)
This project is written in Golang

To contribute code.
1. Ensure you are running golang version 1.11.4 or greater for go module support
Expand All @@ -19,26 +17,15 @@ To contribute code.
GO111MODULE=on
GOFLAGS=-mod=vendor
```
3. Ensure you have Node.js(LTS >= v18.18.0) installed for app and ui part of the compage.
#### KinD
- Install KinD from https://kind.sigs.k8s.io/docs/user/quick-start/#installing-from-release-binaries
- Create KinD cluster using below command
```shell
cd deploy
./create-kind-cluster.sh
```
- Check if you can access the cluster created in previous step, and you are able to list down the pods.
4. Fork the project.
5. Clone the project: `git clone https://github.com/[YOUR_USERNAME]/compage && cd compage`
6. kindly refer compage.md file to know the structure of the project.
7. The Compage has three servers (subprojects) which need to be started to run the compage on local
- (Golang), navigate to core directory and follow its [core README](./core/README.md)
8. Commit changes *([Please refer the commit message conventions](https://www.conventionalcommits.org/en/v1.0.0/))*
9. Push commits.
10. Open pull request.
3. Fork the project.
4. Clone the project: `git clone https://github.com/[YOUR_USERNAME]/compage && cd compage`
5. kindly refer compage.md file to know the structure of the project.
6. Commit changes *([Please refer the commit message conventions](https://www.conventionalcommits.org/en/v1.0.0/))*
7. Push commits.
8. Open pull request.
## Regenerate the gRPC code from .proto files
- Install below packages in order to regenerate the gRPC code.
- Install below packages to regenerate the gRPC code.
```shell
go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]
Expand All @@ -50,6 +37,4 @@ To contribute code.
- Download buf binary from this link—https://github.com/bufbuild/buf/releases and fire the command from root directory of compage.
```shell
buf generate
```
## How are DB(sqlite/cassandra) and GitHub interacted with above three components?
![architecture.png](images/architecture-med.png)
```
154 changes: 154 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
<p align="center"><img src="images/compage-logo.svg" width="400" alt=""></p>
<p align="center"><b>Low-Code, No-Code for cloud-native</b></p>

<h4 align="center">
<a href="https://discord.gg/DeapQc22qe">Discord</a> |
<a href="https://github.com/intelops/compage/discussions">Discussions</a> |
<a href="https://docs.intelops.ai/1.0.0/compage/5-guides?utm_source=github&utm_medium=social/">Guide</a> |
<a href="https://docs.intelops.ai/1.0.0/compage">Docs</a> |
<a href="https://docs.intelops.ai/1.0.0/compage/6-contribution?utm_source=github&utm_medium=social">Contribute</a><br/><br/>
</h4>

<h4 align="center">

![compage-ci](https://github.com/intelops/compage/workflows/core-ci/badge.svg)
[![codecov](https://codecov.io/gh/intelops/compage/branch/main/graph/badge.svg?token=HZZ0196V4D)](https://codecov.io/gh/intelops/compage)
[![Go Report Card](https://goreportcard.com/badge/github.com/intelops/compage/core)](https://goreportcard.com/report/github.com/intelops/compage/core)

[![Price](https://img.shields.io/badge/price-FREE-0098f7.svg)](https://github.com/intelops/compage/blob/main/LICENSE) [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/DeapQc22qe)
[![Discussions](https://badgen.net/badge/icon/discussions?label=open)](https://github.com/intelops/compage/discussions)
[![Code of Conduct](https://badgen.net/badge/icon/code-of-conduct?label=open)](./code-of-conduct.md)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

</h4>

<hr>

# Compage by IntelOps

Low-Code Framework to develop Rest APIs, gRPC, dRPC, GraphQL APIs, WebSockets, Micro-services, FaaS, Temporal workloads,
IoT and edge services, K8s controllers, K8s CRDs, K8s custom APIs, K8s Operators, K8s hooks, etc. with visual coding and
by automatically applying best practice methods like software supply chain security measures, SBOM, openAPI,
cloud-events, vulnerability reports, etc. Auto generate code after defining requirements in UI as architecture diagram.

**Specify the requirements for backend workloads in the yaml file, and then auto-generate code, customize it and maintain it.**
> Our goal is to support both auto-generate code and import existing code. Let's see how far we can go with importing
> existing code support. One step at a time!
#### Problems that Compage is trying to solve:

Problems with many of the current low-code platforms -

- Single programming language support only.
- Vendor Lock-in Infrastructure if you want to choose their cloud hosting.
- No proper support or automation for self-hosting and also lots of dependencies on the low-code/no-code tool itself to
run it on your infrastructure.
- No Zero-Vendor Lock-in platform to generate cloud-native. friendly backend source code, especially for Rest APIs,
gRPC,
WebSockets, etc. in any programming language and framework we want.
- Non-availability of a very opinionated development process & management of infrastructure.
- Not compatible to cloud-native, especially for self-hosting K8s environment.
- Not invoking standards like openAPI, Event-driven, software supply chain security, secure container builds,
microservices, etc.
- Not supporting modern tech stack and no feasibility to adopt new tech stack dynamically.
- No bi-directional code management (export, import and manage).
- No easy UX to make any level of developer to learn, adopt and implement development process for K8s ecosystem for
cloud-native world.
- and the list can go on **(please let us know what more you can think of, we will try to solve those problems for you)
**

Solution: **Compage**

- An opensource tool that can be run on your local and used to develop backend workloads for cloud-native & K8s :-
- Easy to adopt & use.
- GitHub Actions, container build tools, cosign, etc.
- Select the programming language and framework you prefer (support for each programming language and framework will be
added one by one); first priority is GoLang and Rust. Frameworks can be configured as plug-ins.
- Auto generate code for backend workloads like Rest API, gRPC, dRPC, GraphQL, WebSockets, Microservices, FaaS,
Temporal workloads, IoT and edge services, K8s controllers, K8s CRDs, K8s custom APIs, K8s Operators, K8s hooks, etc.
**(for now support will be for golang and then Rust as priority, followed by Python, C, Carbon, Node.js, Dart, Deno,
etc. Community contribution will help us to achieve more support)**
- Auto-generate the backend code, based on requirements defined via diagram & forms
- Auto-generate the endpoint configs to be able to use with API gateways & service-mesh environments like Kong, Tyk,
Easegress, Istio, Linkerd, Kuma, Ngnix, Cilium tools, Calico, etc.
- Easy plug-ins by supporting tools like Ory Hydra, Kratos, Keto, OathKeeper, KeyCloak, Gluu, Janssen, Cerbos, Open
Policy Agent, OAuth, OIDC, FIDO, SAML, Dex, MFA, Passwordless, etc.
- Auto build containers as multi-stage and/or distroless to make them secure, portable and optimal.
- Automatically take care of all git processes like tagging, versioning, commits, PRs, etc.
- Automatically enforce software supply chain security process like signing the source code for integrity and generating
immutable ledger logs, generating SBOM, generating vulnerability report, and also generate configurations to auto
verify, validate & control the source code integrity and container image integrity for deployments, etc. in K8s env.
- Automatically convert backend application related environment variables' content to configmaps, secrets, etc. to make
the generated backend compatible to K8s of any flavor (K8s, K3s, TalOS, etc.) and also auto configs to support
integration with Vault, cert-manager, external secrets, sealed secrets & Venafi tools for TLS/SSL and secrets
management.
- Slowly add support for ML development & ML frameworks to make it easy to develop ML applications that will run on
Kubernetes.
- **Automatically manage generated code for by auto creating the services catalog & their visualization by versioning
and integrations, and also git repo observability**
- **please suggest what you would like to add as features**

-------------------------

#### Current features in compage
- An opensource tool that runs on your local cluster (mostly a local cluster running on developer's machine), helps to
visually develop backend workloads for cloud-native & K8s.
- Easy to adopt & use.
- GitHub Actions, container build tools, cosign, etc.
- Auto-generate code for backend workloads like Rest API.
- Auto-generate the backend code, based on requirements defined via diagram & forms.
- Auto build containers as multi-stage and/or distro-less to make them secure, portable and optimal.
- Automatically enforce software supply chain security process like generating cosign configuration in GitHub actions
for generated source code for the diagrams drawn, generating deepsource configurations, generating configurations for
deployments, services etc. in K8s env.

#### Languages supported:

> OpenApi Generator based templates (REST)
- GoLang
- Java
- Python
- JavaScript
- Ruby
- **we would like to add more support to different languages. Please feel free to suggest.**

> Compage managed templates (REST)
- Go
- Rust (in progress)

Support of different programming languages, protocols and frameworks will be added one by one with community
contribution.

#### How to use Compage?

- A user can download the compage executable binary from releases page suitable for the user's machine architecture. The user can even build the binary from source code.
- Once the binary is downloaded, user can create a yaml file as configuration to be supplied to compage binary. The yaml file can be created by running the command `compage init` and then user can edit the yaml file to add the required configuration.
## Architecture

## Contributing

You are warmly welcome to contribute to Compage.
Please refer the detailed guide [CONTRIBUTING.md](./CONTRIBUTING.md).

## Community

Active communication channels

- Discord: [Discord](https://discord.gg/DeapQc22qe)

## License

Refer the licence - [LICENCE](./LICENSE).

## Star History

<a href="https://star-history.com/#intelops/compage&Timeline">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=intelops/compage&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=intelops/compage&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=intelops/compage&type=Date" />
</picture>
</a>

23 changes: 0 additions & 23 deletions compage.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,7 @@ markmap:

# compage

## doc
- [Compage Docs](https://docs.intelops.ai/1.0.0/compage)

## app
- NodeJs Express Server
- [Repository](https://github.com/intelops/compage/tree/main/app)
- gRPC Client to core
- Commit generated code to user's GitHub account using Simple-Git

[//]: # (- Integration with K8s [deploys the generated code to the cluster])

## core
- gRPC Go Server
- [Repository](https://github.com/intelops/compage/tree/main)
- Code Generation with Go templates
- [openapi-generator Integration](https://openapi-generator.tech)

## ui
- ReactJS based Rest client - typescript based CRA app
- [Repository](https://github.com/intelops/compage/tree/main/ui)
- aws-diagram-maker library integration

## chart
- Helm Chart for compage

## deploy
- scripts to create docker images and push to ghcr.io registry.
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ require (
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0
go.opentelemetry.io/otel/sdk v1.19.0
golang.org/x/exp v0.0.0-20231006140011-7918f672742d
golang.org/x/text v0.13.0
golang.org/x/text v0.14.0
google.golang.org/grpc v1.59.0
google.golang.org/protobuf v1.31.0
)

require (
cloud.google.com/go/compute v1.23.0 // indirect
cloud.google.com/go/compute v1.23.1 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
Expand All @@ -28,8 +28,8 @@ require (
go.opentelemetry.io/otel/trace v1.19.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect
golang.org/x/sys v0.14.0 // indirect
google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231030173426-d783a09b4405 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect
)
12 changes: 12 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ cloud.google.com/go v0.110.7 h1:rJyC7nWRg2jWGZ4wSJ5nY65GTdYJkg0cd/uXb+ACI6o=
cloud.google.com/go v0.110.8 h1:tyNdfIxjzaWctIiLYOTalaLKZ17SI44SKFW26QbOhME=
cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY=
cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM=
cloud.google.com/go/compute v1.23.1 h1:V97tBoDaZHb6leicZ1G6DLK2BAaZLJ/7+9BB/En3hR0=
cloud.google.com/go/compute v1.23.1/go.mod h1:CqB3xpmPKKt3OJpW2ndFIXnA9A4xAy/F3Xp1ixncW78=
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
Expand Down Expand Up @@ -90,23 +92,33 @@ golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY=
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4=
google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a h1:fwgW9j3vHirt4ObdHoYNwuO24BEZjSzbh+zPaNWoiY8=
google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:EMfReVxb80Dq1hhioy0sOsY9jCE46YDgHlJ7fWVUWRE=
google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA=
google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI=
google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb h1:lK0oleSc7IQsUxO3U5TjL9DWlsxpEBemh+zpB7IqhWI=
google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk=
google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k=
google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870=
google.golang.org/genproto/googleapis/api v0.0.0-20231030173426-d783a09b4405 h1:HJMDndgxest5n2y77fnErkM62iUsptE/H8p0dC2Huo4=
google.golang.org/genproto/googleapis/api v0.0.0-20231030173426-d783a09b4405/go.mod h1:oT32Z4o8Zv2xPQTg0pbVaPr0MPOH6f14RgXt7zfIpwg=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb h1:Isk1sSH7bovx8Rti2wZK0UZF6oraBDK74uoyLEEVFN0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b h1:ZlWIi1wSK56/8hn4QcBp/j9M7Gt3U/3hZw3mC7vDICo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE=
google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58=
google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=
Expand Down
Binary file added images/architecture-high.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/architecture-med.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e9e7411

Please sign in to comment.