Public-Sector Grant Platform

Public-Sector Grant Platform.

Digitizing not just a grant application, but the multi-step approval chain behind it

Year.

2023

Employer.

Embie

Role.

Full Stack Developer

Context.

A digital platform for a public administration, replacing a fully paper-based grant process end to end. External applicants submit and manage their grant files through a portal, authenticating via national digital identity services, while staff sign in with their organizational accounts to review those files.

Challenge.

Digitize not just the application form, but the internal, multi-step validation workflow a grant file goes through before approval, where different reviewers need different visibility and actions on the exact same file depending on where it is in that process, right down to individual fields, and produce a signed decision at the end of it.

Decisions & trade-offs.

  • Permissions Tied to File State: CASL permissions defined not just per role but per step of the file's lifecycle: the same reviewer can read a field at one step and both read and sign it at the next, from rules that reference the file's current state rather than a fixed role-to-permission table.

  • PDF-Accurate Signing: Signatures captured directly on a live preview of the actual PDF: the signer clicks the exact spot on the rendered page, and that position is what gets used to place the signature when the final document is generated, rather than a generic "sign here" field disconnected from the document's layout.

  • One Engine, Many Programs: The application form itself is a nested, config-driven structure (tabs → sections → questions, each independently repeatable) rendered through one generic form engine, so a grant program with different required fields is a new configuration, not new code.

  • Testing Over Manual QA: Invested in end-to-end tests with Playwright for the approval flow, rather than leaning on manual QA between releases, because a silent regression in a multi-step chain is much harder to catch by hand than a broken button.

Result.

Replaced a fully manual, paper-based grant process with a digital one that has been running in production for years. External applicants and internal reviewers both moved onto the same platform.

Stack.

CASL for step-based permissions, Hasura GraphQL and tRPC for the API, react-pdf for signatures.

TypeScript

Next.js

Radix UI

Tailwind CSS

Zod

React Hook Form

CASL

tRPC

GraphQL

Hasura

End to end testing