├── .envrc ├── .github └── workflows │ └── ci.yaml ├── .gitignore ├── ARCHITECTURE.md ├── LICENSE ├── README.md ├── Taskfile.yml ├── app └── Main.hs ├── config.toml ├── docker-compose.yml ├── elm ├── .gitignore ├── README.md ├── elm.json ├── index.js └── src │ ├── Anonymous.elm │ ├── Component.elm │ ├── Credentials.elm │ ├── Logged.elm │ ├── LoggedModel.elm │ ├── Main.elm │ ├── Style.elm │ └── Tags.elm ├── flake.lock ├── flake.nix ├── hie.yaml ├── package.yaml ├── schema.sql ├── scripts └── db │ ├── destroy │ └── setup ├── servant-template.cabal ├── spec ├── Spec.hs ├── TaggerSpec.hs └── TestServices.hs └── src ├── API ├── AppServices.hs ├── Application.hs ├── Authentication.hs ├── Config.hs ├── Docs.hs ├── Healthcheck.hs └── Tagger.hs ├── App.hs ├── CLIOptions.hs ├── Dependencies.hs ├── Impl ├── Authentication │ └── Authenticator.hs └── Repository │ ├── Content.hs │ ├── Content │ ├── InMemory.hs │ └── Postgres.hs │ ├── User.hs │ └── User │ ├── Error.hs │ ├── InMemory.hs │ └── Postgres.hs ├── Infrastructure ├── Authentication │ ├── PasswordManager.hs │ └── Token.hs ├── Database.hs ├── Logging │ └── Logger.hs ├── Persistence │ ├── Queries.hs │ ├── Schema.hs │ └── Serializer.hs └── SystemTime.hs ├── Middleware.hs └── Tagger ├── Authentication ├── Authenticator.hs └── Credentials.hs ├── Content.hs ├── EncryptedPassword.hs ├── Id.hs ├── JSONWebKey.hs ├── Owned.hs ├── Repository ├── Content.hs └── User.hs ├── Tag.hs └── User.hs /.envrc: -------------------------------------------------------------------------------- 1 | use flake -------------------------------------------------------------------------------- /.github/workflows/ci.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/.github/workflows/ci.yaml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/.gitignore -------------------------------------------------------------------------------- /ARCHITECTURE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/ARCHITECTURE.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/README.md -------------------------------------------------------------------------------- /Taskfile.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/Taskfile.yml -------------------------------------------------------------------------------- /app/Main.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/app/Main.hs -------------------------------------------------------------------------------- /config.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/config.toml -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/docker-compose.yml -------------------------------------------------------------------------------- /elm/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | elm-stuff 4 | index.html 5 | -------------------------------------------------------------------------------- /elm/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/elm/README.md -------------------------------------------------------------------------------- /elm/elm.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/elm/elm.json -------------------------------------------------------------------------------- /elm/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/elm/index.js -------------------------------------------------------------------------------- /elm/src/Anonymous.elm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/elm/src/Anonymous.elm -------------------------------------------------------------------------------- /elm/src/Component.elm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/elm/src/Component.elm -------------------------------------------------------------------------------- /elm/src/Credentials.elm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/elm/src/Credentials.elm -------------------------------------------------------------------------------- /elm/src/Logged.elm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/elm/src/Logged.elm -------------------------------------------------------------------------------- /elm/src/LoggedModel.elm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/elm/src/LoggedModel.elm -------------------------------------------------------------------------------- /elm/src/Main.elm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/elm/src/Main.elm -------------------------------------------------------------------------------- /elm/src/Style.elm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/elm/src/Style.elm -------------------------------------------------------------------------------- /elm/src/Tags.elm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/elm/src/Tags.elm -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/flake.lock -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/flake.nix -------------------------------------------------------------------------------- /hie.yaml: -------------------------------------------------------------------------------- 1 | cradle: 2 | cabal: 3 | -------------------------------------------------------------------------------- /package.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/package.yaml -------------------------------------------------------------------------------- /schema.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/schema.sql -------------------------------------------------------------------------------- /scripts/db/destroy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/scripts/db/destroy -------------------------------------------------------------------------------- /scripts/db/setup: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/scripts/db/setup -------------------------------------------------------------------------------- /servant-template.cabal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/servant-template.cabal -------------------------------------------------------------------------------- /spec/Spec.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -F -pgmF hspec-discover #-} 2 | -------------------------------------------------------------------------------- /spec/TaggerSpec.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/spec/TaggerSpec.hs -------------------------------------------------------------------------------- /spec/TestServices.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/spec/TestServices.hs -------------------------------------------------------------------------------- /src/API/AppServices.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/API/AppServices.hs -------------------------------------------------------------------------------- /src/API/Application.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/API/Application.hs -------------------------------------------------------------------------------- /src/API/Authentication.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/API/Authentication.hs -------------------------------------------------------------------------------- /src/API/Config.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/API/Config.hs -------------------------------------------------------------------------------- /src/API/Docs.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/API/Docs.hs -------------------------------------------------------------------------------- /src/API/Healthcheck.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/API/Healthcheck.hs -------------------------------------------------------------------------------- /src/API/Tagger.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/API/Tagger.hs -------------------------------------------------------------------------------- /src/App.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/App.hs -------------------------------------------------------------------------------- /src/CLIOptions.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/CLIOptions.hs -------------------------------------------------------------------------------- /src/Dependencies.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Dependencies.hs -------------------------------------------------------------------------------- /src/Impl/Authentication/Authenticator.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Impl/Authentication/Authenticator.hs -------------------------------------------------------------------------------- /src/Impl/Repository/Content.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Impl/Repository/Content.hs -------------------------------------------------------------------------------- /src/Impl/Repository/Content/InMemory.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Impl/Repository/Content/InMemory.hs -------------------------------------------------------------------------------- /src/Impl/Repository/Content/Postgres.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Impl/Repository/Content/Postgres.hs -------------------------------------------------------------------------------- /src/Impl/Repository/User.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Impl/Repository/User.hs -------------------------------------------------------------------------------- /src/Impl/Repository/User/Error.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Impl/Repository/User/Error.hs -------------------------------------------------------------------------------- /src/Impl/Repository/User/InMemory.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Impl/Repository/User/InMemory.hs -------------------------------------------------------------------------------- /src/Impl/Repository/User/Postgres.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Impl/Repository/User/Postgres.hs -------------------------------------------------------------------------------- /src/Infrastructure/Authentication/PasswordManager.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Infrastructure/Authentication/PasswordManager.hs -------------------------------------------------------------------------------- /src/Infrastructure/Authentication/Token.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Infrastructure/Authentication/Token.hs -------------------------------------------------------------------------------- /src/Infrastructure/Database.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Infrastructure/Database.hs -------------------------------------------------------------------------------- /src/Infrastructure/Logging/Logger.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Infrastructure/Logging/Logger.hs -------------------------------------------------------------------------------- /src/Infrastructure/Persistence/Queries.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Infrastructure/Persistence/Queries.hs -------------------------------------------------------------------------------- /src/Infrastructure/Persistence/Schema.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Infrastructure/Persistence/Schema.hs -------------------------------------------------------------------------------- /src/Infrastructure/Persistence/Serializer.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Infrastructure/Persistence/Serializer.hs -------------------------------------------------------------------------------- /src/Infrastructure/SystemTime.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Infrastructure/SystemTime.hs -------------------------------------------------------------------------------- /src/Middleware.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Middleware.hs -------------------------------------------------------------------------------- /src/Tagger/Authentication/Authenticator.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Tagger/Authentication/Authenticator.hs -------------------------------------------------------------------------------- /src/Tagger/Authentication/Credentials.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Tagger/Authentication/Credentials.hs -------------------------------------------------------------------------------- /src/Tagger/Content.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Tagger/Content.hs -------------------------------------------------------------------------------- /src/Tagger/EncryptedPassword.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Tagger/EncryptedPassword.hs -------------------------------------------------------------------------------- /src/Tagger/Id.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Tagger/Id.hs -------------------------------------------------------------------------------- /src/Tagger/JSONWebKey.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Tagger/JSONWebKey.hs -------------------------------------------------------------------------------- /src/Tagger/Owned.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Tagger/Owned.hs -------------------------------------------------------------------------------- /src/Tagger/Repository/Content.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Tagger/Repository/Content.hs -------------------------------------------------------------------------------- /src/Tagger/Repository/User.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Tagger/Repository/User.hs -------------------------------------------------------------------------------- /src/Tagger/Tag.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Tagger/Tag.hs -------------------------------------------------------------------------------- /src/Tagger/User.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tweag/servant-template/HEAD/src/Tagger/User.hs --------------------------------------------------------------------------------