https://github.com/guizmaii-opensource/zio-datastar-poc
POC: data-star + zio-http
https://github.com/guizmaii-opensource/zio-datastar-poc
data-star poc zio-http
Last synced: 5 months ago
JSON representation
POC: data-star + zio-http
- Host: GitHub
- URL: https://github.com/guizmaii-opensource/zio-datastar-poc
- Owner: guizmaii-opensource
- License: apache-2.0
- Created: 2025-07-23T03:45:10.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-23T07:32:40.000Z (11 months ago)
- Last Synced: 2025-07-23T09:23:37.259Z (11 months ago)
- Topics: data-star, poc, zio-http
- Language: Scala
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zio-datastar-poc
This project is a proof-of-concept (POC) demonstrating the integration of Datastar with ZIO HTTP.
It showcases how to build a simple, real-time, and interactive web application using a modern Scala stack.
The application is a simple counter that can be incremented and decremented, with the UI updated in real-time using Server-Sent Events (SSE) powered by Datastar.
## Features
- **ZIO HTTP Endpoints**: Uses the type-safe Endpoint API from ZIO HTTP.
- **Datastar Integration**: Leverages Datastar for seamless frontend reactivity without writing JavaScript.
- **Scala 3 Macros**: Includes a Scala 3 macro for compile-time-safe extraction of case class field names.
- **sbt Build**: Configured with sbt for dependency management and running the application.
## How to Run
To run the server, you can use the following sbt command:
```bash
sbt start
```
This will start the application with `sbt-revolver`, which also provides hot-reloading.
Once the server is running, you can access the application at [http://localhost:8080](http://localhost:8080).
## Technology Stack
- [Scala 3](https://www.scala-lang.org/)
- [ZIO](https://zio.dev/)
- [ZIO HTTP](https://zio.dev/zio-http/)
- [Datastar](https://data-star.dev/)
- [sbt](https://www.scala-sbt.org/)