Skip to content

PolicyEngine/obr-forecast-household-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OBR Forecast Household Calculator

A web application that allows households to calculate how the latest OBR forecasts might affect their net income by 2030.

Project Structure

This project consists of two main components:

  • frontend/: A Next.js application with TypeScript and Tailwind CSS
  • backend/: A FastAPI Python backend

Getting Started

Using Makefile (Recommended)

The project includes a Makefile for easy setup and running:

  1. Set up both backend and frontend:
make setup
  1. Run both services concurrently:
make run

Additional Makefile commands:

  • make setup-backend - Create virtual environment and install backend dependencies
  • make install-backend - Install backend dependencies only
  • make install-frontend - Install frontend dependencies only
  • make run-backend - Run only the backend server
  • make run-frontend - Run only the frontend server
  • make help - Show all available commands

Manual Setup

Backend Setup

  1. Navigate to the backend directory:
cd backend
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows, use: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the server:
uvicorn main:app --reload

The API will be available at http://localhost:8000

Frontend Setup

  1. Navigate to the frontend directory:
cd frontend
  1. Install dependencies:
npm install
  1. Run the development server:
npm run dev

The application will be available at http://localhost:3000

Features

  • Input household composition (adults and children)
  • Input employment income and ages
  • Calculate projected 2030 household income based on OBR forecasts
  • View income comparison and percentage changes

Disclaimer

This is a simplified calculator for demonstration purposes. The calculations are based on approximate forecasts and may not reflect actual future outcomes.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors