Skip to content

oen9/full-stack-zio

Repository files navigation

full-stack-zio

full-stack-zio

Build Status CircleCI

alt text

Features

  1. TODO list - MongoDB
  2. Small Flappy Bird game with scoreboard - Postgres
    The game is badly optimised because of not working directly with canvas. It is just my demo focusing on react with scalajs.
  3. Auth example (register, singin, signout, secured endpoint) - Postgres
  4. API documentation - Swagger
  5. Small chat with websockets
  6. GraphQL example

Live

https://full-stack-zio.herokuapp.com/

Libs

backend

  1. scala
  2. ZIO
  3. cats-core
  4. http4s
  5. pureconfig
  6. circe
  7. swagger
  8. reactivemongo
  9. doobie
  10. flyway
  11. caliban

frontend

  1. scalajs
  2. slinky (react)
  3. diode
  4. bootstrap
  5. circe

in progress

  1. ???

soon

  1. more?

Production

docker

  1. sbt stage
  2. docker-compose up -d web
  3. open http://localhost:8080 in browser

standalone

  1. sbt stage
  2. set MONGO_URL_FULL_STACK_ZIO env variable
    example: MONGO_URL_FULL_STACK_ZIO=mongodb://test:test@localhost:27017/test
  3. set DATABASE_URL_FULL_STACK_ZIO env variable
    example: DATABASE_URL_FULL_STACK_ZIO="jdbc:postgresql://localhost:5432/fullstackzio?user=test&password=test"
  4. run ./target/universal/stage/bin/app
  5. open http://localhost:8080 in browser

DEV

required services

  • docker
    run docker-compose up -d mongo postgres

  • other
    set MONGO_URL_FULL_STACK_ZIO env variable
    example: MONGO_URL_FULL_STACK_ZIO=mongodb://test:test@localhost:27017/test
    set DATABASE_URL_FULL_STACK_ZIO env variable
    example: DATABASE_URL_FULL_STACK_ZIO="jdbc:postgresql://localhost:5432/fullstackzio?user=test&password=test"

js

fastOptJS::webpack
~fastOptJS
open js/src/main/resources/index-dev.html in browser

server

reStart
http://localhost:8080/

js + server (dev conf)

Run server normally reStart.
Run js: fastOptJS::webpack and fastOptJS.
Open js/src/main/resources/index-dev.html in browser.
When server changed run reStart.
When js changed run fastOptJS.