01
Closed sourceManufacturing ERP systems
Two independent implementations: steel structures (metalstruct) and woodworking (manufacture) — from order to shipping.
Up to 7 roles with different access scope (director, design engineer, process engineer, production manager, site foreman, procurement) and a multi-stage production cycle for a spec — from contract to installation, including warranty returns. manufacture adds multi-tenancy and in-app docx/xlsx editing via OnlyOffice Document Server, with self-hosted infrastructure on Supabase (PostgreSQL + PostgREST + Auth + Storage + Edge Functions).
Both systems were built and put into production at clients — they didn't stay pilots.
permissions.ts — role-based access (metalstruct)
export type OrgRole =
| "director" | "manager" | "head_constructor"
| "constructor" | "supply_manager" | "production_head" | "foreman";
export function hasRole(memberRoles: string[], ...required: OrgRole[]): boolean {
return required.some((r) => memberRoles.includes(r));
}
/**
* director, manager — full access
* head_constructor — all specs at design stages
* supply_manager — all specs (procurement handling)
* production_head, foreman — all specs (production/warehouse)
* constructor — only assigned specs
*/
export function canSeeAllSpecs(roles: string[]): boolean {
return hasRole(roles, "director", "manager", "head_constructor",
"supply_manager", "production_head", "foreman");
}
