https://github.com/zio/zio-petclinic
An idiomatic pet clinic application written with ZIO.
https://github.com/zio/zio-petclinic
Last synced: about 1 year ago
JSON representation
An idiomatic pet clinic application written with ZIO.
- Host: GitHub
- URL: https://github.com/zio/zio-petclinic
- Owner: zio
- License: apache-2.0
- Archived: true
- Created: 2022-04-05T16:50:45.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-22T14:19:53.000Z (over 2 years ago)
- Last Synced: 2025-04-07T10:12:31.870Z (about 1 year ago)
- Language: Scala
- Size: 256 KB
- Stars: 103
- Watchers: 17
- Forks: 22
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ZIO Pet Clinic: An idiomatic pet clinic application written with ZIO.
This is a fullstack web app that serves as an example for best utilizing ZIO and
the libraries within its ecosystem.
This app uses:
- [ZIO HTTP](https://github.com/dream11/zio-http) for the HTTP server
- [ZIO JSON](https://github.com/zio/zio-json) for JSON serialization
- [ZIO Quill](https://github.com/zio/zio-quill) for SQL queries
- [ZIO Test Containers](https://github.com/scottweaver/testcontainers-for-zio) for testing database queries
## Getting Started
You can play with the app [here](https://zio-pet-clinic.surge.sh). *Keep in mind that this
runs on a free Heroku instance, so it might take ~10 seconds to respond the first time. Also,
all data will be reset every 15 minutes in order to keep it nice and tidy.*
You can also run the app locally. First, open your terminal and clone the project.
```shell
git clone git@github.com:zio/zio-petclinic.git
cd zio-petclinic
```
Next, open three terminal windows or panes and run the following commands:
**Pane 1**
*Installs frontend dependencies and runs the development server*
```shell
yarn install
yarn exec vite
```
**Pane 2**
*Compiles and runs the http server*
```shell
sbt
~ backend/reStart
```
**Pane 3**
*Compiles the frontend JavaScript*
```shell
sbt
~ frontend/fastLinkJS
```
Then open the browser and navigate to [localhost:3000](http://localhost:3000).