{"id":17820640,"url":"https://github.com/mwotton/hstemplate","last_synced_at":"2025-10-24T12:53:17.279Z","repository":{"id":66821610,"uuid":"262696755","full_name":"mwotton/hstemplate","owner":"mwotton","description":"a template for building apps the way i like 'em.","archived":false,"fork":false,"pushed_at":"2021-03-01T14:35:42.000Z","size":143,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-08T01:25:30.129Z","etag":null,"topics":["haskell","servant","squeal","starter-template"],"latest_commit_sha":null,"homepage":"","language":"Haskell","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/mwotton.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":"2020-05-10T02:24:36.000Z","updated_at":"2021-03-01T14:35:45.000Z","dependencies_parsed_at":"2023-04-23T06:33:18.798Z","dependency_job_id":null,"html_url":"https://github.com/mwotton/hstemplate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwotton%2Fhstemplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwotton%2Fhstemplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwotton%2Fhstemplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwotton%2Fhstemplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mwotton","download_url":"https://codeload.github.com/mwotton/hstemplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246794207,"owners_count":20834938,"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","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":["haskell","servant","squeal","starter-template"],"created_at":"2024-10-27T17:06:55.495Z","updated_at":"2025-10-24T12:53:12.260Z","avatar_url":"https://github.com/mwotton.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# best-practices haskell template\n\n![CI](https://github.com/mwotton/hstemplate/workflows/CI/badge.svg)\n\nThis is a distillation of all the annoying tasks I end up setting up\nanyway.\n\n## controversial decisions\n\n- top level monorepo, package directories beneath\n\nI almost always end up structuring apps as a collection of packages anyway, so\nit makes sense to set it up that way from the beginning\n\n- no default-extensions\n\nthey are convenient, but it always seems to break tooling. Put the extensions you need in the file and be done with it.\n\n- stack\n\nthis is probably the most controversial thing here, and the one I'm\nleast wedded to. it works well enough for now.\n\n- ghcide-friendly\n\nthis one is rough. ghcide is great, but [this bug](https://github.com/digital-asset/ghcide/issues/113) means that you have to include test dependencies at the top level. Hopefully this will be fixed soon.\n\n- Makefile for task-running\n\nneeds _something_ for things like preflights and non-haskell dependency checking\n\nTODO\n\n- we should illustrate best practices for error handling - HasCallStack etc.\n- `make testwatch` has some relative-path issues to do with finding sqitch plans. Use Paths.\n- should deployment be gated on passing tests in github? if so, perhaps we\n  want to deploy from github at the end of a push.\n- migration testing\n  - possibility for multi-prod system\n\t- stash databases as docker images: name schema project-YYYY-MM-DD\n\t- migration tester can build a new image\n  - but... we don't really need that. all that we really need is a push to staging and a healthcheck\n  - also staging should pull prod's db in order to migrate it?\n- announce deploys somewhere\n- authn\n  - actually provide way to use logged-in status and identity\n- authz\n  - how hardcore do we want to be?\n\t- could use https://github.com/Simspace/avaleryar\n\t- should it be baked into the servant type?\n\t- probably needs to talk about tiers of service too\n- rationing/quotas - not quite the same thing as authz.\n  - could we lean on honeycomb instead? set an alert for egregious abuse?\n- coverage ratchet\n- payments\n  - https://stripe.com/docs/billing/subscriptions/fixed-price#how-to-model-it-on-stripe\n  - https://github.com/dmjio/stripe\n  - can get rid of the fake endpoints and migrations now, as there will be a real User model.\n  - add webhook stuff\n\n\nRUMINATIONS\n\n- property enforcement mechanisms\n  - emacs save hook\n  - ghc source plugin\n\t- cool idea, but needs to be added to the dependencies. devflag?\n  - commit-hook\n\t- still need to run installer script\n  - post-commit github action\n\n- desirable properties\n  - hlint\n  - remove unused imports\n  - autoformat\n- current situation\n  - hlint/emacs save hook\n  - autoformatting via git hook\n- possible replacements\n  - hlint/source plugin\n\t- https://hackage.haskell.org/package/splint\n  - unused-imports/source-plugin\n\t- https://github.com/kowainik/smuggler\n- non-enforcement source plugins\n  - https://github.com/ArturGajowy/ghc-clippy-plugin/ better error messages\n\n- healthchecks\n  - unclear what to do here.\n  - Should a healthcheck failure block a release?\n  - what if it's due to external circumstances?\n- benchmarks\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwotton%2Fhstemplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmwotton%2Fhstemplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwotton%2Fhstemplate/lists"}