Skip to main content

System Requirements Specification

Personal Budget Management & Enforcement System

Document Version: 1.0
Date: January 7, 2026
Project: Starling-N8N-Airtable Budget Automation System

1. INTRODUCTION

1.1 Purpose

This document specifies the complete requirements for an automated budget management system integrating Starling Bank API, N8N workflow automation, and Airtable database with real-time monitoring, enforcement, and reporting capabilities.

1.2 Scope

The system will provide:
  • Automated transaction ingestion from Starling Bank
  • Real-time budget tracking and categorization
  • Threshold-based alerting and enforcement
  • Historical analysis and forecasting
  • Interactive dashboards and reporting

1.3 Definitions and Acronyms

  • SRS: System Requirements Specification
  • API: Application Programming Interface
  • VTM: Verification Traceability Matrix
  • RBAC: Role-Based Access Control
  • SLA: Service Level Agreement

2. OVERALL DESCRIPTION

2.1 Product Perspective

The system operates as an integrated solution comprising:
  • Data Layer: Starling Bank API (external)
  • Processing Layer: N8N workflow engine
  • Storage Layer: Airtable database
  • Presentation Layer: Airtable interfaces & external dashboards

2.2 Product Functions

  • Real-time transaction synchronization
  • Automated categorization and tagging
  • Budget allocation and tracking
  • Alert generation and notification
  • Spending enforcement controls
  • Historical reporting and analysis

2.3 User Characteristics

Primary User: Individual with technical proficiency in:
  • API integration and authentication
  • Workflow automation platforms
  • Database design and formulas
  • Basic scripting/coding

2.4 Constraints

  • Starling Bank API rate limits (typically 300 requests/5 minutes)
  • N8N execution limits based on hosting plan
  • Airtable record limits (50,000 records on Pro plan)
  • Real-time webhook delivery dependencies

3. SYSTEM REQUIREMENTS

3.1 FUNCTIONAL REQUIREMENTS

FR-001: Transaction Ingestion

Priority: Critical
Description: System shall automatically retrieve transactions from Starling Bank API
Sub-requirements:
  • FR-001.1: System shall authenticate with Starling Bank OAuth 2.0
  • FR-001.2: System shall poll for new transactions every 5 minutes
  • FR-001.3: System shall support webhook-based real-time transaction capture
  • FR-001.4: System shall handle pagination for bulk historical imports
  • FR-001.5: System shall deduplicate transactions based on transactionUID
  • FR-001.6: System shall retrieve transaction metadata (merchant, category, location)
  • FR-001.7: System shall handle failed API calls with exponential backoff retry (max 3 attempts)

FR-002: Transaction Storage

Priority: Critical
Description: System shall persist transaction data in structured Airtable format
Sub-requirements:
  • FR-002.1: System shall create transaction records with fields: ID, Date, Amount, Merchant, Category, Status, Notes
  • FR-002.2: System shall link transactions to budget categories
  • FR-002.3: System shall maintain transaction immutability (no modifications to historical data)
  • FR-002.4: System shall timestamp record creation and updates
  • FR-002.5: System shall handle currency conversion for non-GBP transactions
  • FR-002.6: System shall store raw API response for audit trail

FR-003: Budget Configuration

Priority: Critical
Description: System shall allow definition and management of budget categories and limits
Sub-requirements:
  • FR-003.1: System shall support budget categories (Groceries, Transport, Entertainment, Bills, Discretionary, Savings)
  • FR-003.2: System shall define monthly spending limits per category
  • FR-003.3: System shall support rollover of unused budget to next period (optional toggle)
  • FR-003.4: System shall define budget periods (monthly, quarterly, annual)
  • FR-003.5: System shall calculate buffer percentages per category (default 10-15%)
  • FR-003.6: System shall support subcategories with inherited parent limits

FR-004: Automated Categorization

Priority: High
Description: System shall automatically assign transactions to budget categories
Sub-requirements:
  • FR-004.1: System shall use merchant name matching rules
  • FR-004.2: System shall use Starling’s native category codes as fallback
  • FR-004.3: System shall support manual categorization rules (keyword matching)
  • FR-004.4: System shall learn from manual corrections (rule suggestion)
  • FR-004.5: System shall flag uncategorized transactions for review
  • FR-004.6: System shall support split transactions across multiple categories

FR-005: Real-Time Budget Tracking

Priority: Critical
Description: System shall calculate and display current budget status
Sub-requirements:
  • FR-005.1: System shall calculate total spent per category for current period
  • FR-005.2: System shall calculate remaining budget per category
  • FR-005.3: System shall calculate percentage consumed (spent/limit * 100)
  • FR-005.4: System shall identify budget status (healthy, warning, exceeded)
  • FR-005.5: System shall project end-of-period spending based on current rate
  • FR-005.6: System shall update calculations within 60 seconds of new transaction

FR-006: Threshold Alerting

Priority: High
Description: System shall generate alerts when spending thresholds are reached
Sub-requirements:
  • FR-006.1: System shall trigger warning alert at 80% of category budget
  • FR-006.2: System shall trigger critical alert at 100% of category budget
  • FR-006.3: System shall trigger daily summary at 120% of category budget
  • FR-006.4: System shall support custom threshold percentages per category
  • FR-006.5: System shall prevent duplicate alerts within 24-hour period
  • FR-006.6: System shall include context in alerts (current spend, limit, transactions)

FR-007: Notification Delivery

Priority: High
Description: System shall deliver alerts through multiple channels
Sub-requirements:
  • FR-007.1: System shall send email notifications via configured SMTP
  • FR-007.2: System shall send Slack messages to specified channel/DM
  • FR-007.3: System shall send SMS via Twilio (optional)
  • FR-007.4: System shall support push notifications via mobile app integration
  • FR-007.5: System shall allow notification preference configuration per alert type
  • FR-007.6: System shall log all notification attempts and delivery status

FR-008: Spending Enforcement

Priority: Medium
Description: System shall support enforcement actions when limits are exceeded
Sub-requirements:
  • FR-008.1: System shall integrate with Starling Card Controls API
  • FR-008.2: System shall support manual card freeze trigger
  • FR-008.3: System shall support automated card freeze at configurable threshold
  • FR-008.4: System shall provide manual override mechanism for emergencies
  • FR-008.5: System shall log all enforcement actions with timestamps
  • FR-008.6: System shall send confirmation notifications on enforcement actions

FR-009: Historical Analysis

Priority: Medium
Description: System shall provide historical spending analysis capabilities
Sub-requirements:
  • FR-009.1: System shall import 6 months of historical transactions for baseline
  • FR-009.2: System shall calculate average monthly spending per category
  • FR-009.3: System shall identify spending trends (increasing, stable, decreasing)
  • FR-009.4: System shall detect spending anomalies (>2 standard deviations)
  • FR-009.5: System shall compare current period to historical averages
  • FR-009.6: System shall support custom date range analysis

FR-010: Starling Spaces Integration

Priority: Low
Description: System shall integrate with Starling Spaces for physical budget allocation
Sub-requirements:
  • FR-010.1: System shall retrieve list of Spaces via API
  • FR-010.2: System shall automatically transfer funds to category Spaces at period start
  • FR-010.3: System shall map budget categories to corresponding Spaces
  • FR-010.4: System shall reconcile Space balances with budget tracking
  • FR-010.5: System shall handle Space transaction attribution

FR-011: Dashboard and Reporting

Priority: High
Description: System shall provide interactive dashboards for budget visualization
Sub-requirements:
  • FR-011.1: System shall display current budget status (traffic light indicators)
  • FR-011.2: System shall show spending trends over time (charts)
  • FR-011.3: System shall display top merchants by spending
  • FR-011.4: System shall show category breakdown (pie/bar charts)
  • FR-011.5: System shall display daily spending rate vs. budget burn rate
  • FR-011.6: System shall support mobile-responsive interface design
  • FR-011.7: System shall export reports in CSV/PDF formats

