https://github.com/juspay/todo-app
A demo Haskell app showing the use of Nix with flake-parts to simplify various dev workflows
https://github.com/juspay/todo-app
Last synced: about 1 year ago
JSON representation
A demo Haskell app showing the use of Nix with flake-parts to simplify various dev workflows
- Host: GitHub
- URL: https://github.com/juspay/todo-app
- Owner: juspay
- License: mit
- Created: 2023-03-10T15:00:31.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-10-25T08:56:22.000Z (over 1 year ago)
- Last Synced: 2025-06-19T04:41:45.102Z (about 1 year ago)
- Language: Haskell
- Homepage:
- Size: 76.2 KB
- Stars: 10
- Watchers: 6
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# todo-app
A simple TODO app in Haskell using [PostgREST](https://postgrest.org/) as a RESTful API for [PostgreSQL](https://www.postgresql.org/).
> [!NOTE]
> This app is a demo to showcase how developer experience in a Haskell project can be improved using Nix. We primarily use [haskell-flake], [services-flake] and [flake-parts] to achieve this.
[haskell-flake]: https://community.flake.parts/haskell-flake
[services-flake]: https://community.flake.parts/services-flake
[flake-parts]: https://flake.parts
## Tutorial
Learn with [our blog post series](https://nixos.asia/en/nixify-haskell):
- [Introduction](https://nixos.asia/en/nixify-haskell-nixpkgs)
- [Switch to flake-parts](https://nixos.asia/en/nixify-haskell-parts)
- [Simplify Nix using haskell-flake](https://nixos.asia/en/nixify-haskell-flake)
- [Integrate external services using services-flake](https://nixos.asia/en/nixify-services-flake)
- ...
## Getting Started
[Install Nix](https://nixos.asia/en/install)
## Development
```sh
nix develop
```
To enter development shell on `cd`, use [direnv](https://nixos.asia/en/direnv)
> [!NOTE]
> `just services` starts postgres and postgrest, both of which bind to Unix socket.
```sh
just services
# Watch for changes in the Haskell code
just watch
```
## Run through Nix
> [!NOTE]
> `todo-app-services-tcp` starts postgres, which listens on Unix socket, while postgrest listens on TCP port 3000.
```sh
nix run github:juspay/todo-app#todo-app-services-tcp
nix run github:juspay/todo-app -- view
```