Skip to content

Latest commit

 

History

515 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UK Student Loan Study

An interactive calculator to help understand UK student loan repayment under Plan 2/Plan 5 and Postgraduate loans.

Features

  • Calculate total repayment amounts based on salary
  • Visualise repayment timelines and effective rates
  • Compare Plan 2 (pre-2023) vs Plan 5 (post-2023)
  • Account for Postgraduate loans running concurrently
  • See personalised projections based on your salary

Tech Stack

  • Framework: Next.js 16 with App Router
  • Language: TypeScript 5
  • Styling: Tailwind CSS 4 + ShadCN components
  • Charts: Visx
  • State Management: Zustand with Immer
  • Testing: Vitest + React Testing Library

Development

Prerequisites

  • Node.js 18+
  • pnpm

Setup

# Install dependencies
pnpm install

# Start development server
pnpm dev

Open http://localhost:3000 to view the app.

Scripts

Command Description
pnpm dev Start development server
pnpm build Build for production
pnpm start Start production server
pnpm lint Run ESLint
pnpm test Run tests in watch mode
pnpm test:coverage Run tests with coverage

Project Structure

src/
  app/                 # Next.js App Router
    layout.tsx         # Root layout with metadata
    page.tsx           # Main calculator page
  components/          # React components
    ui/                # ShadCN UI components
  hooks/               # Custom React hooks
  utils/               # Utility functions
  types/               # TypeScript types
  lib/                 # Shared utilities
  store.ts             # Zustand store
  constants.ts         # Application constants

Deployment

The app is deployed on Vercel. Push to main to trigger a deployment.

UK Student Loan Plans

Plan 2 (Pre-2023 Students)

  • Repayment threshold: 2,274/month
  • Repayment rate: 9% above threshold
  • Interest: RPI to RPI+3% based on income
  • Write-off: 30 years after first repayment

Plan 5 (Post-2023 Students)

  • Repayment threshold: 2,083/month
  • Repayment rate: 9% above threshold
  • Interest: RPI only (no sliding scale)
  • Write-off: 40 years after first repayment

Postgraduate Loans

  • Repayment threshold: 1,750/month
  • Repayment rate: 6% above threshold
  • Runs concurrently with undergraduate loan

License

MIT

About

A small study into the UK student loan repayments.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages