Skip to content

Commit 97e42c7

Browse files
Init
1 parent 6318b3d commit 97e42c7

27 files changed

+1178
-1
lines changed

Diff for: .env.example

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SERVER_PORT=9000

Diff for: .github/ISSUE_TEMPLATE/bug-report---.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: "Bug report \U0001F41E"
3+
about: Create a bug report
4+
labels: bug
5+
6+
---
7+
8+
## Describe the bug
9+
A clear and concise description of what the bug is.
10+
11+
### Steps to reproduce
12+
Steps to reproduce the behavior.
13+
14+
### Expected behavior
15+
A clear and concise description of what you expected to happen.
16+
17+
### Environment
18+
- OS: [e.g. Arch Linux]
19+
- Other details that you think may affect.
20+
21+
### Additional context
22+
Add any other context about the problem here.

Diff for: .github/ISSUE_TEMPLATE/feature-request---.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: "Feature request \U0001F680"
3+
about: Suggest an idea
4+
labels: enhancement
5+
6+
---
7+
8+
## Summary
9+
Brief explanation of the feature.
10+
11+
### Basic example
12+
Include a basic example or links here.
13+
14+
### Motivation
15+
Why are we doing this? What use cases does it support? What is the expected outcome?

Diff for: .github/workflows/ci.yaml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types: [opened, synchronize, reopened]
9+
10+
jobs:
11+
build:
12+
name: Build and test
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
go-version: ['1.21', '1.22']
18+
env:
19+
VERBOSE: 1
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v3
24+
- name: Set up Go
25+
uses: actions/setup-go@v4
26+
with:
27+
go-version: ${{ matrix.go-version }}
28+
- name: Run tests with race detector
29+
run: |
30+
go test -count=1 -race ./...

Diff for: .github/workflows/golangci-lint.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: golangci-lint
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- master
7+
pull_request:
8+
types: [opened, synchronize, reopened]
9+
10+
permissions:
11+
contents: read
12+
pull-requests: read
13+
checks: write
14+
15+
jobs:
16+
golangci:
17+
strategy:
18+
matrix:
19+
go: ['1.21', '1.22']
20+
os: [macos-latest]
21+
name: lint
22+
runs-on: ${{ matrix.os }}
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: actions/setup-go@v5
26+
with:
27+
go-version: ${{ matrix.go }}
28+
- name: golangci-lint
29+
uses: golangci/golangci-lint-action@v5
30+
with:
31+
version: v1.57

Diff for: .github/workflows/release.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# .github/workflows/release.yml
2+
name: goreleaser
3+
4+
on:
5+
push:
6+
# run only against tags
7+
tags:
8+
- "*"
9+
10+
permissions:
11+
contents: write
12+
packages: write
13+
issues: write
14+
15+
jobs:
16+
goreleaser:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
- name: Set up Go
24+
uses: actions/setup-go@v5
25+
with:
26+
go-version: stable
27+
# More assembly might be required: Docker logins, GPG, etc.
28+
# It all depends on your needs.
29+
- name: Run GoReleaser
30+
uses: goreleaser/goreleaser-action@v5
31+
with:
32+
# either 'goreleaser' (default) or 'goreleaser-pro'
33+
distribution: goreleaser
34+
# 'latest', 'nightly', or a semver
35+
version: latest
36+
args: release --clean
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}
40+
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
41+
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@
1919

2020
# Go workspace file
2121
go.work
22+
23+
.env

Diff for: .pre-commit-config.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
repos:
2+
- repo: https://github.com/dnephin/pre-commit-golang
3+
rev: master
4+
hooks:
5+
- id: go-fmt
6+
- id: go-vet
7+
- id: go-lint
8+
- id: go-imports
9+
- id: go-cyclo
10+
args: [-over=15]
11+
- id: validate-toml
12+
- id: no-go-testing
13+
- id: golangci-lint
14+
- id: go-critic
15+
- id: go-unit-tests
16+
- id: go-build
17+
- id: go-mod-tidy
18+

Diff for: README.md

