puemos

puemos

Craftplan - Open-source production management for small manufacturers

My wife was planning to open a micro-bakery and we started looking at software to manage recipes, inventory, orders, and production. Everything was either expensive, too generic, or both. The workflows for a small-batch manufacturer aren’t that complex, but the pricing acts like they are.

So I built Craftplan. All the features were tailored to what she actually needed, and I figured other small-scale manufacturers (soap makers, breweries, candle makers, etc.) probably need the same things. So I’m putting it out there for free.

What it does:

  • Product catalog with versioned recipes (BOMs) and automatic cost rollups across materials, labor, and overhead
  • Inventory tracking with lot traceability, expiry dates, allergen/nutrition flags, and demand forecasting
  • Order processing with calendar-based scheduling and allocation to production batches
  • Production planner with make sheets, material consumption from specific lots, and cost snapshots
  • Purchase orders with receiving workflow that auto-creates inventory lots
  • Basic CRM for customers and suppliers
  • CSV import/export, iCal calendar feed, JSON:API and GraphQL endpoints

Experience building with Elixir, Ash and Liveview

  • Speed: you get to test and improve things sooo fast. The DSL makes it simple to translate your thinking into live product
  • Extensibility: With Ash + LiveView you can add more features so easily. Adding JSON:API + Grapghql was a few minutes.
  • UX: I believe LiveView makes it simple to deliver great UX since it forcing you to keep things simple with no so much interaction overhead which most of the time means better and simple experience

Self-hosting:

Docker image: ghcr.io/puemos/craftplan (amd64 + arm64)

Docker Compose bundles PostgreSQL 16 + MinIO.

curl -O https://raw.githubusercontent.com/puemos/craftplan/main/docker-compose.yml
curl -O https://raw.githubusercontent.com/puemos/craftplan/main/.env.example
cp .env.example .env
docker compose up -d

Other details:

  • Email config from UI (SMTP, SendGrid, Mailgun, Postmark, Brevo, Amazon SES)
  • API keys encrypted at rest (AES-256-GCM)
  • Role-based access (admin/staff)
  • Tech stack: Elixir, Ash Framework, Phoenix LiveView, PostgreSQL
  • License: AGPLv3

Feedback welcome (and needed!)

Most Liked

code-shoily

code-shoily

This looks fantastic. The UI is :+1: . Will take a look at the code later today, hope there’d be a lot for me to learn from! Thank you for building and sharing this.

puemos

puemos

Feel free to ask anything, will be happy to share :slight_smile:

FlyingNoodle

FlyingNoodle

Since you wrote that you welcome feedback. Doing this in a LiveView is not recommended in ash:

Ash.read!(Craftplan.CRM.Customer,
         actor: socket.assigns[:current_user],
         load: [:billing_address, :shipping_address, :full_name]
       )

https://github.com/puemos/craftplan/blob/main/lib/craftplan_web/live/manage/customer_live/index.ex#L63

Instead, you should define idiomatic actions on your resources and domains: Actions — ash v3.29.3

So in this case I would use the Ash action that you already have defined in your domain:

Craftplan.CRM.list_customers!(actor:  socket.assigns.current_user, load: [:billing_address, :shipping_address, :full_name])

Where Next?

Popular in Discussions Top

praveenperera
How We Replaced React with Phoenix By: Thought Bot
New
hazardfn
I suppose this question is effectively hackney vs. ibrowse but we are at a point in our project where we have to make a choice between th...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
Markusxmr
Since Drab has been developed for a while in the open, introducing the Liveview functionality in a way it happend appears to undermine th...
New
fireproofsocks
This is more of a general question, but I’m wondering how other people in the community think about the pattern matching in function sign...
New
slashdotdash
Phoenix Live View is now publicly available on GitHub. Here’s Chris McCord’s tweet announcing making it public.
New
Fl4m3Ph03n1x
Background A few days ago I was listening to The future of Elixir from Elixir Talks, with Dave Thomas (@pragdave ) and Brian Mitchell. I...
New
mmmrrr
Just saw that dhh announced https://hotwire.dev/ Is it just me or is this essentially live view? :smiley: Although I like the “iFrame-e...
New
laiboonh
Hi all, I am trying to convince my team to use liveview over the current react. What are some of the points where one should consider us...
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 127089 1222
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52673 488
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement