3.0 KiB
3.0 KiB
Development Instructions
Current milestone
This repository implements the platform foundation milestone:
- workspace scaffolding
- local auth and RBAC
- company settings and branding
- file attachment storage
- CRM foundation through reseller hierarchy, contacts, attachments, and lifecycle metadata
- inventory master data, BOM, warehouse, stock-location, transactions, and item attachments
- sales quotes and sales orders with quick actions and quote conversion
- purchase orders with quick actions and searchable vendor/SKU entry
- purchase orders restricted to inventory items flagged as purchasable
- shipping shipments linked to sales orders and packing-slip PDFs
- Dockerized single-container deployment
- Puppeteer PDF pipeline foundation
Workflow
- Update the roadmap before starting large features.
- Keep backend and frontend modules grouped by domain.
- Add Prisma models and migrations for all persisted schema changes.
- Keep uploaded files on disk under
/app/data/uploads; never store blobs in SQLite. - Reuse shared DTOs and permission keys from the
sharedpackage. - Any non-filter UI that looks up records or items must use a searchable picker/autocomplete, not a long static dropdown.
- Inventory items must carry both
defaultCostanddefaultPrice; sales documents should default line pricing from the selected itemdefaultPrice. - Maintain the denser UI baseline on active screens; avoid reintroducing oversized
px-4 py-3style controls, tall action bars, or overly loose card spacing without a specific reason. - Treat the landing page as
Dashboard: a metric-oriented, modular command surface that should accumulate reusable operational panels over time. - Purchase-order item selection must be restricted to inventory items where
isPurchasable = true.
Operational notes
- Run
npm run prisma:generateafter schema changes. - Run
npm run prisma:migrateduring development to create versioned migrations. - Use
npm run prisma:deployin production environments. - Prefer Node 22 locally when running Prisma migration commands to match the Docker runtime.
- Branding defaults live in the frontend theme token layer and are overridden by the persisted company profile.
- Back up the whole
/app/datavolume to capture both the database and attachments. - Treat searchable lookup as a standing UX requirement for inventory, BOM, sales, purchasing, manufacturing, customer, vendor, and other operational record-picking flows. Filter-only controls can still use dropdowns.
- Extend the existing Puppeteer document pipeline when adding customer-facing or logistics PDFs instead of creating a parallel export mechanism.
- Add future dashboard features as modular metric/action panels instead of one-off hero sections or static marketing-style content.
Next roadmap candidates
- purchase receiving flow and vendor-side operational depth
- sales and purchasing document templates
- shipping labels, bills of lading, and logistics attachments
- manufacturing gantt scheduling with live project data
- broader audit and operations maturity