FR-012: Data Management

Priority: Medium
Description: System shall provide data management and maintenance capabilities
Sub-requirements:
  • FR-012.1: System shall archive transactions older than 24 months
  • FR-012.2: System shall support manual transaction editing with audit trail
  • FR-012.3: System shall support bulk transaction operations (categorization, deletion)
  • FR-012.4: System shall provide data export functionality (full backup)
  • FR-012.5: System shall support data import from external sources (CSV)
  • FR-012.6: System shall maintain referential integrity across linked tables

3.2 NON-FUNCTIONAL REQUIREMENTS

NFR-001: Performance

  • NFR-001.1: API polling cycle shall complete within <30 seconds
  • NFR-001.2: Webhook processing shall complete within <10 seconds
  • NFR-001.3: Dashboard shall load within <3 seconds
  • NFR-001.4: Budget calculations shall complete within <5 seconds
  • NFR-001.5: Historical import of 1000 transactions shall complete within <5 minutes

NFR-002: Reliability

  • NFR-002.1: System shall achieve 99.5% uptime (excluding planned maintenance)
  • NFR-002.2: Transaction ingestion shall have 99.9% success rate
  • NFR-002.3: Alert delivery shall have 99% success rate within 2 minutes
  • NFR-002.4: System shall recover automatically from transient failures
  • NFR-002.5: System shall maintain data integrity during failures

NFR-003: Security

  • NFR-003.1: System shall store API credentials encrypted at rest
  • NFR-003.2: System shall use OAuth 2.0 for Starling Bank authentication
  • NFR-003.3: System shall rotate access tokens before expiration
  • NFR-003.4: System shall log all access to sensitive data
  • NFR-003.5: System shall support 2FA for Airtable access
  • NFR-003.6: System shall comply with PSD2 regulations for financial data

NFR-004: Scalability

  • NFR-004.1: System shall support up to 500 transactions per month
  • NFR-004.2: System shall support up to 20 budget categories
  • NFR-004.3: System shall maintain performance with 24 months of data
  • NFR-004.4: System shall support multiple Starling accounts (future)

NFR-005: Maintainability

  • NFR-005.1: N8N workflows shall be documented with inline descriptions
  • NFR-005.2: Airtable formulas shall include comments
  • NFR-005.3: System shall use consistent naming conventions
  • NFR-005.4: Configuration shall be externalized (no hardcoded values)
  • NFR-005.5: System shall provide logging for debugging

NFR-006: Usability

  • NFR-006.1: Dashboard shall be intuitive without training
  • NFR-006.2: Configuration changes shall take effect within 1 minute
  • NFR-006.3: Error messages shall be clear and actionable
  • NFR-006.4: System shall support mobile access via Airtable app

NFR-007: Compatibility

  • NFR-007.1: System shall work with Starling Bank API v2
  • NFR-007.2: System shall work with N8N version 1.0+
  • NFR-007.3: System shall work with Airtable REST API v0
  • NFR-007.4: System shall support modern web browsers (Chrome, Firefox, Safari, Edge)

4. SYSTEM ARCHITECTURE

4.1 Component Overview

┌─────────────────────────────────────────────────────────────┐
│                        USER INTERFACE                        │
│  ┌────────────────┐  ┌────────────────┐  ┌────────────────┐│
│  │ Airtable Web   │  │ Airtable Mobile│  │ Email/Slack    ││
│  │ Interface      │  │ App            │  │ Notifications  ││
│  └────────────────┘  └────────────────┘  └────────────────┘│
└─────────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────────┐
│                     PRESENTATION LAYER                       │
│  ┌────────────────────────────────────────────────────────┐ │
│  │              Airtable Interfaces & Views                │ │
│  │  • Budget Dashboard  • Transaction List  • Reports      │ │
│  └────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────────┐
│                       DATA LAYER                             │
│  ┌────────────────────────────────────────────────────────┐ │
│  │                   Airtable Base                         │ │
│  │  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐ │ │
│  │  │Transactions  │  │Budget        │  │Spending      │ │ │
│  │  │Table         │  │Categories    │  │Periods       │ │ │
│  │  │              │  │Table         │  │Table         │ │ │
│  │  └──────────────┘  └──────────────┘  └──────────────┘ │ │
│  │  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐ │ │
│  │  │Categorization│  │Alert         │  │Enforcement   │ │ │
│  │  │Rules         │  │History       │  │Log           │ │ │
│  │  │Table         │  │Table         │  │Table         │ │ │
│  │  └──────────────┘  └──────────────┘  └──────────────┘ │ │
│  └────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────────┐
│                    PROCESSING LAYER                          │
│  ┌────────────────────────────────────────────────────────┐ │
│  │                  N8N Workflow Engine                    │ │
│  │  ┌──────────────────────────────────────────────────┐  │ │
│  │  │  WF-001: Transaction Polling (5 min schedule)    │  │ │
│  │  │  WF-002: Webhook Transaction Capture (real-time) │  │ │
│  │  │  WF-003: Transaction Categorization             │  │ │
│  │  │  WF-004: Budget Calculation (on transaction)     │  │ │
│  │  │  WF-005: Alert Evaluation (on calculation)       │  │ │
│  │  │  WF-006: Notification Dispatch                   │  │ │
│  │  │  WF-007: Enforcement Actions                     │  │ │
│  │  │  WF-008: Historical Import (manual trigger)      │  │ │
│  │  │  WF-009: Period Rollover (daily at midnight)     │  │ │
│  │  │  WF-010: Spaces Sync (weekly)                    │  │ │
│  │  └──────────────────────────────────────────────────┘  │ │
│  └────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────────┐
│                    EXTERNAL SERVICES                         │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐      │
│  │ Starling Bank│  │ Email Service│  │ Slack API    │      │
│  │ API          │  │ (SMTP)       │  │              │      │
│  └──────────────┘  └──────────────┘  └──────────────┘      │
└─────────────────────────────────────────────────────────────┘

4.2 Data Flow

Primary Transaction Flow:
  1. Starling Bank → N8N (WF-001 polling or WF-002 webhook)
  2. N8N → Airtable Transactions Table (create record)
  3. Airtable → N8N (webhook on new record)
  4. N8N (WF-003) → Apply categorization rules
  5. N8N (WF-004) → Calculate budget status
  6. N8N (WF-005) → Evaluate alert conditions
  7. N8N (WF-006) → Send notifications if triggered
  8. User → Airtable Interface (view dashboard)

5. DATA SCHEMA

5.1 Airtable Base Structure

Table: Transactions

Field NameTypeDescriptionFormula/Validation
Transaction IDSingle line textUnique identifier from StarlingPRIMARY KEY
DateDateTransaction dateRequired
TimeSingle line textTransaction timeHH:MM:SS format
AmountCurrencyTransaction amount (GBP)Required, can be negative
MerchantSingle line textMerchant name
CategoryLink to CategoryBudget categoryRequired
SubcategorySingle line textOptional subcategory
StatusSingle selectsettled, pending, declinedDefault: settled
DirectionSingle selectin, outCalculated from amount
Payment MethodSingle selectcard, direct_debit, transfer
NotesLong textAdditional notes
Auto CategorizedCheckboxWas auto-categorized?
Categorization RuleLink to RulesApplied rule
Raw DataLong textJSON from Starling API
Created AtCreated timeRecord creation timestampAuto
Modified AtLast modified timeLast update timestampAuto

Table: Budget Categories

Field NameTypeDescriptionFormula/Validation
Category IDAutonumberUnique identifierPRIMARY KEY
NameSingle line textCategory nameRequired, unique
Monthly LimitCurrencyBudget limit (GBP)Required, > 0
Buffer PercentageNumberBuffer % (10-15%)Default: 10
Effective LimitFormulaLimit * (1 + Buffer/100)
Parent CategoryLink to selfParent for subcategories
ColorSingle selectUI color coding
IconSingle line textEmoji or icon
Allow RolloverCheckboxRollover unused budgetDefault: false
Starling Space IDSingle line textLinked Space ID
ActiveCheckboxIs category active?Default: true
Created AtCreated timeRecord creation timestampAuto

Table: Spending Periods

Field NameTypeDescriptionFormula/Validation
Period IDAutonumberUnique identifierPRIMARY KEY
Period TypeSingle selectmonthly, quarterly, annualDefault: monthly
Start DateDatePeriod startRequired
End DateDatePeriod endRequired
StatusSingle selectfuture, current, closedCalculated
TransactionsLink to TransactionsAll transactions in periodFiltered by date
Total SpentRollupSum of transaction amounts
Budget TotalFormulaSum of all category limits
VarianceFormulaBudget Total - Total Spent
Created AtCreated timeRecord creation timestampAuto

Table: Category Performance (Linked)

Field NameTypeDescriptionFormula/Validation
Performance IDAutonumberUnique identifierPRIMARY KEY
PeriodLink to PeriodsSpending periodRequired
CategoryLink to CategoriesBudget categoryRequired
TransactionsLink to TransactionsFiltered transactionsCategory + Period
Total SpentRollupSum of amounts
Budget LimitLookupFrom Category
RemainingFormulaLimit - Spent
Percentage UsedFormula(Spent/Limit)*100
StatusFormulahealthy/warning/exceededBased on %
Projected EOPSpendFormulaBased on daily rate
Days RemainingFormulaPeriod End - Today
Daily Burn RateFormulaSpent / Days Elapsed

Table: Categorization Rules

Field NameTypeDescriptionFormula/Validation
Rule IDAutonumberUnique identifierPRIMARY KEY
Rule NameSingle line textDescriptive nameRequired
Match TypeSingle selectmerchant, keyword, amount_rangeRequired
Match ValueSingle line textValue to matchRequired
Target CategoryLink to CategoriesCategory to assignRequired
PriorityNumberRule priority (1-100)Default: 50
ActiveCheckboxIs rule active?Default: true
Times AppliedNumberUsage counterAuto-increment
Last UsedDateLast applicationAuto-update
Created AtCreated timeRecord creation timestampAuto

Table: Alert History

Field NameTypeDescriptionFormula/Validation
Alert IDAutonumberUnique identifierPRIMARY KEY
TimestampDateAlert trigger timeAuto
Alert TypeSingle selectwarning, critical, dailyRequired
CategoryLink to CategoriesRelated category
PeriodLink to PeriodsRelated period
ThresholdNumberThreshold percentage
Spent AmountCurrencyAmount at alert time
Limit AmountCurrencyLimit at alert time
MessageLong textAlert message content
ChannelsMultiple selectemail, slack, sms
Delivery StatusSingle selectsent, failed, pending
AcknowledgedCheckboxUser acknowledged
Action TakenLong textUser response/action

Table: Enforcement Log

Field NameTypeDescriptionFormula/Validation
Action IDAutonumberUnique identifierPRIMARY KEY
TimestampDateAction timestampAuto
Action TypeSingle selectfreeze, unfreeze, limit_setRequired
CategoryLink to CategoriesRelated category
Triggered BySingle selectautomatic, manual
Card AffectedSingle line textCard ID or last 4 digits
ReasonLong textReason for action
ThresholdNumberTriggering threshold
Override CodeSingle line textEmergency override used
ResultSingle selectsuccess, failed
User NotifiedCheckboxNotification sent

6. N8N WORKFLOW SPECIFICATIONS

WF-001: Transaction Polling

Trigger: Schedule (every 5 minutes)
Description: Polls Starling Bank API for new transactions
Nodes:
  1. Schedule Trigger - Cron: */5 * * * *
  2. HTTP Request - Get Transactions
    • Method: GET
    • URL: https://api.starlingbank.com/api/v2/feed/account/{accountUid}/category/{categoryUid}
    • Auth: OAuth2 (bearer token)
    • Headers: Accept: application/json
    • Query Params: changesSince=
  3. Check for New Transactions (IF node)
    • Condition: \{\{$json.feedItems.length\}\} > 0
  4. Get Last Synced Timestamp (Airtable Read)
    • Base: Budget Tracker
    • Table: System Config
    • Filter: Field=LastSyncTimestamp
  5. Loop Through Transactions (Split in Batches)
    • Batch Size: 10
  6. Check if Transaction Exists (Airtable Search)
    • Filter: TransactionID = {{$json.feedItemUid}}
  7. Skip if Exists (IF node)
  8. Create Transaction Record (Airtable Create)
    • Map fields from API response
  9. Update Last Sync Timestamp (Airtable Update)
    • Set to current timestamp
  10. Error Handler (On workflow error)
    • Log to error table
    • Send notification
Error Handling:
  • Retry failed API calls 3 times with exponential backoff (5s, 15s, 45s)
  • Log all errors to Airtable error log
  • Send alert after 3 consecutive failures

WF-002: Webhook Transaction Capture

Trigger: Webhook (from Starling Bank)
Description: Receives real-time transaction notifications
Nodes:
  1. Webhook Trigger
    • Path: /starling-webhook
    • Method: POST
    • Response: 200 OK immediately
  2. Validate Webhook Signature (Function node)
    • Verify HMAC signature
  3. Parse Transaction Data (Set node)
  4. Check Duplicate (Airtable Search)
  5. Create Transaction Record (Airtable Create)
  6. Trigger Categorization (Call WF-003)

WF-003: Transaction Categorization

Trigger: Airtable Webhook (new transaction without category)
Description: Automatically categorizes transactions
Nodes:
  1. Webhook Trigger (from Airtable)
  2. Get Transaction Details (Airtable Read)
  3. Get Categorization Rules (Airtable List)
    • Filter: Active = true
    • Sort: Priority DESC
  4. Loop Through Rules (Split in Batches)
  5. Apply Rule Logic (Function node)
    • Match merchant name
    • Match keywords in description
    • Match amount ranges
  6. First Match Wins (IF node)
  7. Update Transaction (Airtable Update)
    • Set Category
    • Set Auto Categorized = true
    • Set Categorization Rule
  8. Increment Rule Usage (Airtable Update)
  9. Trigger Budget Calculation (Call WF-004)
  10. Flag for Manual Review (if no match)

WF-004: Budget Calculation

Trigger: Airtable Webhook (transaction categorized)
Description: Recalculates budget status
Nodes:
  1. Webhook Trigger
  2. Get Current Period (Airtable Read)
    • Filter: Status = current
  3. Get Transaction Category (Airtable Read)
  4. Get Category Performance Record (Airtable Search)
    • Filter: Period + Category match
  5. Calculate Metrics (Function node)
    // Total Spent (from rollup)
    const spent = $json.totalSpent;
    const limit = $json.budgetLimit;
    const remaining = limit - spent;
    const percentageUsed = (spent / limit) * 100;
    
    // Projected end-of-period spend
    const daysInPeriod = dateDiff(periodEnd, periodStart);
    const daysElapsed = dateDiff(today, periodStart);
    const daysRemaining = dateDiff(periodEnd, today);
    const dailyBurnRate = spent / daysElapsed;
    const projectedSpend = spent + (dailyBurnRate * daysRemaining);
    
    // Status
    let status;
    if (percentageUsed < 80) status = 'healthy';
    else if (percentageUsed < 100) status = 'warning';
    else status = 'exceeded';
    
    return {
      spent, limit, remaining, percentageUsed,
      projectedSpend, dailyBurnRate, status
    };
    
  6. Update Performance Record (Airtable Update)
  7. Trigger Alert Evaluation (Call WF-005)

WF-005: Alert Evaluation

Trigger: Called from WF-004
Description: Evaluates alert conditions and triggers notifications
Nodes:
  1. Receive Budget Metrics (input)
  2. Get Alert History (Airtable Read)
    • Filter: Category + Period + Last 24h
  3. Check 80% Threshold (IF node)
    • Condition: percentageUsed >= 80 AND no recent 80% alert
  4. Check 100% Threshold (IF node)
    • Condition: percentageUsed >= 100 AND no recent 100% alert
  5. Check 120% Daily Threshold (IF node)
    • Condition: percentageUsed >= 120 (daily check at 8pm)
  6. Create Alert Record (Airtable Create)
  7. Format Alert Message (Function node)
    const alertMessages = {
      warning: `⚠️ Budget Warning: ${category}
      You've spent £${spent} (${percentageUsed}%) of your £${limit} budget.
      £${remaining} remaining for the rest of the period.`,
      
      critical: `🚨 Budget EXCEEDED: ${category}
      You've spent £${spent} (${percentageUsed}%) of your £${limit} budget.
      You're £${Math.abs(remaining)} over budget.`,
      
      daily: `📊 Daily Budget Update: ${category}
      Spent: £${spent} / £${limit} (${percentageUsed}%)
      Daily burn rate: £${dailyBurnRate}
      Projected month-end: £${projectedSpend}`
    };
    
  8. Trigger Notification (Call WF-006)
  9. Trigger Enforcement (Call WF-007 if applicable)

WF-006: Notification Dispatch

Trigger: Called from WF-005
Description: Sends notifications via configured channels
Nodes:
  1. Receive Alert Data (input)
  2. Get User Notification Preferences (Airtable Read)
  3. Send Email (Email node - if enabled)
    • SMTP Configuration
    • To: user email
    • Subject: Alert type + category
    • Body: formatted message (HTML)
  4. Send Slack (Slack node - if enabled)
    • Workspace: configured workspace
    • Channel: #budget-alerts or DM
    • Message: formatted message (Slack markdown)
    • Attachments: budget chart image
  5. Send SMS (Twilio node - if enabled)
    • To: user phone
    • Message: shortened alert message
  6. Update Alert Record (Airtable Update)
    • Set delivery status
    • Set channels used

WF-007: Enforcement Actions

Trigger: Manual or from WF-005
Description: Executes spending enforcement actions
Nodes:
  1. Receive Enforcement Request (input)
  2. Check Enforcement Policy (Airtable Read)
    • Get category enforcement settings
  3. Evaluate Override (IF node)
    • Check for emergency override code
  4. Call Starling Card Controls API (HTTP Request)
    • Method: PUT
    • URL: https://api.starlingbank.com/api/v2/card/{cardUid}/controls
    • Body: { "enabled": false } for freeze
  5. Create Enforcement Log (Airtable Create)
  6. Send Confirmation Notification (Call WF-006)
  7. Schedule Auto-Unfreeze (if temporary)
    • Create scheduled workflow trigger

WF-008: Historical Import

Trigger: Manual button
Description: Imports historical transactions for baseline analysis
Nodes:
  1. Manual Trigger (button)
  2. Get Import Parameters (input form)
    • Start date (default: 6 months ago)
    • End date (default: today)
  3. Call Starling API (HTTP Request)
    • Paginated requests for date range
  4. Process in Batches (Split in Batches - 100 records)
  5. Create Transaction Records (Airtable Create)
  6. Trigger Categorization (Call WF-003 for each batch)
  7. Generate Import Summary (Function node)
  8. Send Completion Notification

WF-009: Period Rollover

Trigger: Schedule (daily at midnight)
Description: Manages budget period transitions
Nodes:
  1. Schedule Trigger (Cron: 0 0 * * *)
  2. Check Period End (Function node)
    • Is today the last day of current period?
  3. Close Current Period (Airtable Update)
    • Set status = closed
    • Calculate final metrics
  4. Create New Period (Airtable Create)
    • Start date = tomorrow
    • End date = end of next period
    • Status = current
  5. Handle Rollover Budgets (Function + Airtable Update)
    • For categories with rollover enabled
    • Add unused budget to next period limit
  6. Reset Category Performance (Airtable Create)
    • New records for new period
  7. Send Period Summary Report (Call WF-006)
    • Summary of closed period
    • Spending highlights
    • Budget performance

WF-010: Spaces Synchronization

Trigger: Schedule (weekly on Sunday)
Description: Syncs Starling Spaces with budget categories
Nodes:
  1. Schedule Trigger (Cron: 0 9 * * 0)
  2. Get Starling Spaces (HTTP Request)
    • URL: https://api.starlingbank.com/api/v2/account/{accountUid}/spaces
  3. Get Budget Categories (Airtable List)
    • Filter: Starling Space ID is not empty
  4. Match Categories to Spaces (Function node)
  5. Calculate Target Balances (Function node)
    • Based on remaining budget
  6. Transfer Funds (HTTP Request - for each mismatch)
    • URL: https://api.starlingbank.com/api/v2/account/{accountUid}/spaces/{spaceUid}/add-money
    • OR withdraw if over-funded
  7. Log Transfers (Airtable Create)
  8. Send Sync Summary

7. DASHBOARD SPECIFICATIONS

7.1 Main Budget Dashboard

Layout: Single page with multiple sections Section 1: Overview Cards (Top Row)
  • Total Budget This Period: £X,XXX
  • Total Spent: £X,XXX (XX%)
  • Remaining: £X,XXX
  • Status: Healthy/Warning/Critical (color coded)
Section 2: Category Status (Grid) For each category:
  • Category name with icon
  • Progress bar (spent/limit)
  • Spent: £XXX / £XXX
  • Remaining: £XXX
  • Status indicator (🟢🟡🔴)
  • “View Details” button
Section 3: Spending Trends (Chart)
  • Line chart showing daily spending
  • Comparison to previous period
  • Budget burn rate line
  • Projected end-of-period spend
Section 4: Recent Transactions (Table)
  • Last 10 transactions
  • Columns: Date, Merchant, Amount, Category, Status
  • Quick categorization action for uncategorized
  • “View All” button
Section 5: Top Merchants
  • Bar chart of top 10 merchants by spend
  • Clickable to filter transactions
Section 6: Alerts & Actions
  • Recent alerts list
  • Quick action buttons:
    • View all alerts
    • Freeze cards
    • Export report
    • Adjust budgets
Responsive Design:
  • Desktop: 3-column layout
  • Tablet: 2-column layout
  • Mobile: Single column stack

7.2 Category Detail View

Header:
  • Category name, icon, and color
  • Budget limit (editable)
  • Current period dates
Metrics Section:
  • Total spent with large number
  • Percentage gauge (circular progress)
  • Remaining budget
  • Daily burn rate
  • Projected month-end spend
  • Days remaining
Transactions List:
  • All transactions for this category in current period
  • Sortable by date, amount
  • Filterable by merchant, date range
  • Bulk categorization actions
Historical Comparison:
  • Compare current period to last 3 periods
  • Bar chart showing monthly spend trend
  • Average, min, max indicators
Merchants Breakdown:
  • Pie chart of spending by merchant
  • Table with merchant totals

7.3 Transaction Management View

Filters Panel (Left Sidebar):
  • Date range picker
  • Category multi-select
  • Merchant search
  • Amount range slider
  • Status filter
  • Payment method filter
Transaction Table:
  • All fields visible
  • Inline editing for category, notes
  • Bulk selection and actions
  • Sort by any column
  • Search across all fields
Actions Toolbar:
  • Export selected (CSV)
  • Bulk categorize
  • Delete selected
  • Create categorization rule from selected

7.4 Budget Configuration View

Category Management:
  • List of all categories
  • Add/edit/delete categories
  • Set limits
  • Configure buffer percentages
  • Enable/disable rollover
  • Link to Starling Spaces
Categorization Rules:
  • List of all rules
  • Add/edit/delete rules
  • Test rule against historical transactions
  • Enable/disable rules
  • Priority ordering (drag and drop)
Alert Settings:
  • Configure threshold percentages
  • Enable/disable notification channels
  • Set notification frequency
  • Configure quiet hours
Enforcement Settings:
  • Enable/disable automatic card freeze
  • Set freeze thresholds by category
  • Configure emergency override codes
  • Set auto-unfreeze schedules

7.5 Reporting & Analytics View

Period Comparison:
  • Select multiple periods
  • Side-by-side comparison
  • Key metrics: total spent, budget adherence, top categories
  • Trend analysis
Spending Insights:
  • Anomaly detection highlights
  • Recurring transaction identification
  • Seasonal pattern analysis
  • Spend forecasting
Export Options:
  • Monthly summary report (PDF)
  • Transaction export (CSV)
  • Budget vs. actual report
  • Category performance report

8. VERIFICATION TRACEABILITY MATRIX (VTM)

8.1 Test Suite Overview

Test Suite IDNameTypeTool/FrameworkCoverage
TS-001API Integration TestsIntegrationPostman/NewmanFR-001, FR-010
TS-002Data Storage TestsIntegrationN8N Test WorkflowsFR-002
TS-003Categorization TestsFunctionalN8N + AirtableFR-004
TS-004Budget Calculation TestsFunctionalJavaScript/JestFR-005
TS-005Alert Logic TestsFunctionalN8N Test WorkflowsFR-006
TS-006Notification TestsIntegrationManual + LogsFR-007
TS-007Enforcement TestsIntegrationManual + APIFR-008
TS-008Dashboard UI TestsUISelenium/CypressFR-011, NFR-006
TS-009Performance TestsNon-FunctionalJMeterNFR-001
TS-010Security TestsNon-FunctionalOWASP ZAPNFR-003
TS-011Reliability TestsNon-FunctionalChaos TestingNFR-002
TS-012End-to-End TestsSystemManual + AutomatedAll FRs

8.2 Detailed Verification Traceability Matrix

