All Projects

Banking Back-Office

Internal bank tool

Web Manager

One console for a bank's operations teams, where each officer sees only the modules and actions their role allows.

Senior Frontend Developer at Bank Saqu · August 2024 - August 2026

Private bank codebase. Screens are from the de-branded demo build, which runs on an in-browser mock of the original APIs.

5

Operations Modules, One Console

5

Roles, Least Privilege by Default

6

Permission Levels per Menu

1

Menu Entry to Add a Module

At a Glance

Problem
Officers each own a slice of sensitive configuration and must see only their own tools.
What I built
A Next.js console with menu-tree permissions, a store per module and one data-access seam.
Result
5 operations modules under least-privilege menus, with a backend that can be swapped without touching a page.

Screens

One page, two roles. Sign in as Super Admin, open the certificate page and the role form, toggle permissions, then sign in as a read-only Viewer and see the same page without its controls. Demo build on mock data, no sound.
Role Management table listing Super Admin, EP Officer, MFTU Officer, MPN Officer and Viewer roles (open full-size Web Manager screenshot)
Role management: five roles, from Super Admin to a read-only Viewer.
Dashboard signed in as Super Admin, with six module groups in the sidebar and a transaction status chart (open full-size Web Manager screenshot)
Signed in as Super Admin: every module group is in the sidebar.
Same dashboard signed in as MFTU Officer, with only two module groups in the sidebar (open full-size Web Manager screenshot)
Same console as MFTU Officer: the sidebar shrinks to the two groups this role may use.
Create New Role form with a menu tree where each menu has VIEW, CREATE, UPDATE, DELETE, EXPORT and IMPORT toggles (open full-size Web Manager screenshot)
The permission tree: six verbs per menu, toggled per role. A new module is just a new menu entry.
Certificate Keys table as Super Admin, with an Add Certificate button and edit and delete icons (open full-size Web Manager screenshot)
The same page as Super Admin: add, edit and delete are available.
Certificate Keys table as Viewer, with no Add button and no action icons (open full-size Web Manager screenshot)
The same page as a read-only Viewer: the controls are gone, not just disabled.
Diagram: edge proxy, permission guards, 15 stores, one request seam and the GraphQL data layer (open full-size Web Manager screenshot)
Structure: every store calls one request() seam, which is why the backend could be swapped without touching a page.

The Problem

Operations officers each own a slice of sensitive configuration: partner credentials, GPG certificates, bank master data, tax settlement and virtual accounts. They needed one console that shows each officer only their modules and actions.

My Role

Sole frontend engineer: the App Router shell, NextAuth sessions, menu-tree RBAC, a Zustand store per module, and the data layer behind one request() seam.

Architecture

Pages call per-module stores that all go through one request() seam, behind which a route adapter maps each legacy endpoint to a GraphQL operation.

  1. Operations Users

  2. Edge Proxy & NextAuth

    Verifies the JWT on every dashboard route. The token carries the user's roles and access-menu tree, compressed to fit cookie limits.

  3. Pages & Permission Guards

    App Router pages behind a VIEW guard, with action gates on create, update, delete and export controls.

  4. Zustand Module Stores

    15 stores, one per module or entity, each with fetch/create/update/delete actions and request cancellation.

  5. request() Seam

    The single, Axios-shaped data-access function every store calls.

  6. GraphQL Data Layer

    Route adapter and GraphQL resolvers that return each legacy endpoint's exact response envelope.

Login / page request
Valid token (roles + menus)
CRUD actions
Axios-shaped call
Method + path

Engineering Decisions

  • Menu-URL RBAC

    Permissions attach to menu URLs instead of role-name checks, so a new module is a new menu entry, not new authorization code.

    Trade-off In the browser these gates are UX. With a live API, every endpoint has to enforce the same permissions on the server.

  • One data-access seam

    Every store calls one request() function, which is what made swapping the backend cheap.

    Trade-off The stores still repeat similar CRUD code; shared table and form primitives are the next step.

  • Preserve legacy response envelopes

    The GraphQL layer returns each endpoint's original envelope, so store error handling still works and a real API can be reattached.

    Trade-off Five different response conventions live on instead of being normalized into one.

What I Built

  • Built the App Router console with NextAuth JWT sessions (30-minute expiry, pre-logout warning) and an edge proxy guarding every dashboard route.
  • Designed menu-tree RBAC granting 6 verbs per menu URL (view, create, update, delete, export, import), enforced by page guards, action gates and a per-form hook.
  • Delivered user and role, payment-partner, GPG certificate, bank master data, virtual-account and tax settlement modules, including a wizard that generates an A4 PDF.
  • Kept data access behind one request() seam with a Zustand store per module and AbortController cancellation.
  • For the demo build, replaced the bank backend with an in-browser GraphQL engine serving all 43 legacy endpoints in their original envelopes, with no store or page changes.

Constraints

  • Each officer could only see their own modules and actions.
  • Stores already depended on five different backend response conventions.
  • The console had to be demonstrable without exposing any bank system.

Outcome

One console covers 5 operations modules with least-privilege menus and actions from a permission tree. For the demo build, its backend was replaced behind one seam with all 43 API contracts intact.

For Engineers

28

Automated Tests Passing

43

Legacy API Contracts Kept

15

Module Stores, One Seam

0

Pages Changed in Backend Swap

Permissions live on the menu tree

lib/permissions.ts

export function findMenuByUrl(menus: AccessMenu[] | null | undefined, url: string): AccessMenu | undefined {
  if (!menus) return undefined;
  for (const menu of menus) {
    if (menu.url && urlsMatch(menu.url, url)) return menu;
    if (menu.children) {
      const found = findMenuByUrl(menu.children, url);
      if (found) return found;
    }
  }
  return undefined;
}

export function hasPermission(menu: AccessMenu | undefined, permission: PermissionType): boolean {
  return menu ? menu.permissions.includes(permission) : false;
}
Page guards and action buttons both ask the same question: find this URL in the user's menu tree, then check the verb. A new module needs a menu entry, not new auth code.

Quality & Security

  • 30-minute JWT sessions with an absolute expiry and a warning before automatic logout.
  • An edge proxy verifies the token on every dashboard route before any page renders.
  • Security headers: Content Security Policy, HSTS, X-Frame-Options DENY and nosniff.
  • List requests cancel the previous one (AbortController), so fast searches never show stale results.
  • A version check reloads open tabs after a release instead of failing on missing chunks.
  • 21 Vitest unit tests pin the role permission matrix, the data engine and the legacy API envelopes; 7 Playwright tests sign in as each role and check what it can and can't see.

What I'd Do Next

  • Collapse about 25 near-identical CRUD pages into shared table, form and wizard primitives (designed, not built yet).
  • Server-side permission checks on every endpoint once a live API is attached again.

Technology

Next.jsTypeScriptNextAuth.jsZustandReact 19GraphQLRadix UITailwind CSSECharts

For Clients

Need an internal admin panel where each team sees only its own tools?

What I can build for you, based on this project:

  • A back-office console with role and menu-level permissions
  • CRUD modules with search, pagination, approval and audit views
  • Wizard flows with PDF or file exports
  • A demo mode on mock data, so stakeholders can try it before the API is ready

Downloads