{"id":16344243,"url":"https://github.com/cidem/lions-backend","last_synced_at":"2025-10-26T00:31:22.374Z","repository":{"id":46534393,"uuid":"348319849","full_name":"cideM/lions-backend","owner":"cideM","description":"A Simple Haskell Project","archived":false,"fork":false,"pushed_at":"2024-04-10T07:31:51.000Z","size":767,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-31T13:05:37.433Z","etag":null,"topics":["haskell","nix","nix-flake"],"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/cideM.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2021-03-16T11:22:00.000Z","updated_at":"2023-11-08T21:09:03.000Z","dependencies_parsed_at":"2024-01-07T17:46:23.085Z","dependency_job_id":"cd97ac2a-cc25-4eaa-83c7-b3c09be339fb","html_url":"https://github.com/cideM/lions-backend","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/cideM%2Flions-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cideM%2Flions-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cideM%2Flions-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cideM%2Flions-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cideM","download_url":"https://codeload.github.com/cideM/lions-backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238235674,"owners_count":19438725,"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","nix","nix-flake"],"created_at":"2024-10-11T00:27:35.140Z","updated_at":"2025-10-26T00:31:21.983Z","avatar_url":"https://github.com/cideM.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Website for the LIONS Club Achern, Germany\n\nThis website used to be a [playground for functional programming](https://www.fbrs.io/fp/) but I've since removed a few of the more niche technologies, such as:\n* NixOS\n* Nix for building the apps\n* Purescript\n* SOPS\n\nRight now, the technology stack includes:\n* Haskell\n* Tiny bit of Javascript\n* Twitter Bootstrap for CSS (TODO: Replace with vanilla CSS)\n* Docker\n* Fly.io\n* SQLite + Litestream\n* `go-migrate` to generate and run migrations\n* AWS SES for emails (user account creation and password retrieval)\n* AWS S3 for SQLite backups\n* Netlify takes care of DNS\n* AWS Route53 for the domain\n\n## Quickstart\n\nMake sure to have a `.envrc` file, like shown below. The secrets are in 1Password.\n\n```text\nuse flake\nPATH_add ./client/node_modules/.bin\nexport LITESTREAM_ACCESS_KEY_ID=\nexport LITESTREAM_SECRET_ACCESS_KEY=\nexport LITESTREAM_BUCKET=lions-achern-litestream-replica-1\nexport LITESTREAM_REPLICATE_PATH=local-macbook-1\nexport LITESTREAM_RESTORE_PATH=prod\n\nexport LIONS_SQLITE_PATH=$XDG_DATA_HOME/lions/db\nexport LIONS_SESSION_KEY_FILE=$XDG_DATA_HOME/lions/session.aes\nexport LIONS_ENV=development\nexport LIONS_SERVER_LISTEN_ADDR=127.0.0.1\nexport LIONS_SCRYPT_SIGNER_KEY=\nexport LIONS_SCRYPT_SALT_SEP=\nexport LIONS_AWS_SES_ACCESS_KEY=\nexport LIONS_AWS_SES_SECRET_ACCESS_KEY=\n\nexport AWS_PROFILE=\"lions-shared-admin\"\nexport AWS_DEFAULT_REGION=\"eu-central-1\"\n```\n\nThen you can just do `docker compose up --build` and everything should just work.\n\n## Tips \u0026 Tricks\n\n* You can start from a blank slate by just removing the Docker volume for SQLite. At the next start, Litestream will download the production backup.\n* `$ env -C backend ghcid --no-height-limit --clear --reverse`\n* `$ env -C backend ghcid --no-height-limit --clear --reverse --target=test:tests`\n\nTo restore the DB from S3 to your local file system use `litestream restore -o $LIONS_SQLITE_PATH s3://$LITESTREAM_BUCKET/$LITESTREAM_RESTORE_PATH`\n\n### Migrations\n\n- create: `migrate -database \"sqlite3://$LIONS_SQLITE_PATH\" -path backend/migrations create -dir backend/migrations -ext sql -seq add_activities`\n- version: `migrate -database \"sqlite3://$LIONS_SQLITE_PATH\" -path backend/migrations version`\n\n## Deploy\n\n`flyctl deploy`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcidem%2Flions-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcidem%2Flions-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcidem%2Flions-backend/lists"}