Requirement IDRequirement DescriptionTest SuiteTest Case IDTest MethodPass CriteriaPriority
FR-001Transaction IngestionCritical
FR-001.1OAuth 2.0 authenticationTS-001TC-001.1Automated API testToken obtained and validatedP0
FR-001.2Poll every 5 minutesTS-001TC-001.2Workflow log reviewExecution every 5 min ±10sP0
FR-001.3Webhook real-time captureTS-001TC-001.3Live webhook testTransaction received <10sP0
FR-001.4Pagination supportTS-001TC-001.4API test with 100+ recordsAll records retrievedP1
FR-001.5DeduplicationTS-002TC-002.1Import same transaction twiceOnly one record createdP0
FR-001.6Metadata retrievalTS-001TC-001.6Verify API response fieldsAll fields populatedP1
FR-001.7Retry with backoffTS-011TC-011.1Simulate API failure3 retries with correct delaysP0
FR-002Transaction StorageCritical
FR-002.1Create records with fieldsTS-002TC-002.2Insert test transactionAll fields correctly storedP0
FR-002.2Link to categoriesTS-002TC-002.3Create transaction with categoryLink establishedP0
FR-002.3ImmutabilityTS-002TC-002.4Attempt to modify historicalModification blocked/loggedP1
FR-002.4TimestampsTS-002TC-002.5Verify created/modified timesTimestamps accurateP1
FR-002.5Currency conversionTS-002TC-002.6EUR transactionConverted to GBP correctlyP2
FR-002.6Raw data storageTS-002TC-002.7Check raw data fieldComplete JSON storedP1
FR-003Budget ConfigurationCritical
FR-003.1Define categoriesTS-003TC-003.1Create budget categoriesCategories savedP0
FR-003.2Monthly limitsTS-003TC-003.2Set and verify limitsLimits enforcedP0
FR-003.3Rollover toggleTS-003TC-003.3Enable/disable rolloverBehavior changes correctlyP2
FR-003.4Budget periodsTS-003TC-003.4Create monthly/quarterlyPeriod calculations correctP1
FR-003.5Buffer percentagesTS-004TC-004.1Calculate effective limitFormula accurateP1
FR-003.6SubcategoriesTS-003TC-003.6Create parent/child categoriesHierarchy maintainedP2
FR-004Automated CategorizationHigh
FR-004.1Merchant name matchingTS-003TC-003.7Test known merchantCorrect category assignedP0
FR-004.2Starling category fallbackTS-003TC-003.8Transaction without ruleFalls back to native categoryP1
FR-004.3Keyword matchingTS-003TC-003.9Test keyword rulesMatches detectedP1
FR-004.4Learn from correctionsTS-003TC-003.10Manual recategorizationRule suggestion generatedP2
FR-004.5Flag uncategorizedTS-003TC-003.11Transaction with no matchFlagged for reviewP1
FR-004.6Split transactionsTS-003TC-003.12Create split transactionMultiple categories assignedP2
FR-005Real-Time Budget TrackingCritical
FR-005.1Calculate total spentTS-004TC-004.2Sum category transactionsAccurate totalP0
FR-005.2Calculate remainingTS-004TC-004.3Limit - spentCorrect remaining amountP0
FR-005.3Percentage consumedTS-004TC-004.4(Spent/limit)*100Accurate percentageP0
FR-005.4Identify statusTS-004TC-004.5Test status thresholdsCorrect status assignedP0
FR-005.5Project end-of-periodTS-004TC-004.6Calculate projectionReasonable projectionP1
FR-005.6Update within 60sTS-009TC-009.1Time update latencyUpdates <60sP0
FR-006Threshold AlertingHigh
FR-006.180% warning alertTS-005TC-005.1Reach 80% thresholdAlert triggeredP0
FR-006.2100% critical alertTS-005TC-005.2Reach 100% thresholdAlert triggeredP0
FR-006.3120% daily alertTS-005TC-005.3Reach 120% at 8pmAlert triggeredP1
FR-006.4Custom thresholdsTS-005TC-005.4Set custom %, verify triggerCustom alert worksP1
FR-006.5Prevent duplicatesTS-005TC-005.5Trigger twice in 24hOnly one alert sentP1
FR-006.6Include contextTS-006TC-006.1Review alert messageAll context includedP1
FR-007Notification DeliveryHigh
FR-007.1Send emailTS-006TC-006.2Trigger email notificationEmail receivedP0
FR-007.2Send SlackTS-006TC-006.3Trigger Slack notificationSlack message receivedP0
FR-007.3Send SMSTS-006TC-006.4Trigger SMS notificationSMS receivedP1
FR-007.4Push notificationsTS-006TC-006.5Trigger pushPush receivedP2
FR-007.5Configure preferencesTS-006TC-006.6Change notification settingsPreferences appliedP1
FR-007.6Log delivery statusTS-006TC-006.7Check logsStatus recordedP1
FR-008Spending EnforcementMedium
FR-008.1Card controls APITS-007TC-007.1Call API successfullyAPI responds 200P1
FR-008.2Manual card freezeTS-007TC-007.2Trigger manual freezeCard frozenP1
FR-008.3Automated freezeTS-007TC-007.3Reach auto-freeze thresholdCard frozen automaticallyP1
FR-008.4Emergency overrideTS-007TC-007.4Use override codeFreeze preventedP1
FR-008.5Log enforcement actionsTS-007TC-007.5Check enforcement logAction loggedP1
FR-008.6Confirmation notificationTS-006TC-006.8Verify notification sentConfirmation receivedP1
FR-009Historical AnalysisMedium
FR-009.1Import 6 months historyTS-001TC-001.7Run historical importAll transactions importedP1
FR-009.2Calculate averagesTS-004TC-004.7Verify average calculationsAccurate averagesP1
FR-009.3Identify trendsTS-004TC-004.8Analyze trend detectionTrends correctly identifiedP2
FR-009.4Detect anomaliesTS-004TC-004.9Test anomaly detectionAnomalies flagged (>2 SD)P2
FR-009.5Compare to historicalTS-004TC-004.10Run comparison reportAccurate comparisonP2
FR-009.6Custom date rangesTS-012TC-012.1Set custom rangeData filtered correctlyP2
FR-010Starling Spaces IntegrationLow
FR-010.1Retrieve SpacesTS-001TC-001.8Call Spaces APISpaces list returnedP2
FR-010.2Auto-transfer fundsTS-007TC-007.6Trigger transferFunds moved correctlyP2
FR-010.3Map categories to SpacesTS-003TC-003.13Create mappingMapping savedP2
FR-010.4Reconcile balancesTS-004TC-004.11Compare balancesDiscrepancies identifiedP2
FR-010.5Attribute Space transactionsTS-002TC-002.8Space transactionCorrectly attributedP2
FR-011Dashboard and ReportingHigh
FR-011.1Display budget statusTS-008TC-008.1View dashboardStatus indicators visibleP0
FR-011.2Show spending trendsTS-008TC-008.2View chartsCharts render correctlyP1
FR-011.3Display top merchantsTS-008TC-008.3View merchant breakdownTop 10 shownP1
FR-011.4Show category breakdownTS-008TC-008.4View category chartsCharts accurateP1
FR-011.5Display burn rateTS-008TC-008.5View burn rate comparisonCalculation visibleP1
FR-011.6Mobile responsiveTS-008TC-008.6Test on mobile devicesLayout adapts correctlyP1
FR-011.7Export reportsTS-012TC-012.2Export CSV/PDFFiles generated correctlyP1
FR-012Data ManagementMedium
FR-012.1Archive old transactionsTS-002TC-002.9Trigger archivalRecords archivedP2
FR-012.2Manual editing with auditTS-002TC-002.10Edit transactionChange logged in audit trailP1
FR-012.3Bulk operationsTS-012TC-012.3Bulk categorize 50 recordsAll updatedP1
FR-012.4Full data exportTS-012TC-012.4Export complete databaseAll data includedP1
FR-012.5CSV importTS-002TC-002.11Import CSV fileRecords createdP2
FR-012.6Referential integrityTS-002TC-002.12Delete linked recordsIntegrity maintainedP1
NFR-001Performance
NFR-001.1API poll <30sTS-009TC-009.2Measure poll durationComplete <30sP0
NFR-001.2Webhook <10sTS-009TC-009.3Measure webhook latencyProcess <10sP0
NFR-001.3Dashboard load <3sTS-009TC-009.4Measure page load timeLoad <3sP1
NFR-001.4Calculations <5sTS-009TC-009.5Measure calculation timeComplete <5sP1
NFR-001.5Historical import 1000 <5mTS-009TC-009.6Time 1000 record importComplete <5 minP1
NFR-002Reliability
NFR-002.199.5% uptimeTS-011TC-011.2Monitor over 30 daysUptime ≥99.5%P0
NFR-002.299.9% ingestion successTS-011TC-011.3Track success rateSuccess ≥99.9%P0
NFR-002.399% alert deliveryTS-011TC-011.4Track alert deliveryDelivery >=99%P1
NFR-002.4Auto-recoveryTS-011TC-011.5Simulate failuresSystem recoversP0
NFR-002.5Data integrityTS-011TC-011.6Verify after failureNo data loss/corruptionP0
NFR-003Security
NFR-003.1Encrypt credentialsTS-010TC-010.1Inspect stored credentialsEncrypted at restP0
NFR-003.2OAuth 2.0TS-010TC-010.2Verify auth flowOAuth correctly implementedP0
NFR-003.3Token rotationTS-010TC-010.3Monitor token lifecycleRotates before expiryP0
NFR-003.4Audit loggingTS-010TC-010.4Check access logsAll access loggedP1
NFR-003.52FA supportTS-010TC-010.5Enable 2FAAccess requires 2FAP1
NFR-003.6PSD2 complianceTS-010TC-010.6Review complianceRequirements metP0
NFR-004Scalability
NFR-004.1Support 500 txn/monthTS-009TC-009.7Load test with 500 recordsPerformance maintainedP1
NFR-004.2Support 20 categoriesTS-009TC-009.8Create 20 categoriesSystem functionalP1
NFR-004.324 months dataTS-009TC-009.9Load 24 months dataPerformance acceptableP1
NFR-004.4Multiple accountsTS-012TC-012.5Add second accountSystem handles multipleP2
NFR-005Maintainability
NFR-005.1Workflow documentationTS-012TC-012.6Review workflow docsInline descriptions presentP1
NFR-005.2Formula commentsTS-012TC-012.7Review Airtable formulasComments presentP1
NFR-005.3Naming conventionsTS-012TC-012.8Code reviewConsistent namingP1
NFR-005.4Externalized configTS-012TC-012.9Check hardcoded valuesNone foundP1
NFR-005.5LoggingTS-012TC-012.10Review logsSufficient loggingP1
NFR-006Usability
NFR-006.1Intuitive dashboardTS-008TC-008.7User testing (5 users)No training requiredP1
NFR-006.2Config changes <1mTS-012TC-012.11Measure config update timeTakes effect <1 minP1
NFR-006.3Clear error messagesTS-012TC-012.12Trigger various errorsMessages are actionableP1
NFR-006.4Mobile accessTS-008TC-008.8Test Airtable mobile appFull functionalityP1
NFR-007Compatibility
NFR-007.1Starling API v2TS-001TC-001.9Verify API versionv2 endpoints usedP0
NFR-007.2N8N 1.0+TS-012TC-012.13Check N8N versionCompatible versionP0
NFR-007.3Airtable REST API v0TS-002TC-002.13Verify API versionv0 endpoints usedP0
NFR-007.4Browser supportTS-008TC-008.9Test on 4 browsersAll browsers workP1

9. TEST SPECIFICATIONS

9.1 Test Suite TS-001: API Integration Tests

Tool: Postman / Newman (CLI)
Execution: Automated in CI/CD pipeline

TC-001.1: OAuth 2.0 Authentication

Objective: Verify Starling Bank OAuth flow
Pre-conditions:
  • Valid Starling developer credentials
  • Redirect URL configured Steps:
  1. Initiate OAuth authorization request
  2. Provide user credentials
  3. Capture authorization code
  4. Exchange code for access token
  5. Verify token validity Expected Results:
  • Access token received
  • Token includes required scopes
  • Token can be used for API calls Pass Criteria: Valid access token obtained

TC-001.2: Transaction Polling Schedule

Objective: Verify 5-minute polling interval
Pre-conditions:
  • N8N workflow WF-001 active
  • Logging enabled Steps:
  1. Monitor workflow executions for 30 minutes
  2. Record execution timestamps
  3. Calculate intervals Expected Results:
  • 6 executions in 30 minutes
  • Intervals are 5 minutes ±10 seconds Pass Criteria: All intervals within tolerance

TC-001.3: Webhook Real-Time Capture

Objective: Verify webhook transaction receipt
Pre-conditions:
  • Webhook endpoint configured in Starling dashboard
  • N8N webhook workflow active Steps:
  1. Configure test webhook
  2. Make test transaction with Starling card
  3. Record webhook receipt time vs. transaction time Expected Results:
  • Webhook received within 10 seconds
  • Transaction data complete Pass Criteria: Latency <10 seconds

