Coder Social home page Coder Social logo

imranr98 / dscpln Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 37 KB

A simple webpage that shows whether or not you've gone over your budget this month, and sends you push notifications when the limit is reached.

License: MIT License

Dockerfile 1.18% JavaScript 57.71% HTML 41.11%

dscpln's Introduction

D$CPLN

A simple webpage that shows whether or not you've gone over your budget this month, and sends you push notifications when the limit is reached.

Does this by reading a list of your expenses from some source and checking to see if the total exceeds a preference you set. This assumes that you religiously record your expenses somewhere as they happen.

Currently, the only supported data source are text files with a specific formatting, but the code could be expanded to include other data sources.

Environment variables needed (a .env file can be used for this - see template.env):

  • DATA_PROVIDER: The module from /dataProviders to use for data sourcing. By default, this is textFileDataProvider (the only one currently available).
  • PORT: The HTTP port to listen on (defaults to 3300).
  • If you use the textFileDataProvider:
    • TEXTFILE_DATA_PROVIDER_DATA_PATH: The path to the text file where you record expenses (defaults to data.txt).
      • Lines in this file must adhere to the format: '<amount> <description> <optional 'M D' date (if none, take from previous line)>'
    • TEXTFILE_DATA_PROVIDER_BUDGET_PATH: The path to a text file where the budget limit should be stored (defaults to budget.txt).
    • TEXTFILE_BUDGET_INIT_AMT: The amount that the monthly limit should be initialized to if it does not already exist.
    • TEXTFILE_FIRST_WEEK_BIAS_INIT_AMT: The extra amount that will be assigned to the first week.
    • Note: Weekly budgets are given for "full weeks" (weeks with all 7 days), with any adjacent partial weeks lumped in to the current week's budget.
  • MONTHLY_LIMIT_NTFY_URL: The ntfy.sh URL to which to send "monthly budget limit reached" notifications.
  • WEEKLY_LIMIT_NTFY_URL: The ntfy.sh URL to which to send "weekly budget limit reached" notifications.
  • NTFY_CHECK_INTERVAL_MINUTES: How often, in minutes, to check for changes so that notifications can be sent out if needed.
  • NTFY_TOKEN: An authorization token to use when sending out notifications.
  • ONLY_WARN_ONCE: Monthly and Weekly notifications will only be sent the first time you go over budget and not for subsequent increases.

dscpln's People

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.