An example app built on the CELP (Commanded, Elixir, LiveView, PostgreSQL) stack.
Use this example "Honey Do" list app to experiment with CQRS/ES in Commanded. The domain is pretty simple. It's a todo list with a little extra sauce allowing developers lots of creative freedom.
Honeydew.mp4
You'll need to have PostgreSQL setup and running on your machine. My favourite way to get PostgreSQL setup is via Docker Desktop. Once you have docker installed, you can use this command to get PostgreSQL setup on your machine.
docker run --rm --name pg-docker -e POSTGRES_PASSWORD=postgres -d -p 5432:5432 postgres
To start your Phoenix server:
- Install dependencies with
mix deps.get
- Create and migrate your database with
mix setup
- Start Phoenix endpoint with
mix phx.server
or inside IEx withiex -S mix phx.server
Now you can visit localhost:4000
from your browser.
This app is not ready for production.
For an example of this app ported to use blunt
(Formerly cqrs_tools
) checkout the with_blunt
branch!
If you have a local copy of the with_cqrs_tools
branch, you'll want to update with the following commands.
git branch -m with_cqrs_tools with_blunt
git fetch origin
git branch -u origin/with_blunt with_blunt
git remote set-head origin -a
- Official website: https://www.phoenixframework.org/
- Guides: https://hexdocs.pm/phoenix/overview.html
- Docs: https://hexdocs.pm/phoenix
- Forum: https://elixirforum.com/c/phoenix-forum
- Source: https://github.com/phoenixframework/phoenix
- Commanded: https://hexdocs.pm/commanded/1.2.0/Commanded.html
This is a SUPER rough example meant to get you started without much hassle. It's not meant to be a complete guide.
If you have any questions, feel free to reach out to me:
- on the Elixir Slack @threequarterspi.
- on twitter @threequarterspi
- on github @quarterpi