TC-001.4: Pagination Support

Objective: Verify handling of large transaction sets
Pre-conditions:
  • Historical transactions >100 records available Steps:
  1. Request first page of transactions
  2. Iterate through all pages using pagination tokens
  3. Verify total count Expected Results:
  • All transactions retrieved
  • No duplicates
  • Correct total count Pass Criteria: Complete transaction set retrieved

TC-001.7: Historical Import

Objective: Verify 6-month historical import
Pre-conditions:
  • At least 6 months of transaction history
  • WF-008 configured Steps:
  1. Trigger historical import workflow
  2. Specify date range: 6 months ago to today
  3. Monitor import progress
  4. Verify transaction count Expected Results:
  • All historical transactions imported
  • No errors or duplicates Pass Criteria: Complete import with 0 errors

9.2 Test Suite TS-002: Data Storage Tests

Tool: N8N test workflows + Airtable validation
Execution: Automated

TC-002.1: Transaction Deduplication

Objective: Verify duplicate prevention
Pre-conditions:
  • Test transaction in staging Steps:
  1. Import transaction via API (first time)
  2. Import same transaction again
  3. Check Airtable record count Expected Results:
  • Only one record exists
  • Second import logged as duplicate Pass Criteria: Single record, no duplicates

TC-002.2: Record Creation with All Fields

Objective: Verify complete data storage
Pre-conditions:
  • Test transaction with all metadata Steps:
  1. Create transaction record
  2. Verify all fields populated
  3. Check data types Expected Results:
  • All fields contain correct data
  • Data types match schema Pass Criteria: All fields correctly populated

9.3 Test Suite TS-003: Categorization Tests

Tool: N8N workflow testing
Execution: Automated with manual validation

TC-003.7: Merchant Name Matching

Objective: Verify automatic categorization by merchant
Pre-conditions:
  • Categorization rules defined for known merchants Steps:
  1. Create test transaction with merchant “Tesco”
  2. Trigger WF-003
  3. Verify category assignment Expected Results:
  • Transaction categorized as “Groceries”
  • Auto Categorized flag = true Pass Criteria: Correct category assigned

9.4 Test Suite TS-004: Budget Calculation Tests

Tool: JavaScript/Jest unit tests
Execution: Automated

TC-004.2: Calculate Total Spent

Objective: Verify spending sum calculation
Test Data:
transactions = [
  { amount: -50.00, category: "Groceries" },
  { amount: -30.00, category: "Groceries" },
  { amount: -25.50, category: "Groceries" }
];
Expected Result: Total = £105.50
Pass Criteria: Calculation accurate to 2 decimal places

TC-004.6: Project End-of-Period Spend

Objective: Verify spending projection
Test Data:
periodStart = "2026-01-01";
periodEnd = "2026-01-31";
today = "2026-01-15";
spent = 300.00;
limit = 500.00;
Expected Calculation:
  • Days elapsed: 15
  • Days remaining: 16
  • Daily burn rate: £20
  • Projected spend: £300 + (£20 * 16) = £620 Pass Criteria: Projection within ±5% of calculation

9.5 Test Suite TS-005: Alert Logic Tests

Tool: N8N test workflows
Execution: Automated

TC-005.1: 80% Warning Alert

Objective: Trigger warning alert at threshold
Pre-conditions:
  • Category limit = £500
  • No alerts in last 24h Steps:
  1. Create transactions totaling £400
  2. Wait for WF-004 calculation
  3. Verify WF-005 triggers
  4. Check alert record created Expected Results:
  • Alert record with type=“warning”
  • Notification sent Pass Criteria: Alert triggered at 80%

9.6 Test Suite TS-006: Notification Tests

Tool: Manual verification with log checking
Execution: Manual

TC-006.2: Email Notification

Objective: Verify email delivery
Pre-conditions:
  • SMTP configured
  • Test email address Steps:
  1. Trigger alert
  2. Check email inbox
  3. Verify email content Expected Results:
  • Email received within 2 minutes
  • Content includes all required information Pass Criteria: Email received with correct content

9.7 Test Suite TS-007: Enforcement Tests

Tool: Manual with API verification
Execution: Manual

TC-007.2: Manual Card Freeze

Objective: Verify manual freeze functionality
Pre-conditions:
  • Starling test account with active card Steps:
  1. Trigger manual freeze via dashboard
  2. Verify WF-007 executes
  3. Check card status via API
  4. Attempt test transaction Expected Results:
  • Card status = frozen
  • Transaction declined
  • Enforcement log created Pass Criteria: Card successfully frozen

9.8 Test Suite TS-008: Dashboard UI Tests

Tool: Selenium / Cypress
Execution: Automated

TC-008.1: Display Budget Status

Objective: Verify dashboard rendering
Pre-conditions:
  • Test data in Airtable
  • Dashboard published Steps:
  1. Open dashboard URL
  2. Verify all sections load
  3. Check data accuracy Expected Results:
  • All sections visible
  • Data matches Airtable records
  • Visual indicators correct Pass Criteria: Dashboard fully functional

9.9 Test Suite TS-009: Performance Tests

Tool: JMeter
Execution: Automated in test environment

TC-009.1: Budget Update Latency

Objective: Measure calculation update time
Test Scenario:
  • Create new transaction
  • Measure time until dashboard updates Expected Result: <60 seconds
    Pass Criteria: 95th percentile <60s

TC-009.4: Dashboard Load Time

Objective: Measure page load performance
Test Scenario:
  • Load dashboard with 12 months data
  • Measure time to interactive Expected Result: <3 seconds
    Pass Criteria: Average <3s over 10 runs

9.10 Test Suite TS-010: Security Tests

Tool: OWASP ZAP
Execution: Automated security scan

TC-010.1: Credential Encryption

Objective: Verify credentials stored encrypted
Steps:
  1. Inspect N8N credential storage
  2. Attempt to read raw values
  3. Verify encryption algorithm Expected Results:
  • Credentials encrypted at rest
  • Strong encryption used (AES-256) Pass Criteria: No plaintext credentials found

9.11 Test Suite TS-011: Reliability Tests

Tool: Chaos testing framework
Execution: Automated

TC-011.1: API Retry with Backoff

Objective: Verify retry mechanism
Test Scenario:
  • Simulate Starling API timeout
  • Monitor retry attempts Expected Results:
  • 3 retry attempts
  • Delays: 5s, 15s, 45s
  • Error logged after final failure Pass Criteria: Retry logic executes correctly

9.12 Test Suite TS-012: End-to-End Tests

Tool: Manual + automated scripts
Execution: Manual with automated checks

TC-012.1: Complete Transaction Flow

Objective: Verify full system integration
Steps:
  1. Make real transaction with test card
  2. Verify webhook receipt
  3. Confirm categorization
  4. Check budget update
  5. Verify dashboard reflects change
  6. Confirm no alerts (if under threshold) Expected Results:
  • Transaction appears in dashboard within 2 minutes
  • Correctly categorized
  • Budget updated accurately Pass Criteria: End-to-end flow completes successfully

10. DEPLOYMENT SPECIFICATIONS

10.1 Infrastructure Requirements

N8N Hosting:
  • Self-hosted: VPS with 2GB RAM, 2 CPU cores, 20GB storage
  • OR N8N Cloud: Starter plan minimum
  • Node.js 18+
  • PostgreSQL 13+ (for N8N data)
Airtable:
  • Pro plan minimum (for API access, 50K records)
  • Workspace with appropriate permissions
Starling Bank:
  • Personal or Business account
  • Developer access enabled
  • OAuth application registered
Notification Services:
  • Email: SMTP server or service (SendGrid, AWS SES)
  • Slack: Workspace and app credentials
  • SMS (optional): Twilio account

