Skip to content

All projects

Demo project

Multi-tenant SaaS dashboard (demo project)

This is not client work. It is a local demo app with simulated billing and demo-only sign-in. It is not production authentication or billing, and it is not suitable for real customer data.

Stack
  • Angular
  • NestJS
  • TypeScript
  • TypeORM
  • sql.js
  • Chart.js

Context

A multi-tenant SaaS dashboard, built as a demo of the patterns a typical B2B SaaS product needs: organisations, roles, invitations, subscriptions, and a full Arabic interface. It runs locally. No external identity, email, payment or database service is used.

At a glance

roles per organisation: owner, admin, member
3
interface languages, with full right-to-left Arabic
2
simulated subscription states: trial, active, past due, canceled
4

What the demo implements

Organisations and access

  • Organisations with separate data. Users switch the active organisation, and the dashboard, projects, members, settings and subscription follow that choice. The API checks membership and permissions for each organisation; hiding a button in the UI is not the security boundary.
  • Three roles per organisation: owner, admin and member. Admins manage projects, invitations and organisation settings. Members have read access. Changing member roles is owner-only.
  • Member management, with a guard that stops the sole owner's role from being changed.
  • Demo-only sign-in with seeded demo accounts, hashed credentials and a local cookie-based session.

Team work

  • A local invitation flow: an owner or admin invites a user with a chosen role, and the invited user accepts with a local invitation code. No email is sent. Invitations expire after seven days and cannot be accepted twice.
  • Projects with create, edit and delete, limited by role.
  • An activity feed with date and project filters.

Dashboard and simulated billing

  • A dashboard with charts built from seeded project and activity data.
  • Mock plans and a subscription lifecycle: trial, active, past due and canceled. Only the owner can change it. These are simulated state changes; no payment details or charges are involved.

Arabic and small screens

  • English and Arabic, with full right-to-left layout, localized chart labels, and localized dates and digits. The chosen language is remembered.
  • A responsive layout with a navigation drawer on small screens.

Tests and running it

  • Automated test suites for the API and the web app. The API tests cover sign-in and sessions, authorization and cross-organisation denial, projects and activity, invitations, members and the subscription lifecycle. The web tests cover the dashboard, projects, activity, members, invitations, subscription screens, routing and language switching.
  • Local start: after setup, one command builds and starts the web app and API together on one local address. Seed and reset commands restore the demo data.

Stack

Angular / NestJS / TypeScript / TypeORM / sql.js / Chart.js

Angular 20 for the web app, with ngx-translate for English and Arabic and Chart.js (ng2-charts) for the charts. NestJS 11 for the API, with TypeORM and a local sql.js database. TypeScript throughout, with shared contracts between web and API. Jest for tests.

How it fits together

Architecture of the SaaS dashboard demoThe browser runs the Angular 20 web app, which loads English or Arabic translations and draws charts. It calls the NestJS 11 API under /api on the same local address; the API also serves the built web app. Every request passes a session guard and an organisation guard that checks membership and role. Sign-in checks bcrypt-hashed credentials and sets an httpOnly session cookie whose token is stored hashed. The API reads and writes through TypeORM to a sql.js database saved to a local file. Web app and API share TypeScript contracts.I18NEnglish and ArabicJSON translations, ngx-translate;direction follows the languageAUTHDemo-only sign-inbcrypt-hashed credentials;httpOnly cookie; token kept hashedBROWSERAngular 20 web appDashboard, projects, members,invitations, subscriptionCharts: Chart.js (ng2-charts)Responsive, drawer on phonesAPI · /apiNestJS 11Session guard: who is signed inOrganisation guard: role checkQueries scoped to the organisationAlso serves the built web appDATAsql.js databaseThrough TypeORMSaved to a local fileSeed and resetcommandsSHAREDTypeScript contracts used by both the web app and the APIOne process, one local address:no external identity, email,payment or database service
Architecture of the SaaS dashboard demoTranslations feed the Angular 20 web app in the browser. Its requests pass the demo-only sign-in session and reach the NestJS 11 API under /api, which checks the session and the organisation role and serves the built web app. The API stores data through TypeORM in a sql.js database saved to a local file. Web app and API share TypeScript contracts.I18NEnglish and ArabicJSON translations, ngx-translate;direction follows the languageBROWSERAngular 20 web appDashboard, projects, members,invitations, subscriptionCharts: Chart.js (ng2-charts)Responsive, drawer on phonesAUTHDemo-only sign-inbcrypt-hashed credentials;httpOnly cookie; token kept hashedAPI · /apiNestJS 11Session guard: who is signed inOrganisation guard: role checkQueries scoped to the organisationAlso serves the built web appDATAsql.js databaseThrough TypeORMSaved to a local fileSeed and reset commandsSHAREDTypeScript contracts used bythe web app and the APIOne process, one local address: noexternal identity, email, paymentor database service

What you can try

The demo runs locally with seeded accounts, one per role. Each account shows a different part of the permission model.

  • Owner

    Switch the active organisation between the two demo organisations and watch the dashboard, projects, members, settings and subscription follow. Change member roles and step the mock subscription through its lifecycle.

  • Admin

    Manage projects, invitations and settings in one organisation. In the other organisation the same account is only a member and has fewer controls.

  • Member

    Read access only: no project creation, no invitations, no subscription changes, and the API refuses them even when called directly.

  • Invited user

    Starts with no organisation. Accept an invitation with its local code, then refresh organisations to see the new membership.

Screenshots

  • Dashboard in English (desktop).
  • Projects list in Arabic, right-to-left (desktop).
  • Members and roles in English (desktop).
  • Mock plans and subscription, simulated billing (desktop).
  • Dashboard in English (phone).
  • Navigation drawer in English (phone).

Have a project like this?

Get in touch