Overview
The platform unifies these domain workflows behind strict tenant isolation and role-based permissions — multi-item custom orders assigned to individual karigars, dual PDFs (customer copy vs. margin-stripped karigar copy), QR-scannable box inventory, and GPS-geofenced attendance with late-fine payroll math.
Problem & Context
Generic ERPs don't fit jewellery workflows: they can't hide customer identity and margins from workshop craftsmen, track metal purity and rate-booking, manage physical stone-sample custody, or reconcile QR-labelled packaging on the shop floor.
Key Capabilities
- Multi-tenant isolation combining app middleware with PostgreSQL row-level security
- RBAC with granular permissions and per-tenant module gates
- Retail and wholesale multi-item orders with event-sourced timelines
- Dual PDF generation with karigar-copy PII and margin stripping
- QR packaging inventory with tenant-validated tokens
- Geofenced attendance with late-fine and payroll calculation
Engineering Notes
Dual-layer multi-tenancy
Every session sets app.current_tenant_id and PostgreSQL FORCE ROW LEVEL SECURITY guards business tables, so a missed WHERE clause still cannot leak cross-tenant rows.
Canvas-level PII stripping for artisan PDFs
Customer and karigar copies render through separate ReportLab pipelines; customer identity and pricing are removed before bytes leave the server.
Event-sourced multi-item orders
Sub-jobs carry individual karigars, dates, and lifecycles, backed by an immutable order-events timeline.
Tenant-validated QR tokens
Signed payloads embed tenant identity; scanning a foreign-tenant box is rejected before stock is touched.
Verified in the Repository
Facts below are verified in the project's source repository (static code audit). They are not runtime or business metrics.
- 17 backend test suites with 22+ automated passes
- 36 relational tables across 19 Alembic migrations
- Row-level security enforced across business tables
- Per-IP and per-tenant rate limiting via Redis
Current Status & Limitations
MVP · Beta (feature-complete).
- Configured for single-host Docker Compose; horizontal scale needs connection pooling (PgBouncer).
- WhatsApp uses manual wa.me links; an automated Cloud API is planned.
- Some frontend CSV exports are stubs not yet wired to the backend export endpoints.
Tech Stack
Links & Availability
Source repository and demo access are shared during technical discovery.