10.2 Environment Configuration

Environment Variables (N8N):
STARLING_CLIENT_ID=<client_id>
STARLING_CLIENT_SECRET=<client_secret>
STARLING_REDIRECT_URI=<redirect_uri>
STARLING_ACCESS_TOKEN=<access_token>
STARLING_ACCOUNT_UID=<account_uid>
STARLING_CATEGORY_UID=<category_uid>

AIRTABLE_API_KEY=<api_key>
AIRTABLE_BASE_ID=<base_id>

SMTP_HOST=<smtp_host>
SMTP_PORT=<smtp_port>
SMTP_USER=<username>
SMTP_PASSWORD=<password>

SLACK_WEBHOOK_URL=<webhook_url>
SLACK_TOKEN=<bot_token>

TIMEZONE=Europe/London

10.3 Deployment Checklist

Phase 1: Foundation (Day 1-2)
  • Set up N8N instance
  • Configure Airtable base with all tables
  • Register Starling OAuth application
  • Configure SMTP for notifications
Phase 2: Core Integration (Day 3-5)
  • Deploy WF-001 (polling)
  • Deploy WF-002 (webhook)
  • Deploy WF-003 (categorization)
  • Test transaction ingestion
  • Configure webhook in Starling dashboard
Phase 3: Budget Logic (Day 6-8)
  • Create budget categories in Airtable
  • Deploy WF-004 (calculations)
  • Deploy WF-005 (alerts)
  • Create initial categorization rules
  • Test budget calculations
Phase 4: Notifications (Day 9-10)
  • Deploy WF-006 (notifications)
  • Configure Slack integration
  • Test all notification channels
  • Set up notification preferences
Phase 5: Advanced Features (Day 11-13)
  • Deploy WF-007 (enforcement)
  • Deploy WF-008 (historical import)
  • Run historical import for baseline
  • Deploy WF-009 (period rollover)
  • Test enforcement actions
Phase 6: Dashboard (Day 14-15)
  • Create Airtable interfaces
  • Build budget dashboard
  • Create transaction management view
  • Configure mobile access
  • User acceptance testing
Phase 7: Monitoring (Day 16-17)
  • Set up workflow monitoring
  • Configure error alerting
  • Create system health dashboard
  • Document troubleshooting procedures
Phase 8: Testing & Launch (Day 18-21)
  • Execute full test suite
  • Fix identified issues
  • Perform end-to-end testing
  • Create backup procedures
  • Go live

10.4 Rollback Plan

Rollback Triggers:
  • Critical workflow failures (>10% error rate)
  • Data integrity issues
  • Security vulnerabilities discovered
  • Starling API changes breaking integration
Rollback Procedure:
  1. Pause all workflows
  2. Backup current Airtable data
  3. Revert N8N workflows to previous version
  4. Restore backed-up Airtable structure
  5. Verify basic functionality
  6. Resume monitoring

10.5 Backup & Disaster Recovery

Backup Strategy:
  • N8N Workflows: Version control in Git (daily commits)
  • Airtable Data: Automated daily CSV export via API
  • Configuration: Document all environment variables
  • Retention: 30 days rolling backup
Recovery Procedures:
  • Workflow Failure: Restore from Git, redeploy
  • Data Loss: Restore from daily backup, re-run historical import
  • Complete Failure: Rebuild from documentation, restore data

11. MAINTENANCE & SUPPORT

11.1 Ongoing Maintenance Tasks

Daily:
  • Monitor workflow execution logs
  • Check alert delivery success rate
  • Review uncategorized transactions
Weekly:
  • Review categorization rule effectiveness
  • Check budget adherence trends
  • Update categorization rules as needed
Monthly:
  • Archive old transactions (>24 months)
  • Review and adjust budget limits
  • Analyze spending patterns
  • Update documentation
Quarterly:
  • Performance optimization review
  • Security audit
  • Backup restoration test
  • User satisfaction review

11.2 Monitoring & Alerting

System Health Metrics:
  • Workflow execution success rate (target: >99%)
  • API call success rate (target: >99.5%)
  • Alert delivery success rate (target: >99%)
  • Dashboard load time (target: <3s)
Alert Triggers:
  • 3 consecutive workflow failures
  • API rate limit approaching
  • Airtable record limit approaching (>45K)
  • Security anomalies detected

11.3 Common Issues & Troubleshooting

IssueLikely CauseResolution
Transactions not syncingOAuth token expiredRefresh token via WF-001
Duplicate transactionsDeduplication failureCheck Transaction ID uniqueness
Incorrect categorizationOutdated rulesReview and update rules
Alerts not receivedNotification config issueVerify SMTP/Slack credentials
Dashboard slowToo much historical dataArchive old transactions
Starling API errorsRate limitingReduce polling frequency

11.4 Future Enhancements

Planned Features:
  • Machine learning for categorization
  • Predictive budget recommendations
  • Multi-currency support
  • Family budget sharing
  • Mobile native app
  • Integration with other banks
  • Voice assistant integration

12. ACCEPTANCE CRITERIA

12.1 System Acceptance

The system is considered complete and ready for production when:
  1. All Critical (P0) Requirements Met:
    • All FR requirements with Priority=Critical pass testing
    • All NFR requirements with Priority=Critical pass testing
  2. Core Workflows Operational:
    • Transaction ingestion (polling + webhook) functional
    • Budget calculations accurate
    • Alerts triggered correctly
    • Notifications delivered successfully
  3. Dashboard Functional:
    • Main budget dashboard loads and displays data
    • Transaction list accessible and filterable
    • All visualizations render correctly
  4. Performance Targets Met:
    • Dashboard loads in <3 seconds
    • Budget updates within 60 seconds
    • 99.5% system uptime achieved
  5. Security Requirements Met:
    • OAuth authentication working
    • Credentials encrypted
    • Audit logging in place
  6. Documentation Complete:
    • User guide created
    • Technical documentation complete
    • Troubleshooting procedures documented

12.2 User Acceptance Testing (UAT)

UAT Scenarios:
  1. Daily Use:
    • User makes transaction
    • Checks dashboard
    • Verifies categorization
    • Reviews budget status
  2. Budget Management:
    • User adjusts budget limits
    • Creates new category
    • Updates categorization rules
  3. Alert Handling:
    • User receives warning alert
    • Reviews spending
    • Takes corrective action
  4. Monthly Rollover:
    • User reviews month-end report
    • Adjusts budgets for next period
    • Exports spending summary
UAT Pass Criteria:
  • All scenarios complete without errors
  • User can perform tasks without assistance
  • System behavior matches user expectations
  • No critical bugs identified

13. GLOSSARY

TermDefinition
Airtable BaseA database within Airtable containing multiple tables
Budget PeriodA defined timeframe for tracking budget (typically monthly)
Burn RateThe rate at which budget is being consumed (£/day)
Categorization RuleAutomated logic to assign transactions to categories
Enforcement ActionAutomated response to budget violations (e.g., card freeze)
OAuth 2.0Authorization framework for API access
RolloverCarrying unused budget to the next period
SpaceStarling Bank feature for separate sub-accounts
Transaction FeedStream of transaction data from Starling Bank
WebhookReal-time HTTP callback for event notifications

14. REFERENCES

14.1 External Documentation

14.2 Standards & Compliance

  • PSD2 (Payment Services Directive 2)
  • GDPR (General Data Protection Regulation)
  • ISO/IEC 27001 (Information Security)

DOCUMENT CONTROL

VersionDateAuthorChanges
1.02026-01-07System ArchitectInitial specification
Approval:
  • Technical Lead: _________________ Date: _______
  • Product Owner: _________________ Date: _______
  • QA Lead: _________________ Date: _______

END OF SPECIFICATION