How to Build a Multi-User Web Application for Your Organization
The five foundations of a safe multi-user system: authentication, role-based access with a sample permissions table, sessions, audit logs and account lifecycle.

Building a multi-user web application for an organisation comes down to five foundations: reliable authentication (proving who someone is), role-based access control (deciding what they may do), secure sessions, audit logs that record who changed what, and a clear lifecycle for creating, changing and removing accounts. Get these right first and every feature built on top inherits them. Tarka Raj Jaishi, a full-stack developer in Lamki, Kailali, Nepal with a cybersecurity background, explains each foundation below with practical examples.
Why multi-user applications need extra care
#A single-user tool only has to protect itself from outsiders. A multi-user application must also protect users from each other: the receptionist should not see salaries, a branch in Tikapur should not edit a branch in Dhangadhi's stock, and a former employee should lose access the day they leave. Many internal data problems are not dramatic hacks at all; they come from ordinary accounts with more access than they needed.
Authentication: proving who is logging in
#Authentication answers "who are you?" Good practice includes:
- Passwords stored only as strong one-way hashes (using algorithms such as Argon2 or bcrypt), so even a database leak does not reveal them.
- Rate limiting and lockouts after repeated failed attempts, to stop automated guessing.
- Secure password reset through a time-limited link or code, never by emailing the password.
- Optional two-factor authentication for administrators and anyone handling money.
- Login options that suit staff: many organisations in Nepal prefer phone numbers to email addresses, since not every staff member uses email regularly.
For organisations that already use Google Workspace or similar, single sign-on can let staff log in with their existing work account.
Role-based access control (RBAC) with a sample permissions table
#Authorisation answers "what are you allowed to do?" Rather than setting permissions person by person, RBAC groups permissions into roles, then assigns roles to people. When someone changes job, you change their role, not dozens of settings.
Here is an example for a cooperative with several service centres:
| Permission | Admin | Branch manager | Teller | Loan officer | Auditor |
|---|---|---|---|---|---|
| View member profiles | All branches | Own branch | Own branch | Own branch | All branches (read-only) |
| Record deposit or withdrawal | Yes | Yes | Yes | No | No |
| Create loan application | Yes | Yes | No | Yes | No |
| Approve loan | Yes | Yes, up to a set limit | No | No | No |
| Reverse a transaction | Yes, with reason | Request only | No | No | No |
| View reports | All | Own branch | Own daily summary | Own loans | All |
| Manage user accounts | Yes | No | No | No | No |
| View audit log | Yes | Own branch | No | No | Yes |
Rules that keep RBAC safe
#- Least privilege: give each role the minimum it needs. Add more later if required.
- Enforce on the server: hiding a button is not security. Every request must be checked on the server, because anyone can craft a request directly.
- Scope by data, not just action: "can approve loans" must also mean "only in their branch" and "only up to their limit".
- Separation of duties: the person who creates a payment should not be the only person who approves it.
- Keep roles few and named after real jobs, so managers understand them.
Sessions: staying logged in safely
#After login, a session keeps the user signed in. Done carelessly, sessions are an easy way in for attackers.
- Store session tokens in secure, HTTP-only cookies so scripts on the page cannot read them.
- Expire idle sessions, with shorter limits for sensitive roles. A shared counter PC left logged in is a real risk.
- Let users see and end their active sessions, for example after losing a phone.
- End all sessions immediately when a password is changed or an account is disabled.
- Protect forms against cross-site request forgery so another website cannot submit actions as the user.
Audit logs: who did what, and when
#An audit log is a permanent record of important actions. When a stock count is wrong or a payment is disputed, it turns an argument into a lookup. Record at least:
- Who performed the action and from which account.
- What changed, including the old and new values for important fields.
- When it happened, with a reliable server timestamp.
- Where relevant, the branch and device or IP address.
Log logins, failed logins, permission changes, financial edits, deletions and data exports. Audit records should be append-only: ordinary users, and ideally not even admins, should be able to edit them. Tarka's own site, tarkarajjaishi.com.np, runs on Next.js and PostgreSQL with accounts, comments and an admin panel, the same kind of foundation described here.
Account lifecycle: from joining to leaving
#- Creation: an admin invites the user with a specific role; the user sets their own password through a one-time link.
- Onboarding: the user confirms their details and, for sensitive roles, enables two-factor login.
- Role changes: promotions or transfers update roles, and the change is logged.
- Periodic review: managers confirm their staff's access is still correct.
- Suspension: temporary leave can pause access without losing history.
- Deactivation: when someone leaves, the account is disabled and sessions ended immediately. Avoid deleting accounts outright, because their past actions must remain traceable in records and audit logs.
Planning your multi-user application
#Before development, write down every job title that will use the system, what each one does daily, what they must never see, and which actions need approval from someone else. That list becomes your roles table. For the security practices that surround these features, read building fast, secure and scalable web applications. If your organisation has several locations, multi-branch business management software covers branch-level data separation, and if you plan to sell your system to other organisations, the guide to SaaS development covers multi-tenancy.
Frequently asked questions
#What is the difference between authentication and authorisation?
#Authentication confirms who a user is, usually through a password and possibly a second factor. Authorisation decides what that confirmed user is allowed to see and do. A system needs both to be secure.
Can one person have more than one role?
#Yes. In small organisations one person often wears several hats, for example manager and cashier. The system can combine permissions from several roles, though separation-of-duties rules may still block certain combinations.
Should I delete accounts when staff leave?
#Disable them instead. Disabling removes access immediately while keeping the history of what that person did, which you may need for audits or disputes.
How do audit logs help a small organisation?
#They settle questions quickly, such as who edited an invoice or who approved a discount. They also discourage misuse, since staff know actions are recorded.
Can staff log in with phone numbers instead of email?
#Yes, if that suits your staff. Phone-based login with a one-time code or password works well where email is not used regularly, though it should be paired with proper rate limiting.
Discuss your project with Tarka Raj Jaishi
#If your organisation needs a system where many people work safely with the right access, Tarka can help you map roles and permissions before any code is written.
- Phone: 9865760285 / 9812636744
- WhatsApp: +977 9865760285
- Website: tarkarajjaishi.com.np
- Facebook: facebook.com/TarkarajJaishi
Newsletter
New posts in your inbox. Confirm by email, unsubscribe any time.
More in Full-Stack Guides
View all
The Complete Guide to Developing SaaS Web Applications in Nepal
Multi-tenancy models, subscriptions through local payment gateways, onboarding, pricing and compliance: the decisions to make before building a SaaS in Nepal.
Tarka raj Jaishi · 6 min

Why Your Business Needs a Custom Dashboard and Management System
How to choose the right KPIs for your type of business, design a dashboard people actually use, and decide how live your data needs to be.
Tarka raj Jaishi · 5 min

Building Fast, Secure and Scalable Web Applications for Nepali Businesses
Concrete practices for speed on slow mobile networks, OWASP-style security basics, tested backups and monitoring, with a pre-launch checklist.
Tarka raj Jaishi · 5 min

What Technologies Are Best for Building Modern Web Applications?
Stack options compared by use case, from internal tools to SaaS, and a checklist for choosing technology by requirements rather than hype.
Tarka raj Jaishi · 5 min
Comments
Posting as a guest