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!)

31 Likes

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.

2 Likes

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

2 Likes

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]
       )

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

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])
2 Likes

Amazing, will make the change. Thank you

1 Like

Getting this when trying to login

Strange, work fine for me. I’ll debug

Works for me too. Just tried.

I just saw this on HN and came here to see if you posted about it. Super cool! I’m just starting to get into Ash and I appreciate having projects to be able to compare with the demo apps in the books I’m reading.

Thanks for sharing!

2 Likes

Hello. Great work :+1: I love how much features this has, and the UI is good! (mobile needs a bit work with overflows & horizontal scrolling though :eyes:)

I thought why not be able to save allergies of customers? Or you wanna do them order-specific? (calendar view for orders btw - good stuff :+1:)