Coder Social home page Coder Social logo

locash's Introduction

locash

@locash_bot

Locash is free and open-source Telegram bot that solve one problem - keeps track of your money ;)

Motivation

There a lot of apps that do the same. They might be paid, contains ads, they store your data and doesn't allow you to download it until you paid. The project exist in order to provide freely ability to track expensives and incomes.

Features

  • track your income/spents
  • daily/weekly/monthly/yearly/all/past_seven_days statistics

Examples

Example

How Locash works

Architecture

Architecture in future ๐Ÿ˜

ArchitectureFuture

Instalation

  1. nvm use
  2. npm install
  3. create telegram bot in @BotFather and set WebHook
  4. Copy message-handler/credentials.example.json into message-handler/credentials.json
  5. Run docker run -d -p 8000:8000 amazon/dynamodb-local
  6. Run aws dynamodb create-table --cli-input-json file://transactions.json --endpoint-url http://<local-dynamodb>:8000

Example

Run project

./start.bash $(date +%s) [chat_id] [count]
  1. sam build
  2. sam local start-api --env-vars env.json
  3. curl -X POST -H "Content-Type: application/json" -d '{"message":{"chat": {"id": 31}, "text": "-20 coffee", "date": 1601022097 }}' http://127.0.0.1:3000/message/\?token\=<token>

Or

  1. sam build
  2. sam local invoke -e events/message2.json MessageHandlerFunction --env-vars env.json

Echo current date

echo $(date +%s)

Generate transactions

node generate-transactions/index.js $(date +%s) [chat_id] [count] > data.json

Import transactions

aws dynamodb batch-write-item --request-items file://import-transactions.json --endpoint-url http://127.17.0.2:8000

locash's People

Contributors

gabanich avatar dependabot[bot] avatar

Stargazers

FC-Zer0x1 avatar  avatar JXQ avatar

Watchers

James Cloos avatar

locash's Issues

Add charts for week, past seven day

{
   "type":"bar",
   "data":{
      "labels":["Jan 2020", "Nov 2020"],
      "datasets":[
         {
            "label":"Transactions",
            "data":[
               {
                  "x":"2020-5-25",
                  "y":20
               },
               {
                  "x":"2020-2-26",
                  "y":-10
               }
            ]
         }
      ]
   },
   "options":{
      "scales":{
         "xAxes":[
            {
               "type":"time",
               "time":{
                  "unit":"month"
               }
            }
         ]
      }
   }
}

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.