{"id":20774061,"url":"https://github.com/indoorvivants/smithy4s-fullstack-template","last_synced_at":"2025-07-29T01:37:15.760Z","repository":{"id":60514903,"uuid":"526989569","full_name":"indoorvivants/smithy4s-fullstack-template","owner":"indoorvivants","description":"Full-stack web application with Scala 3, using Smithy4s","archived":false,"fork":false,"pushed_at":"2025-04-30T08:05:27.000Z","size":151,"stargazers_count":22,"open_issues_count":11,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T15:13:59.518Z","etag":null,"topics":["doobie","flyio","playwright","postgresql","scala","scala3","scalajs","smithy","smithy4s"],"latest_commit_sha":null,"homepage":"https://smithy4s-fullstack-template.fly.dev/","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/indoorvivants.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-20T17:06:12.000Z","updated_at":"2025-03-17T08:15:27.000Z","dependencies_parsed_at":"2023-12-26T16:16:23.052Z","dependency_job_id":"597d00fe-c14c-434d-ac6a-0a6a08872a46","html_url":"https://github.com/indoorvivants/smithy4s-fullstack-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/indoorvivants/smithy4s-fullstack-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indoorvivants%2Fsmithy4s-fullstack-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indoorvivants%2Fsmithy4s-fullstack-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indoorvivants%2Fsmithy4s-fullstack-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indoorvivants%2Fsmithy4s-fullstack-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/indoorvivants","download_url":"https://codeload.github.com/indoorvivants/smithy4s-fullstack-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indoorvivants%2Fsmithy4s-fullstack-template/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267616825,"owners_count":24116167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["doobie","flyio","playwright","postgresql","scala","scala3","scalajs","smithy","smithy4s"],"created_at":"2024-11-17T12:28:17.011Z","updated_at":"2025-07-29T01:37:15.734Z","avatar_url":"https://github.com/indoorvivants.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fullstack Scala application with Smithy4s\n\nThis is a full-stack Scala application (simple key-value management store), made with the following excellent libraries and technologies:\n\n1. [Scala 3](https://docs.scala-lang.org/scala3/new-in-scala3.html)\n2. [Smithy4s](https://disneystreaming.github.io/smithy4s/) and [Smithy](https://awslabs.github.io/smithy/2.0/index.html#) for the API and protocol \n   definition between backend and frontend (and in tests)\n3. [Scala.js](https://www.scala-js.org) and [Laminar](https://laminar.dev) for the [SPA](https://en.wikipedia.org/wiki/Single-page_application) frontend\n4. [PostgreSQL](https://www.postgresql.org) and [Doobie](https://tpolecat.github.io/doobie/) for database access \n5. [Weaver-Test](https://disneystreaming.github.io/weaver-test/) for unit and integration testing\n6. [Playwright](https://playwright.dev/) tests for frontend testing, using the dedicated [Weaver integration](https://github.com/indoorvivants/weaver-playwright)\n\nThe entire app is auto-deployed to [Fly.io](https://fly.io), you can see the **live version [here](https://smithy4s-fullstack-template.fly.dev)**\n\nIt is a dialed down version of the [Jobby app](https://jobby-smithy4s.herokuapp.com) I've built in my [4-part blogpost series](https://blog.indoorvivants.com/2022-06-10-smithy4s-fullstack-part-1).\nThe blog series should answer a lot of the design questions you might have in much \ngreater detail than the margins of this tome allow.\n\n![2022-08-22 17 21 03](https://user-images.githubusercontent.com/1052965/185972992-fb49f348-a33d-4e1a-aafa-7f9a01d3a9c1.gif)\n\n\n## What is it for?\n\nI'm building this template mainly for myself - there's a whole menagerie of borderline\nidiotic services I want to create at various points in time.\n\nHaving a non-trivial amount of glue code pre-written should let me deploy it very quickly.\n\nAdditionally, if you are interested in full-stack Scala development, you might be interested \nin this template.\n\nBear in mind, that everything about this is styled to my liking - but you don't have to \ndo it the same way! Once you cloned the template, the copy of the code is yours - be \nas ruthless and as pragmatic as you want about ripping out my precious code weeds.\n\nThat said, if your quarrel with templated code is of functional, rather than stylistical nature - \ni.e. _\"stuff doesn't work\"_ vs. _\"I hate how you structure your code\"_ - then please open an issue and let's make it better!\n\n## Running \n\nWhile most of the defaults are already configured, the only missing bit is the Postgres communication.\nIt can be picked up from the environment, but best way to do it would be to put a file named `env.opts`\nat the root of the project with a JDBC-compatible Postgres URL:\n\n```\nDATABASE_URL=postgres://postgres:mysecretpassword@localhost:5432/postgres\n```\n\nAfter that, just do `sbt app/reStart` and go to http://localhost:9000\n\n## Features\n\n- Database \n  - uses Doobie for database access and [Flyway](https://flywaydb.org) to apply migrations\n\n- Deployment\n  - uses [sbt-native-packager](https://sbt-native-packager.readthedocs.io/en/latest/) \n    to build a Docker container \n\n  - CI pushes the Docker container to Fly.io\n\n- Testing\n\n   - **stub** tests that use in-memory database implementation and don't exercise \n     the network or SQL queries\n\n   - **integration** tests that start a PostgreSQL container using [Testcontainers](https://www.testcontainers.org),\n     migrate a fresh copy of the database, start the actual HTTP server and run the tests \n     through that\n  \n   - both types of tests use exactly the same specifications, increasing code reuse\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findoorvivants%2Fsmithy4s-fullstack-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Findoorvivants%2Fsmithy4s-fullstack-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findoorvivants%2Fsmithy4s-fullstack-template/lists"}