Coder Social home page Coder Social logo

tabby's Introduction

Tabby - A friendly tool to manage debt

Tabby is a tool I made for myself due to lack of practical and unannoying tools to manage debt and remind people about it. Since existing solutions require accounts for people to even see how much you owe, or have other annoying requirements or missing features, I created Tabby with the idea that it would serve all of my needs and be as enjoyable for my debtors as possible (I was mostly just tired of reminding people to pay back their meals).

While initially developing Tabby as mostly a quick little script, I somehow managed to develop it in full. So since it works surprisingly well and has a bunch of features, I ended up FOSSing it. It's something I very much believe in ideologically, and I think it might be useful to others. From time to time, I still add new features to Tabby to make it more convenient for me or if a friend (or a user on GitHub) requests a specific feature that also makes sense to me.

Table of Contents

Features

  • An installation is a private instance owned by an admin
  • The admin can approve or deny account registrations
  • Accounts are only required to register debt, debtors don't require any form of account
  • While an interface is available for debtors, they can also get all the information required to repay someone through email
  • Track debt based on activities
  • Track credit separate from whether a specific debt was repaid or not (so people with open credit are just fine)
  • Reminds users to check their bank account and then ask Tabby to send reminders
  • In spirit of the GDPR, as little information is required as possible.
  • Adorable logo
  • ... and more (I'm probably forgetting to mention some neat stuff, so check out the screenshots below for sure!)

Screenshots

Landing page

This page is displayed when a user is not logged in. It features some basic information about Tabby, as well as a login form, link to a registration form, and an easy way to request a token link to check your debt without an account. screenshot landing page

Installation form

Since version 1.1, Tabby has a simple installation form where you enter your database credentials, email preferences and application settings. The database tables as well as the configuration file are created automatically. screenshot installation form

Overview of debt (or credit) of all your contacts

This is the page you see after logging in to Tabby. It gives an overview of what each of your contacts owes you and from what. Tabby displays which debts are (fully or partially) unpaid, as well as credits. A total is displayed at the bottom of each contact's box. You can easily enter wire transfers or cash you reveived through the small forms. Buttons are available for most actions you may need to perform. screenshot overview of debt by people

Overview of debt by activity

This page gives an overview of each activity you've added to Tabby. For those who haven't fully repaid their debt for that specific activity, the number is marked with a colour. You can also easily add extra contacts for a specific activity or change the numbers if you've made a mistake. screenshot overview of debt by people

Reminder page

It's super easy to send a reminder with Tabby. You can pick whether you want to email everyone with debt or just a specific person. You can also add an optional message to make the reminder a bit more personal. screenshot reminder page

Requirements

  • PHP 7.2 or up, mostly works fine with PHP 5.5.9 except for email functionality
  • MySQL or PostgreSQL
  • Working mail setup on the webserver
  • Cron is advised but webcron fallback is available

Installation

Released version

  • Download the latest release from GitHub releases.
  • Unpack and upload the file to your server or hosting space.
  • Visit the corresponding URL, Tabby will automatically display the installation form.
  • Enter the database credentials (create them if you don't have them yet).
  • Enter email and application settings.
  • After confirming installation, the configuration will be written to a file.
    • If no write permissions are available, the contents of the configuration file are displayed. Create config.php locally with those contents and upload it to the correct folder.
    • When you're not using webcron, correctly install a cronjob using the displayed example as basis.
    • If not using Apache or if mod_rewrite and/or .htaccess aren't available, you may need to configure correct mapping to index.php and redirecting of the changelog.
  • You can now start using your Tabby installation. Log in with your account, then add people to register debt from activities for them.

Git version

Keep in mind that code may be committed to git that isn't ready for a full release.

  • Clone this repo to the right location or copy/transfer it there.
  • Visit the corresponding URL, Tabby will automatically display the installation form.
  • Enter the database credentials (create them if you don't have them yet).
  • Enter email and application settings.
  • After confirming installation, the configuration will be written to a file.
    • If no write permissions are available, the contents of the configuration file are displayed. Create config.php locally with those contents and upload it to the correct folder.
    • When you're not using webcron, correctly install a cronjob using the displayed example as basis.
    • If not using Apache or if mod_rewrite and/or .htaccess aren't available, you may need to configure correct mapping to index.php and redirecting of the changelog.
  • You can now start using your Tabby installation. Log in with your account, then add people to register debt from activities for them.

Upgrading

If you are using git, pull the latest version and then checkout the tag of the version you're upgrading to. If you are using releases, simply download the right files and overwrite your current directory (or move over config.php). When all the files are in place, visit upgrade.php or run it from the command line to perform database schema upgrade (if required). Follow any supplementary instructions upgrade.php displays.

Changelog

A simplified changelog is available in the changelog.txt file.

License

This project is licensed under the AGPL license - see the LICENSE file for details.

Acknowledgements

Tabby uses the bubblegum bootstrap theme by hackerthemes.com, licensed under the MIT license and based on Bootstrap 4. This theme includes Font Awesome, which contains files under the CC BY 4.0, SIL OFL and MIT License.

tabby's People

Contributors

bertvandepoel avatar vierbergenlars avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

tabby's Issues

Any chance for LDAP auth and SSO?

I have FreeIPA set up to handle accounts for my friends and family on my servers. That ties into Authelia for logins. Makes adding new accounts really easy, and makes using stuff really easy for them. I've been looking for something like this that would leverage the existing accounts. It doesn't look like Tabby integrates with those though. Any chance of that happening in the future?

How to adapt php.ini for non-standard sendmail emailing?

I was trying out tabby today and saw this text on the installation screen

Please refer to the PHP documentation and adapt your php.ini or .user.ini if standard sendmail emailing isn't available.

With a link to php documentation here.

My question is, are there any examples of ways to adapt php.ini for non standard email set ups? I currently don't have a working sendmail on my server, and usually use sendgrid for other applications that have the built in support for it. Is using sendgrid here even possible? Or is sendmail the only way to use this application?

Many thanks in advance.

Docker installation

Hi, first thanks for the awesome development.

Do you plan to support Docker as an installation method?

It could be much easier for people to try your application.

404 after install

Hi,

I've been having some trouble getting tabby working for a few days now. I have tried both on an arch linux host system as well as in alpine linux based docker files. I am able to get the database set up and configured fine, however, I am unable to log in or navigate to any other pages other than /? and / with a login screen.

I've now tried with both nginx and apache, both in docker and on the host, but I get the same result either way. I am able to fill out the database configuration (I can see the tables have been made and the user exists), and get to the screen where it says I am able to start using it, however the process stalls at logging in ie. /login 404s or isn't found in try_files etc. (this is the same for all the endpoints in index.php, resources/ and templates/. I was wondering if someone might have a working configuration I might be able to look at?

Many thanks

Feature Request Docker container

As a home user it would be great to have this in a docker container for quick deployment, demoing and testing.

Stretch goal to run on raspberry pi as an arm image

Alias support

When you have multiple email addresses, it's quite possible someone registers debt with a different address than the one used for your account. This way, you can't view the debt under "My debt". This could be solved by adding aliases to your account (which would require verification emails).

Recurring expenses?

Hello! I'm trying to replace Splitwise for keeping track of expenses between me and my partner, and was curious whether tabby can handle recurring expenses?

Unable to delete activity

Hello! I've been using tabby lately and it's pretty great!! However I noticed when I try to delete an activity, whether debit or credit, it simply doesn't do anything. Does anyone have any idea what's going on? Everything else works fine, it's just this one issue.

I would attach error logs, but I'm not even sure where to look for them...

Here's a gif of the behavior, though I will add that the page reloads after clicking the trash icon (very briefly I might add!)

image

Adding negative debt (credit) through an activity fails

It seems that it is not possible to assign negative debt (credit) to a person through the add activity function. When I submit a negative value (see screenshot), Tabby tells me that it has successfully added the debt (with a green redirect screen), although in the overview nothing (not positive nor negative) is actually added to the person's account.

Screenshot from 2021-08-21 12-26-29

Although I understand that this feature might not be supported, it should in the current state at least return some error as a warning. (My suspicion is that something could be missing near https://github.com/bertvandepoel/tabby/blob/master/index.php#L302 .) Personally, I would prefer it to work, rather than reporting an error, as it would be a useful feature that I could use.

Cannot start session when headers already sent

Hello! This looks like a great tool, unfortunately I'm having some trouble getting it to work. I'm on a shared host (Dreamhost), running PHP 7.4 with MySQL 5.7.29. Tabbly is installed in a subdomain (e.g. tabby.domain.com).

The install seems to go fine. The database has tables, and a single user in users.

When I visit the home page, or try to log in, login doesn't happen (I'm redirected to /people but I just see the home page with login form), and I see the following error in my logs:

mod_fcgid: stderr: PHP Warning:  session_start(): Cannot start session when headers already sent in /home/acodispo/tabby.domain.com/resources/init.php on line 18

I also notice that a cookie is not being saved.

Any ideas? Thanks in advance!

Switch from default mail function to PHPMailer

I've been looking into ways of getting emails to work in the docker container. I propose that you switch from using the default mail function in php to using something more robust like PHPMailer. From what I've been able to gather online the default function doesn't allow you to do authentication with an external SMTP server. PHPMailer allows for things like SMTP authentication and I think it would make using the container much easier and attainable for most users.

I also think it'd be a good switch because many ISPs that I know of in the USA block email for most plans so allowing for use of external SMTP servers would be very beneficial in those cases. With this switch I'd be able to have users enter this information as environment variables when starting the container making it easy to configure and change in the future.

In the US, we don’t have IBAN

I posted this on an old issue a couple days ago and was asked to make a new one:

Here in the US we don't have IBAN numbers, we have ABA routing numbers. But no one uses those here in the States for anything outside of old, kermudgeony programs and what not...

Most of us are using apps like Chime, Cash.app, Zelle, and other app-based payment transfer services...

So, having an option that here in the US we could either simply list our payment usernames or if you have the time and what not, to have your service pull in the app's corresponding information for that account. (Like, Cash.app uses a QR code that our friends can scan to send money)

So, with this IBAN requirement, I'm completely unable to even use this service, which i'm really interested in trying out.

Issue: Typo in `check_any_debtors` function causing potential bug

Typo in check_any_debtors function causing potential bug

I noticed a small issue in the check_any_debtors function in people.php which might cause unexpected behavior.

function check_any_debtors($emails) {
    global $db;
    $get = $db->prepare('SELECT count(*) FROM debtors WHERE email=? AND owner=?');
    foreach($emails as $email) {
        $get->execute(array($email, $_SESSION['tabby_loggedin']));
        if($get->fetchColumn() > 0) {
            return FALSE;
        }
    }
    return T;
}

In the last line of the function, it should return TRUE instead of T. The current implementation might lead to a runtime error or unexpected behavior since T is not a defined constant in the code.

Proposed solution:

Replace return T; with return TRUE; to fix the issue:

function check_any_debtors($emails) {
    // ...
    return TRUE;
}

Please let me know if you have any questions or need further clarification.

Debt values >1,000.00 not shown properly in record

Debt records with values above 1,000.00 are not displayed correct.
The total amount of debt per person on the other hand is correct.

Add new debt via activity: 1,234.56
shows up under people overview as -1.23
Database field "amount" [int(11)] shows 123

Add new debt via activity: 1234.56
shows up under people overview as -1.00
Database field "amount" [int(11)] shows 123456

Technical: MariaDB 10, php7.2

Change sorting for people with no debt

Sort by date of most recent credit transaction, so most recently changed people appear first instead of those who haven't had any debt or credit added in ages.

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.