puemos

puemos

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

Showing Posts 1 to 9

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 OP

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

puemos OP

Amazing, will make the change. Thank you

Dmk

Dmk

Getting this when trying to login

puemos

puemos OP

Strange, work fine for me. I’ll debug

code-shoily

code-shoily

Works for me too. Just tried.

SyntaxSorcerer

SyntaxSorcerer

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!

itekhi

itekhi

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

— All posts loaded —

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 91898 914
New
AstonJ
The obligatory hello world thread! Who are you and where are you from? :stuck_out_tongue:
4616 55835 594
New
byu
@chrismccord : I just saw the Extract AGENTS.md from Phoenix.new into phx.new generator commit to the phoenix project. My initial shotgu...
New
arcanemachine
I was working on an Ecto migration and I needed a timestamp. So, for the nth time, I looked up the different data types for timestamps, a...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
New
matt-savvy
Is there a word for the ~> symbol used in Version strings? Do you also just call it a Squiggle Arrow™ ?!
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews