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 for the HTTP server
- ZIO JSON for JSON serialization
- ZIO Quill for SQL queries
- ZIO Test Containers for testing database queries
You can play with the app here. 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.
git clone [email protected]: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
yarn install
yarn exec vite
Pane 2 Compiles and runs the http server
sbt
~ backend/reStart
Pane 3 Compiles the frontend JavaScript
sbt
~ frontend/fastLinkJS
Then open the browser and navigate to localhost:3000.