Construction ERP · Phase 1
System Architecture & Role-Based Access Documentation
A single shared reference for Sarjan and the development team: how the company is structured in the system, who can do what at every level, and how the system behaves when several projects and several sites are all active at once.
Sheet 01 / Purpose & scope
Organisational hierarchy
The system is built around a fixed three-level hierarchy. It is not a one-project-at-a-time system: at any point Sarjan may have Project A (with Site 1 and Site 2 active) and Project B (with Site 3 active) running side by side, each with its own team, fund and HR data — all visible to Head Office at once.
Level 1
Company
Head Office. One legal entity, the top of the tree. All policy, fund release and master data control sits here.
Level 2
Project
A contract or client engagement. Sarjan runs many projects at the same time.
Level 3
Site
A physical work location under a project. One or many per project, all active in parallel.
Concrete example
Every project and every site in this tree can be active simultaneously — nothing here is a "current project" you switch into.
Example structure (as agreed with client)
| Level | Example | Runs in parallel? | Owned by |
|---|---|---|---|
| Company | Sarjan (single legal entity) | — | Managing Director / HO |
| Project | Project A, Project B, Project C … | Yes — unlimited concurrent projects | Project Manager, assigned per project |
| Site | Site 1, Site 2 under Project A | Yes — unlimited concurrent sites per project | Project Manager / Site In-charge |
Sheet 02 / Section 3
Core structural principles
Four rules, confirmed with the client, are enforced at the data-model level rather than left to process discipline alone.
3.1
Site fund isolation
A site's fund is a ledger scoped strictly to that site. No transaction type moves money directly between sites. Money only ever moves HO → Site (allocation) or Site → HO (return/reconciliation). If two sites need funds, HO makes two separate allocations.
3.2
Employee – site lock
An employee record carries exactly one active site assignment, never a list. There is no "reassign to another site" action — a genuine site change is relieving from the old site and fresh onboarding at the new one, so attendance and fund records are never ambiguous.
3.3
Per-site HR portal
Attendance, muster and HR data are partitioned by site. Each site's Time Keeper, Site Admin / Labour Welfare, Site Accountant and PM / Site In-charge operate within their authorized scope. HO HR sees data rolled up across all active projects and sites.
3.4
Dynamic, PM-defined roles
Site-level roles are not hardcoded. The PM / Site In-charge can create and name Site roles per the site's scale and operating requirements. What remains fixed is the permission template linked to the role — see Sheet 06.
Sheet 03 / Section 4.1
Head Office roles — fixed
Roles fall into three tiers: HO roles (centrally controlled, company-wide), Site roles (dynamic, created per site) and the External role. HO roles are centrally defined; multiple users may be assigned to the same HO role.
Managing DirectorCompany-wide›
- Approve above delegated limits
- Approve tenders and budgets
- Review cash flow weekly
- Approve new vendors above threshold
Head – PurchaseCompany-wide›
- Vendor master
- RFQ and comparative statements
- Issue POs and work orders
- Vendor rating
- Central stock
Head – Accounts & FinanceCompany-wide›
- Cash flow forecast
- Release payments
- Statutory dues
- Receivables follow-up
- Project P&L
Manager – HR & AdminCompany-wide›
- Worker/employee master integrity
- Payroll run
- HR compliance
- Discipline
- Welfare audit
- Company-wide HR control
Manager – HSECompany-wide›
- Safety standards and audits
- Incident investigation
- Training calendar
- Statutory safety compliance
Manager – QA/QCCompany-wide›
- Quality plan and test regime
- NCR closure
- Material approvals
- Third-party test coordination
ERP AdministratorCompany-wide›
- User creation and access
- Master data control
- Change requests
- Backup and audit trail
Sheet 04 / Section 4.2
Site roles — dynamic, created per site
This is the role list already agreed with the client. The Project Manager / Site In-charge creates and names Site roles according to the approved site structure and scale — but every role, however named, is linked to one of the fixed permission templates in Sheet 06. The 13 roles below are the confirmed baseline set.
Project Manager / Site In-chargeHeadcount: 1›
- Deliver the Site to programme, cost, quality and safety
- Approve daily muster
- Approve indents within delegated band
- Client interface
- Coordinate Site manpower and HR operations
Senior Site EngineerHeadcount: 1›
- Plan and drive weekly execution
- Verify measurement
- Verify indents
- Deputise for PM
Site Engineer (Civil)Headcount: 2–3›
- Execute assigned zone
- Raise material indent
- Record daily progress
- Supervise subcontractor work face
Billing / QS EngineerHeadcount: 1›
- Joint measurement
- Client RA bill
- Certify subcontractor RA bill
- Quantity reconciliation against budget
SurveyorHeadcount: 1›
- Setting out and levels
- As-built records
- Earthwork quantities
QA/QC EngineerHeadcount: 1 (may cover 2 sites)›
- Pour card clearance
- Cube and material tests
- Raise and track NCRs
- Checklist enforcement
Shared-site role: retains one Home/HR Site and receives a separate, explicit Site assignment for the second site — see Sheet 10.
Safety Officer / StewardHeadcount: 1›
- Issue permits to work
- Daily toolbox talk
- Site safety inspection
- Incident reporting
Store KeeperHeadcount: 1›
- Daily stock
- Monthly physical reconciliation
- Scrap register
- Material request
Site Accountant / CashierHeadcount: 1 (may cover 2 sites)›
- Site cash and imprest
- Verify vendor and hire bills
- Wage disbursement
- Site expense booking
Shared-site role: retains one Home/HR Site and receives a separate, explicit Site assignment for the second site — see Sheet 10.
Plant & Machinery In-chargeHeadcount: 1 (may be shared)›
- Machine log and utilisation
- Fuel issue and reconciliation
- Hire bill verification
- Breakdown log
Junior Engineer / SupervisorHeadcount: 2–4›
- Supervise gangs at work face
- Check work against drawing before it is covered
- Daily progress input
Time Keeper / Muster ClerkHeadcount: 1›
- Daily muster for all three worker categories
- Gate register
- Worker registration
- PPE issue log
Site Admin / Labour WelfareHeadcount: 1›
- Labour accommodation and welfare
- Statutory displays and registers
- Records
- First-level grievance
Worth flagging for sign-off: §4.4 names this role under "Site – read only," but the Access Control Matrix (Sheet 11) gives it create/view rights on its own welfare records — the two sections disagree slightly and should be reconciled in the final RBAC configuration.
Purchase (Site)Headcount: 1›
Listed in the working Site Role & HR sheet as a Site-scope role with headcount 1, but with no accountabilities recorded yet, and it does not appear in the Client Review v2 role table.
Open item: confirm with client whether this is a distinct role (site-level purchase indenting, separate from Site Engineer) or a duplicate/earlier draft to be dropped from the final role list.
Sheet 05 / Section 4.3
External role
Subcontractor-side access, deliberately limited to submission — nothing is approved on the external side of the boundary.
Subcontractor Supervisor / MukadamExternal›
- Supply and supervise the gang
- Submit gang attendance for verification
- Joint measurement participation
Sheet 06 / Section 4.4
Permission template model — how "dynamic" stays safe
Free-text role creation without an underlying permission structure would mean every new role needs custom code, which defeats the purpose of "dynamic." Instead, every role — fixed or PM-created — must be linked to one of a small, fixed set of permission templates. The Project Manager picks a template when naming a new role for their site; the template — not the role name — is what the system enforces.
| Template | Data scope | Typical actions | Example roles |
|---|---|---|---|
| HO – admin | All companies, projects, sites | Full config, user & master data control | ERP Administrator |
| HO – approver | All projects/sites (read); approvals company-wide | Approve above delegated Site-level limits; release/approve funds and company-level transactions within authority | MD, Head–Purchase, Head–Accounts, Managers |
| Site – approver | Own site only | Approve indents/expenses within band, approve muster | PM / Site In-charge, Senior Site Engineer, other approved Site approver roles |
| Site – data entry | Own site only | Raise indents, log progress, record stock/muster | Site Engineer, Store Keeper, Time Keeper, and other approved Site data-entry roles |
| Site – read only | Own site only | View dashboards and reports, no edit | Site Admin, auditors |
| External – limited | Own gang/scope only, submission only | Submit attendance/measurement for verification | Subcontractor Supervisor / Mukadam |
| Site – functional access | Explicitly assigned Site(s) only | Perform approved function at each assigned Site; no unrestricted Site switching | QA/QC Engineer, Site Accountant / Cashier, Plant & Machinery In-charge |
Sheet 07 / Section 5 + HR working sheet
HR & payroll architecture
HR and payroll are built around three worker categories, each with a different employer-of-record, pay cycle and attendance owner — this is what makes multi-site labour management workable at scale.
| Code | Category | On whose rolls | Paid by | Attendance owner |
|---|---|---|---|---|
| A | Company staff (PM, engineers, supervisors, QS, store, accounts, HSE, admin) | Company | Company payroll, monthly | Self check-in, approved by PM |
| B | Direct site labour (daily/weekly wage, engaged directly) | Company | Company, fortnightly | Time Keeper, countersigned by Site Engineer, last check by PM |
| C | Subcontractor labour (item-rate / piece-rate scope) | Subcontractor | Subcontractor, against certified measurement | Subcontractor supervisor, verified by Time Keeper, last check by PM |
5.1 Pay cycle
| Category | Cycle | Cut-off | Pay by | Mode |
|---|---|---|---|---|
| A — Staff | Monthly | Last day of month | 7th of following month | Bank transfer only |
| B — Direct labour | Fortnightly | Last day of month | Within 10 days of cut-off | Bank transfer; cash by written exception only |
| C — Subcontractor | Against certified RA bill | Per work order | Per work order terms | Bank transfer to subcontractor |
5.2 Site working hours & compliance rules
- Standard site day: 9 hours on site including 1 hour rest — 8 working hours. Default 08:00–17:00, adjustable per site by the Project Manager with Head–Projects approval.
- Weekly off: Sundays are half day, approval needed by Project Manager.
- Ordinary working week capped at 48 hours; time beyond that is overtime, compensated as paid leave with Project Manager approval.
- Night shift runs only with written Project Manager approval, an HSE clearance and certified lighting levels.
- No person below 18 years of age is permitted on site under any category, for any reason — including as a helper or a family member of a worker.
- Geo-fencing is applied at site level for attendance validation.
5.3 Leave entitlements
From the HR working sheet — not yet carried into the Client Review v2 architecture doc, included here for completeness.
| Entitlement | Category A — Staff | Category B — Direct labour |
|---|---|---|
| Earned leave | Accrues at 2 days per 20 days worked; carry-forward and encashment as per statute | As per statutory entitlement |
| Casual / sick leave | As per grade, published in the appointment letter | Not applicable — absence is unpaid unless statutorily covered |
| Weekly off | Paid | Paid |
| National & festival holidays | As notified for Gujarat; site-wise list published each January, approval needed | As notified |
Also from the working sheet: Site staff receive a quarterly evaluation by the Project Manager, with the report submitted to HR.
Sheet 08 / Section 6
Module architecture
Twelve functional modules, each scoped to Head Office, Site, or both. This is the "which module, who owns it" map — cross-referenced against the role directory in Sheets 03–05.
M-01
Management console / admin
HOOwner: ERP Administrator
M-02
Project management
HOSiteOwner: PM / Site In-charge, MD
M-03
Finance & accounts (fund/cashflow)
HO releasesSite spendsOwner: Head–Accounts, Site Accountant
M-04
HR & payroll
HO runs payrollSite owns attendanceOwner: Manager–HR, Time Keeper
M-05
Labour management
SiteOwner: Time Keeper, Site Admin
M-06
Purchase management
HO centralisedSite indentsOwner: Head–Purchase, Site Engineer
M-07
Store & inventory
SiteOwner: Store Keeper
M-08
Contractor management
SiteOwner: Billing/QS Engineer, PM
M-09
Plant & machinery
SiteOwner: Plant & Machinery In-charge
M-10
Planning & estimation
HOSiteOwner: PM, Head–Purchase
M-11
Quality & safety (QA/QC + HSE)
SiteHO auditsOwner: QA/QC Engineer, Safety Officer, Manager–HSE/QA
M-12
MIS / reporting
HOOwner: MD, all Heads
Sheet 09 / Section 7
Core data model
Key entities and how they're scoped in the hierarchy. This is the backbone that makes fund isolation, employee locking and per-site HR possible — every transactional entity carries a site_id (and, through it, a project_id and company_id), and access is filtered by that chain.
| Entity | Scope | Key fields (indicative) | Notes |
|---|---|---|---|
| Company | Root | company_id, name | Single entity for Phase 1 |
| Project | Company | project_id, company_id, name, status | Many active per company |
| Site | Project | site_id, project_id, name, status | Many active per project |
| Role | Company definition / Site assignment | role_id, name, permission_template_id, created_by, scope | Dynamic role name; fixed permission template; Site assignment is explicit |
| Permission template | Company | template_id, scope (HO/Site/External), actions | Small, fixed set — Sheet 06 |
| User – role assignment | HO or explicit Site assignment | user_id, role_id, site_id, valid_from, valid_to | Multiple assignments allowed when explicitly authorized; Home/HR Site remains one |
| Employee | Site | employee_id, site_id, category (A/B/C) | Locked to one site — Sheet 02, 3.2 |
| Fund ledger | Site | site_id, allocation, expense, balance | No site-to-site transfer type — Sheet 02, 3.1 |
| Expense | Site | expense_id, site_id, category, amount, approver | Rolls up to project & company reports |
| Muster / attendance | Site | date, employee_id, site_id, hours, approver | Partitioned per site — Sheet 02, 3.3 |
| Indent / MRR, PO, Vendor bill | Site raises, HO/Site approves | site_id, vendor_id, status, linked_po | Vendor master itself is company-wide |
| Daily site report / job card | Site | site_id, date or activity_id, labour, material | Activity-level tagging optional |
| User / Site access | Site | user_id, site_id, access_type, valid_from, valid_to | Supports approved shared functional access without changing Home/HR Site |
Sheet 10 / Section 8
Multi-project & multi-site concurrency model
Because several projects and several sites are active at once, the system is designed around scoped access and roll-up reporting rather than a single "current project" context.
- ①
Every transactional record carries its
site_idat creation. There is no global/shared transaction table — isolation is structural, not a filter applied after the fact. - ②
A user's Home/HR context is their assigned Site (or, for HO roles, the whole company). Site-level users operate within explicitly authorized Site assignments — there is no unrestricted Site switching.
- ③
A shared functional Site role (e.g. QA/QC Engineer or Site Accountant may cover 2 Sites, or Plant & Machinery In-charge may be shared) retains one Home/HR Site and receives separate, explicit Site role assignments for each additional Site. Each assignment is independently approved, scoped and revocable.
- ④
Head Office dashboards query across all active projects and sites in real time — consolidated cash flow, consolidated HR headcount, consolidated PO/expense status — without any project needing to be "closed" or "selected" first.
- ⑤
Document numbering (PO, MRR, expense voucher, muster) is scoped per site with its own sequence, so two sites can issue "PO-001" on the same day without collision; the full reference includes the site code.
Sheet 11 / Section 9
Access control matrix (indicative)
Illustrative matrix. Final limits (approval bands, override rights) are confirmed in the open decisions list — this is a snapshot of who touches what, not the finished RBAC configuration.
| Role | Fund / cashflow | Expense | Purchase (PO) | HR / muster | Inventory | MIS reports |
|---|---|---|---|---|---|---|
| Head Office | ||||||
| MD (HO) | A | Aabove limit | Aabove limit | V | V | Vall sites |
| Head–Accounts (HO) | C A | A | V | VHR/finance where authorized | — | Vall sites |
| Head–Purchase (HO) | — | — | C A | — | Vall sites | Vpurchase |
| Manager–HR (HO) | — | — | — | Apayroll / HR control | — | VHR, all sites |
| Site | ||||||
| PM / Site In-charge | Vown Site | Aown Site, in band | Cindent | Aown Site | Vown Site | Vown Site |
| Senior Site Engineer | — | Recommend/approve per band (own Site) | Cindent | A/review own Site | Vown Site | V/A per template |
| Site Engineer (Civil) | — | Cown Site | Cindent | — | Cown Site | Vown Site |
| Billing / QS Engineer | — | V | C / work request | — | V | V / certify measurements within template |
| Surveyor | — | — | — | — | V | Csurvey / as-built |
| QA/QC Engineer | — | — | V | — | V | C AQA/QC, assigned Sites |
| Safety Officer / Steward | — | — | — | — | V | C AHSE, own Site |
| Store Keeper | — | — | — | — | Cown Site | Vown Site |
| Site Accountant / Cashier | Cown Site | Cown Site | V | — | — | Vassigned Sites |
| Plant & Machinery In-charge | — | V / verify hire bills | — | — | V | C Amachinery, assigned Sites |
| Junior Engineer / Supervisor | — | C / recommend | Cindent | — | Cown Site | Cprogress |
| Time Keeper / Muster Clerk | — | — | — | Cown Site | — | Cmuster/gate/worker/PPE |
| Site Admin / Labour Welfare | — | — | — | C/V — own Site welfare records | — | Cwelfare/compliance records |
| External | ||||||
| Subcontractor Supervisor / Mukadam | — | — | — | Submit only (own gang) | — | Submit measurement/attendance |
Matrix is indicative. Final permissions, approval bands and role templates are governed by the approved RBAC configuration and client approval matrix.
Sheet 12 / Synthesis
Company → Site, step by step
Pulling every sheet above into one sequence — how a company-level decision turns into work happening on the ground at a site, and how it rolls back up again.
-
Company is the root
Sarjan exists as a single legal entity. All policy, fund release authority and master data control sit at Head Office. HO roles (MD, the Heads, the Managers, the ERP Administrator) are fixed and company-wide — Sheet 03.
-
HO opens a Project
A Project represents a contract or client engagement. Many projects run concurrently; each gets a Project Manager. This is Module M-02, jointly owned by HO and Site.
-
The Project spins up one or more Sites
Each Site is a physical work location with its own
site_id, chained to itsproject_idandcompany_id. A project can run many sites in parallel — none of them need the others to be "closed." -
The PM / Site In-charge defines Site roles
Roles are created and named for that site's scale — not hardcoded. Every role, whatever it's called, is linked to one of the seven fixed permission templates from Sheet 06, which is what the system actually enforces.
-
People are onboarded and locked to that Site
Employees get exactly one active site assignment — Category A staff, Category B direct labour, or Category C subcontractor labour, each with its own attendance owner and pay cycle (Sheet 07). There's no "reassign"; a real move is relieve-and-onboard.
-
HO allocates funds to the Site
A site-scoped fund ledger opens. Money only ever moves HO → Site or Site → HO — never site to site. If two sites need funds, HO makes two separate allocations (Sheet 02, 3.1).
-
The Site team executes and records
Indents, daily progress, stock movements, muster, quality checks and safety inspections all flow through the modules scoped to that site — M-05 through M-11 — each tagged with the site's own document sequence, so "PO-001" at Site 1 never collides with "PO-001" at Site 3.
-
Approvals move through the RBAC matrix
Site approvers (PM, Senior Site Engineer) clear items within their band. Anything above the band, or anything company-wide, escalates to an HO approver (MD, Head–Purchase, Head–Accounts, Manager–HR) — see the full matrix on Sheet 11.
-
Head Office rolls it all up in real time
Consolidated cash flow, consolidated HR headcount, consolidated PO/expense status — queried live across every active project and site, without selecting a "current" one. This is what makes the whole model safe to run at scale.