Giter Site home page Giter Site logo

ustaxlib's Introduction

ustaxlib

CI npm version

This project provides modules for modeling the US tax system for individuals. The ustaxlib/core module provides a generic framework for defining tax return forms. And peer modules like ustaxlib/fed2019 provide forms for specific revisions/years of tax returns.

There is a peer project ustaxviewer that can render a tax return as HTML.

Core

The ustaxlib/core module provides a very simple data model for tax returns:

  • TaxReturn: An abstract class that is the root of the object graph. It holds at least one Person and several Forms.
  • Person: A person for whom the TaxReturn is being computed.
  • Form: An abstract class that represents a single form in the tax system. Holds one or more Lines. Forms optionally take an input object, the values of which are typically exposed by an InputLine.
  • Line: An abstract class, with several concrete subclasses provided by core, that corresponds to a single line on a tax system form. A Line's parametrized type corresponds to the type of value that is computed by it. Examples are:
    • ComputedLine: Uses a function to produce a value.
    • ReferenceLine: Returns the value of a specific line of a Form.
    • InputLine: Returns the value of a Form's input.
    • AccumulatorLine: Some Forms can have multiple instances in a TaxReturn, and this line sums a specific line for all instances of that form type.

The core module provides what is effectively a specialized spreadsheet. Rather than sheets and rows, there are forms and lines. A TaxReturn provides a way to find forms by their type, and a Form provides access to the values computed by Lines.

Models

Currently ustaxlib supports the following models:

Getting Started

To start using the software, create a new, private NPM project, and install the necessary dependencies. This will also install the HTML viewer. Then copy an example file and run the viewer with it.

mkdir taxes && cd taxes
echo '{"private":true}' > package.json
npm i ts-node typescript ustaxlib ustaxviewer
cp node_modules/ustaxlib/examples/fed2019.ts .
npx ustaxviewer fed2019.ts

Contributing

Contributions to address bugs and not-supported forms or situations are welcome. Only forms for individuals are accepted (no estates, trusts, businesses, etc.). Please include tests with your contribution and keep your commit history clean.

Issues should be filed on GitHub.

Anticipated Answers

Why?

This project can be used to check the values produced by other tax software, to model expected tax liability throughout the year, or to learn about the US tax system.

Should I use this to file my own tax returns?

Please, heck no. There are guaranteed to be bugs in this software. The models do not support every situation, and many more complex parts of forms are not implemented. This software is provided with no warranty. There is no wizard/interview system; it is expected that you use the instructions on the IRS website to set up and input data into the forms.

How well does it work?

I have run my personal income tax information through the fed2019 model and received identical results to the commercial tax prep software I'm using to actually file my tax returns. My situation is moderately complex, and it exercises most of the forms in the fed2019 module. Your results may vary.

ustaxlib's People

Contributors

dependabot[bot] avatar rsesek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.