https://github.com/candango/uiok
UI toolkit implements HATEOAS
https://github.com/candango/uiok
Last synced: 5 months ago
JSON representation
UI toolkit implements HATEOAS
- Host: GitHub
- URL: https://github.com/candango/uiok
- Owner: candango
- License: mit
- Created: 2025-12-16T20:57:18.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2025-12-22T18:48:40.000Z (6 months ago)
- Last Synced: 2025-12-24T07:31:28.275Z (6 months ago)
- Language: Go
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# candango/uiok
**uiok** is a Go framework for building RESTful APIs that fully embrace the
HATEOAS principle ("Hypermedia As The Engine Of Application State").
It provides abstractions for defining resources, generating hypermedia controls
(links and actions), and constructing dynamic, discoverable API responses.
## Features
- **Component-based**: Define reusable units of UI logic and rendering.
- **Composite support**: Nest and aggregate components for complex UIs.
- **Validation abstraction**: Integrate form and input validation logic cleanly.
- **HTTP compatibility**: Bind component data directly from HTTP forms.
## Getting Started
TODO
## Usage
A basic usage example can be found in the [`examples/`](examples/) folder.
Here’s a minimal example:
```go
package main
import (
"os"
"context"
"github.com/candango/uiok/uiok"
)
type HelloComponent struct {}
func (h *HelloComponent) Partial() ([]byte, error) { return []byte("
Hello, world!
"), nil }
func (h *HelloComponent) Render() ([]byte, error) { return h.Partial() }
func (h *HelloComponent) Change(ctx context.Context) error { return nil }
func main() {
c := &HelloComponent{}
_ = uiok.Write(os.Stdout, c)
}
```
## Contributing
Issues and pull requests are welcome! Please see our [contributing
guidelines](CONTRIBUTING.md) for details.
## License
[MIT License](LICENSE)
---