GithubHelp home page GithubHelp logo

moneytrackbot's Introduction

moneyChatBot

A money chat bot that keep track of expenses

Table of contents

General info

Money chat bot created to help users keep track on money. Each transaction been save to database and the user can export the data to Excel file.

Technologies

The project created with:

  • python 3.9
  • flask
  • postgresSQl
  • telegram bot

Setup

Make sure you have python and virtualenv in your computer.

In the project directory run:
Linux \ MacOS:

$ virtualenv venv && source venv/bin/activate && pip install -r requirements.txt

Windows:

$ virtualenv venv && venv\Scripts\activate && pip install -r requirements.txt

Create .env file as following: Replace Value with the real value

PSQL_KEY=Value
API_KEY=Value
TELEGRAM_ID=Value
Admin_Username=Value
Admin_Password=Value
Flask_Secret_Key=Value

Navigate to project folder and run:

$ python run.py

Keep in mind:

backup.sql file can use to create a database with appropriate values and columns.

Do not forget to add TELEGRAM_ID value to authorized_users.txt file

Another feature is an admin website that can be access on port 8080 on host ip, The admin website can be used for accepting new users requests.

If you wish to use the bot in a production mode

Add production lines: to run.py file

from waitress import serve

Replace app.run with production line

serve(app, host="0.0.0.0", port=8080)

Run this command on production

$ nohup python run.py > log.txt 2>&1 &

moneytrackbot's People

Contributors

mraviel avatar

Stargazers

 avatar

Watchers

 avatar

moneytrackbot's Issues

Add a command to get permission for using the bot

The command will send me an email with relevant information about the user (user_id included)
Than in the email i will have an option to authorize the user,
I thing this can not be done via email, I need to think about another idea for authorized_users file to change remotely.

Change the way the application communicate with the database

Now there are several warnings about the connection with the database,
Also the way the app pull data from db is not efficient:
Currently the app takes all the messages row for the author_id and than the app takes the all list of items and parse it for the current month, if will be 20 or more months with hundreds of rows the process will take longer,
Change the way it's take the data to a more specific query.

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.