ERPNext for Multiple Schools In Single Site (Single Database)

Hello friends,
We have an academic platform for students and teachers. We are looking at enhancing the same with ERP features by integrating with ERPNext’s Education Domain. We have many schools who are onboarded and leveraging existing platform. We manage the current system with Single Postgres Database Instance with tenancy managed at application layer

Here is my question
In ERPNext, based on my understanding so far, a tenant is configured as a site and each site has 1 database. It can be an operational overhead and difficult to manage so many databases (e.g. 200 schools having 200 databases). Can we manage it via DataModel, Roles & Permissions And Docshares.

I can create a DocType called Organization and add an entry for each school. Link this Org entry to various other entities like Student, Instructor, Fee etc. Can we create roles so that a user belonging to a specific organization will be able to access (search, create, edit, delete) their specific data? please suggest

I have tried to go through some of these posts that has relevant content:
Link 1
Link 2

Thanks a lot in advance

User permission feature may help to explore this functionality, roles alone may not help

Doctype Company is nothing but an organization. You can definitely use that for the purpose you are describing as it creates different COA for each school.

But tenancy in erpnext was not designed the way you want it. So every other doctype in erpnext does not have a link to company. In most of the cases it is the financial transaction doctype that have this reference. So I feel your idea of tenancy will require a lot of customization and heavy testing. Ofcourse the user permission for company doctype can limit a user to data of that company alone.

1 Like

Thank you @CA_B.C_Chechani and @mujeerhashmi for your responses.

The idea is to have Company doctype linked to all the standard entities in Education domain - Student, Instructor, Fees, Admission related etc. It could be quite some customisation work, but we feel it helps in overall maintainability of the application. Its a trade-off between managing 100s of databases (wrt both cost and operational aspects) vs performing a one-time customization across various entites (also new doctypes that we are going to create in future for transport mgm, hostel, library etc).

Please shout if I am exaggerating on the maintainence aspect given that Relational Database services should handle most of it seamlessly.

Also, glad to know that the “User Permission” feature can be leveraged for restricting the users of a particular company will have access to their own data. I’ll spike out soon and publish the details.
Any hints, suggestions, code is always welcome. Thank you.

1 Like