← All Work/Expenra

Co-founded product · Started March 2024

Expenra

A systems-analysis case study for a finance product with separate organization workspaces, transaction flows, banking connections, subscription events, and controlled account-data access.

Live Site ↗

Problem and scope

One account, separate workspaces

Expenra is organized around businesses rather than individual accounts. Each organization has its own users, transactions, connected bank accounts, and subscription state.

A user can belong to several organizations and move between them while the application keeps data and permissions within the active workspace.

My scope

  • Helped define the organization model, user flow, access boundaries, and integration behaviour
  • Turned workspace and service rules into functional requirements and acceptance conditions
  • Built organization switching, scoped data access, protected routes, and workspace routing
  • Connected Stripe checkout and billing events, plus Plaid linking and transaction synchronization
  • Built the assistant interface with approved server-side data tools
  • Reviewed session behaviour, event validation, access boundaries, monitoring, and release paths

Functional requirements

Rules that protect organization data

The central analysis problem was not the dashboard itself. It was keeping workspace context, financial data, service events, and assistant access consistent across the product.

REQ-01

Active organization context

A user may belong to several organizations, but each request must use one explicit active workspace.

REQ-02

Scoped financial data

Transactions, connected accounts, subscription state, and reports must remain within the active organization.

REQ-03

Verified external events

Stripe and Plaid events must be verified and validated before they change account or transaction data.

REQ-04

Controlled assistant access

The assistant may request approved server-side tools but must not query the database without organization and access checks.

REQ-05

Protected application routes

Unauthenticated or unauthorized requests must not reach organization pages or private financial data.

Workflow

How workspace context moves through the product

01

Select workspace

Identify the active organization and load only the data and permissions attached to it.

02

Record activity

Create, categorize, and review transactions within the active organization.

03

Connect services

Handle billing and banking events through verified Stripe and Plaid flows.

04

Review account data

Use dashboards or approved assistant tools without crossing organization boundaries.

Solution coverage

Features mapped to the system rules

01

Organization workspaces

Separate data and access for each organization, with switching for users who belong to several.

02

Transactions and dashboards

Views for recording, categorizing, and reviewing financial activity.

03

Subscription billing

Stripe Checkout, plan access, and verified billing-event handling.

04

Banking connections

Plaid account linking and transaction synchronization through validated service events.

05

Finance assistant

A streamed chat interface that uses server-side tools to answer questions from account data.

06

Sessions and monitoring

Redis-backed sessions and error reporting through Sentry.

Acceptance checks

How the access and event rules were checked

The release checks focused on organization separation, authorization, webhook trust, and controlled access to account data.

  1. AC-01Switching the active organization changes the workspace context without exposing data from the previous organization.
  2. AC-02A transaction request without a valid organization relationship is rejected.
  3. AC-03An unverified Stripe or Plaid event does not update application state.
  4. AC-04Assistant tools return data only from the active organization.
  5. AC-05A signed-out user cannot open protected finance routes.

Integration analysis

Payments and bank data

Stripe manages checkout and subscription events. Plaid manages bank connections and transaction updates. Incoming events are verified and validated before the application changes account data.

Access-control decision

Assistant with controlled data access

The assistant does not connect directly to the database. It requests approved server-side tools, and those tools apply the same organization and access checks used by the rest of the application.

System context

How the requirements map to the implementation

Application

Next.js, React, TypeScript, Tailwind CSS

Data

MongoDB, Mongoose, organization-scoped access

Services

Stripe, Plaid, LLM APIs, Redis, Sentry

Delivery

Git, CI checks, Vercel deployment

More work

See the smaller automation projects.

Automation Projects