Engineers Clinic
AdvancedSoftware trackFP-CS-02

Multi-tenant SaaS with roles, permissions and an audit log

Build the backend of a multi-tenant SaaS so each client company only sees its own data, roles decide who can do what, and every sensitive action is logged.

Software & Web DevFull Stack Development
5 Guided Steps43h Internship TierSubmit: GitHub repo with the API, the seed script, the attack test suite and an audit-log viewer endpoint + READMEVerified CertificateAI Rubric Graded
Program Overview

Industry project · for Deskroute, a 20-person SaaS firm selling a shared helpdesk tool to 140 client companies

Deskroute sells one helpdesk application to 140 client companies, who all share the same servers and database. Each client is a tenant, and tenants must never see each other's tickets. During a recent trial, a bug in one query let a tenant admin list tickets from two other companies. The deal nearly collapsed, and a prospect asked for an audit log before they would sign.

You are building the access-control core that the whole product sits on. It has three parts: - tenant isolation, so every query is scoped to the caller's tenant and a missing scope fails closed rather than returning everything; - role-based access control, with roles such as owner, agent and viewer, and a permission check on every action; - an audit log that records who did what, to which record, and when, for the actions that matter.

You will build a small ticketing API on top of this core, with three tenants and a handful of users each, seeded by a script. Done looks like an API where a user from tenant A cannot read, change or even count tenant B's tickets; where a viewer cannot close a ticket but an agent can; and where closing or reassigning a ticket appears in a tamper-evident audit log. The main proof is a test suite that tries every cross-tenant and privilege-escalation attack you can think of and shows each one blocked. The target is zero cross-tenant leaks across the whole suite.

Multi-tenancyRole-based access controlAuthorisation designAudit loggingAPI developmentSecurity testing
What you submit

GitHub repo with the API, the seed script, the attack test suite and an audit-log viewer endpoint + README

Stack: TypeScript, Node.js, PostgreSQL, An ORM such as Prisma, Jest or Vitest

How it is graded
  • Tenant isolation35

    No request from one tenant can read, change or count another tenant's data, and a missing tenant scope fails closed.

  • Role and permission checks25

    Every action checks a permission, and roles such as viewer and agent allow exactly the actions they should.

  • Audit log20

    Sensitive actions are recorded append-only with actor, tenant, target and time, and the log cannot be edited through the API.

  • Attack tests and docs20

    A test suite tries cross-tenant and escalation attacks and shows each blocked, with a README explaining the model.

Pass 60% · Merit 75% · Distinction 90%

Learning Outcomes
Scope every query to a tenant and fail closed
design roles and permission checks a reviewer can read
write an append-only audit log
test your own access control like an attacker
Target Audience

Engineering Students

Diploma, B.Tech, B.E., BCA, MCA, or M.Tech students seeking practical experience.

Aspiring Developers

Developers who want to build proof-of-work capstone projects for tech resumes.

Job Seekers

Graduates looking for AI-evaluated code review & verified industry credentials.