Woodworking ERP First Thoughts
Published on 05 Jan 2023
I want to build a very simple ERP (Enterprise Resource Planning) tool for my home-based woodworking.
Context
I have a setup at home to work with reclaimed lumber, which suffers from various defects:
- Warping
- Cupping
- Bowing
- Rough edges
- Rough faces
- Embedded metal, i.e. nails or screws
- Dirt, concrete, or old finish
In order to work with this lumber, I need to process each board such that it will satisfy the following conditions:
- Straight, parallel edges
- Planed, parallel faces
- Clean surface
- No embedded metal
Specifications
Primary Application
- Keep an inventory of rough, reclaimed lumber.
- Record the changes in cleaning up and straightening the rough lumber.
- Record the products that are created from the lumber.
Secondary Application
- Keep track of machines
- Keep track of tools, both hand tools and power tools
- Keep track of consumables, e.g. screws
Initial Development
The central Model is the Lumber
, which contains the following attributes:
Attribute | Type | Description |
---|---|---|
uuid | string | A barcode generated in advance, printed, and applied to each board |
length | float | Initially the length of the rough board |
width_start, width_end | float | Width measured at each end, can differ on a skew board |
thickness_start, thickness_end | float | Thickness measured at each end, can differ on a tapered board |
wood_type | reference | Reference to the WoodType model |
straight_edge | boolean | Whether the straight-edge jig has been used |
parallel_edges | boolean | Whether the opposite edge has been cut using the straight-edge as a reference |
planed_face | boolean | Whether the planing jig has been used |
parallel_faces | boolean | Whether the opposite face has been planed using the planed face as a reference |
square | boolean | Whether all sides in all directions are square, i.e. whether the board is ready to be used |
timestamps | datetime | created_at and updated_at |
changelog | jsonb | A JSON Array of Objects, each one containing all of the above attributes and a timestamp, to allow changes to be tracked |
The Lumber
model has the following relationships:
belongs_to :barcode
belongs_to :wood_type
belongs_to :product, through: :lumber_products
Workflow
- Generate a mass of Barcode records, where the UUID is translated into a barcode.
- Print the barcodes, to have on hand.
- Attach a barcode to each board of reclaimed lumber
- In the
lumber
create form, enter the board’s attributes along with the barcode - Use the barcode to bring up the
lumber
edit form to update attributes during or after processing.
all tags
activerecord android annoyances api apt arch array artix atom az3w backend bash blog browser bug callback career cli cloud code coding config configuration cp crud css database db design devops django email erp filter fugitive gif gist git gnome grep hebrew http ide isbn-fetcher iso javascript job search js kanban kanban\ kindle koans linux logger manjaro map markdown microservices mobi mtp neovim nodejs packages pastbin patch post python rails reduce refactoring rest routes rspec ruby scripting security sed shell sql string_replacement study tdd terminal testing version_control vim walkthrough workflow