kyledinh / zio-petclinic-scala-3

Updated zio-petclinic example app to use Scala 3
Apache License 2.0
6 stars 2 forks source link

ZIO Pet Clinic: An sample application written with ZIO 2, Scala 3 and ScalaJS.

This is repo is taking the zio/zio-petclinic project and building it with Scala 3.1.3

Changes from the original repo with:


[Product Name Screen Shot]()




Software Versions

Software Version Install
JVM openjdk 17.0.4 https://sdkman.io/install
Scala 3.1.3 https://www.scala-lang.org/download
sbt 1.7.1 https://www.scala-sbt.org/download.html
Zio 2.0.2 https://zio.dev/getting_started
Postgres 14 https://hub.docker.com/_/postgres
Docker Desktop 4.3.x https://www.docker.com/products/docker-desktop




Running localdev with Docker

Requires Docker to be running

Setup

Run the local database, start backend server in Terminal 1

Start the database

To run the backend API server (With sbt server)

Run the frontend in a separate Terminal 2

Tools




Project Outline

A good starting point to understand this repo is with the Makefile. It will have the most common commands to check, setup, compile and build the project.

.
├── LICENSE
├── Makefile                   Commands to build/develop this project 
├── README.md
├── backend                    Scala code for RESTful api 
│   └── src
│       ├── main
│       └── test
│
├── build.sbt                  Dependency manager 
├── docker_pg_vol              Docker volume for Postgres DB
├── frontend                   Scala code that generates `main.js` for the webserver
│   ├── src
│   │   └── main
│   └── target
│       └── scala-3.1.3        main.js will be generated here
│
├── js-frontend                Javasript webserver using vite/Node
│   ├── index.html
│   ├── main.js
│   ├── main.scss
│   ├── node_modules/
│   ├── package.json
│   ├── postcss.config.js
│   ├── tailwind.config.js
│   ├── vite.config.js
│   └── yarn.lock
│
├── project                    The only project directory to be concerned with
│   ├── build.properties       sbt version  
│   └── plugins.sbt            plugins
│
├── sem-version                x.x.x
└── shared                     Scala code shared by backend and frontend, models 
    └── src
        ├── main
        └── test