+135-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,135 @@
1-
# gen-ui-go
1+
2+
<!-- Improved compatibility of back to top link: See: https://github.com/RealAlexandreAI/gen-ui-go/pull/73 -->
3+
<a name="readme-top"></a>
4+
<!--
5+
*** Thanks for checking out the Best-README-Template. If you have a suggestion
6+
*** that would make this better, please fork the repo and create a pull request
7+
*** or simply open an issue with the tag "enhancement".
8+
*** Don't forget to give the project a star!
9+
*** Thanks again! Now go create something AMAZING! :D
10+
-->
11+
12+
13+
14+
<!-- PROJECT SHIELDS -->
15+
<!--
16+
*** I'm using markdown "reference style" links for readability.
17+
*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).
18+
*** See the bottom of this document for the declaration of the reference variables
19+
*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.
20+
*** https://www.markdownguide.org/basic-syntax/#reference-style-links
21+
-->
22+
[![Contributors][contributors-shield]][contributors-url]
23+
[![Forks][forks-shield]][forks-url]
24+
[![Stargazers][stars-shield]][stars-url]
25+
[![Issues][issues-shield]][issues-url]
26+
[![GPL License][license-shield]][license-url]
27+
28+
29+
<!-- PROJECT LOGO -->
30+
<br />
31+
<div align="center">
32+
<a href="https://github.com/RealAlexandreAI/gen-ui-go">
33+
<img src="static/logo.png" alt="Logo" width="80" height="80">
34+
</a>
35+
36+
<h3 align="center">gen-ui-go</h3>
37+
38+
<p align="center">
39+
Generative UI in Golang, based on HTMX and Templ, is useful in Multi-Agent Systems.
40+
<br />
41+
<a href="https://github.com/RealAlexandreAI/gen-ui-go/issues/new?labels=bug&template=bug-report---.md">Report Bug</a>
42+
·
43+
<a href="https://github.com/RealAlexandreAI/gen-ui-go/issues/new?labels=enhancement&template=feature-request---.md">Request Feature</a>
44+
</p>
45+
</div>
46+
47+
48+
<!-- ABOUT THE PROJECT -->
49+
## 🖌Generative UI in Golang, based on HTMX and Templ, is useful in Multi-Agent Systems.
50+
51+
### 🌟 Reasons to Choose gen-ui-go
52+
53+
🌐 Continuously Updated UI Component Library: Our UI component library is constantly expanding, offering the latest design elements and features to help developers keep their applications modern while maintaining high performance and elegance.
54+
55+
🖥️ Full Backend Rendering: gen-ui-go implements full backend rendering, ensuring data security and privacy. This makes it particularly suitable for scenarios that require a high degree of data control and customized rendering logic.
56+
57+
🤖 Multi-Agent Planning Support: gen-ui-go supports multi-agent systems, allowing different agents to participate in UI planning and decision-making processes, providing robust support for complex interactions and automated workflows.
58+
59+
🔄 Interactivity in Semi-Automatic Workflows: In semi-automatic workflows, gen-ui-go offers the capability for real-time interaction, allowing users to dynamically adjust and optimize during the running process, thereby improving efficiency and responsiveness.
60+
61+
🔧 Suitable for Dynamic Environments: Whether it's a fast-paced agile development environment or a finely controlled production environment, gen-ui-go provides the tools and flexibility needed to adapt to various development requirements.
62+
63+
### Intro
64+
65+
66+
<!-- USAGE EXAMPLES -->
67+
## Usage
68+
69+
70+
<!-- GETTING STARTED -->
71+
## 🏁 Getting Started
72+
To add the gen-ui-go to your Go project, use the following command:
73+
74+
75+
<!-- ROADMAP -->
76+
## Roadmap
77+
78+
- [x] Basic feature
79+
80+
81+
See the [open issues](https://github.com/RealAlexandreAI/gen-ui-go/issues) for a full list of proposed features (and known issues).
82+
83+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
84+
85+
86+
<!-- CONTRIBUTING -->
87+
## Contributing
88+
89+
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
90+
91+
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
92+
Don't forget to give the project a star! Thanks again!
93+
94+
1. Fork the Project
95+
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
96+
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
97+
4. Push to the Branch (`git push origin feature/AmazingFeature`)
98+
5. Open a Pull Request
99+
100+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
101+
102+
<!-- LICENSE -->
103+
## License
104+
105+
Distributed under the GPLv3 License. See `LICENSE` for more information.
106+
107+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
108+
109+
110+
111+
<!-- CONTACT -->
112+
## Contact
113+
114+
RealAlexandreAI - [@RealAlexandreAI](https://twitter.com/RealAlexandreAI)
115+
116+
Project Link: [https://github.com/RealAlexandreAI/gen-ui-go](https://github.com/RealAlexandreAI/gen-ui-go)
117+
118+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
119+
120+
121+
<!-- MARKDOWN LINKS & IMAGES -->
122+
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
123+
[contributors-shield]: https://img.shields.io/github/contributors/RealAlexandreAI/gen-ui-go.svg?style=for-the-badge
124+
[contributors-url]: https://github.com/RealAlexandreAI/gen-ui-go/graphs/contributors
125+
[forks-shield]: https://img.shields.io/github/forks/RealAlexandreAI/gen-ui-go.svg?style=for-the-badge
126+
[forks-url]: https://github.com/RealAlexandreAI/gen-ui-go/network/members
127+
[stars-shield]: https://img.shields.io/github/stars/RealAlexandreAI/gen-ui-go.svg?style=for-the-badge
128+
[stars-url]: https://github.com/RealAlexandreAI/gen-ui-go/stargazers
129+
[issues-shield]: https://img.shields.io/github/issues/RealAlexandreAI/gen-ui-go.svg?style=for-the-badge
130+
[issues-url]: https://github.com/RealAlexandreAI/gen-ui-go/issues
131+
[license-shield]: https://img.shields.io/github/license/RealAlexandreAI/gen-ui-go.svg?style=for-the-badge
132+
[license-url]: https://github.com/RealAlexandreAI/gen-ui-go/blob/master/LICENSE
133+
[product-screenshot]: images/screenshot.png
134+
135+

Diff for: component/button.templ

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package component
2+
3+
templ Button(text string) {
4+
<button class="button" onclick="alert('按钮被点击了!')">{ text }</button>
5+
}

Diff for: component/button_templ.go

+48
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)