Hackware's Digital Wallet https://git.hackware.cl/hawese-wallet

Hacktivista 1c74e55615 Needed bugfixes 5 years ago
private 1c74e55615 Needed bugfixes 5 years ago
public_html 9b59393751 New project directory structure 5 years ago
COPYING d1376b9cc0 License under AGPL-3.0-or-later 5 years ago
README.md d1376b9cc0 License under AGPL-3.0-or-later 5 years ago

README.md

Digital wallet

Overview

Digital wallet that associates transactions and balance to unique users.

Main goals

  • Add and subtract transactions
  • Lookup balance
  • Support any number of currencies (incluiding company's own currencies)
  • Transactions history

Generic requirements

  • Web API with RESTful JSON responses
  • Amounts must allow decimals
  • Every list of objects must implement a pager (limit must be configurable)
  • Every list of objects must implement ordering (desc/asc)

User stories

  • As consumer I want to create a wallet so I can perform further transactions with the same uid. I should be able add an initial amount in any currency of money and this amount could be negative. Independent of which currency I'm using the transaction values should be reasonably consistent on different days.
  • As consumer I want to transact money by adding or subtracting balance from an existing wallet so a client can pay for the services he consumes. Account balance must be consistent with the amount entered within transactions, even after a currency rate has changed.
  • As consumer I want to lookup for current state of a wallet so I can know how much money a client has available.
  • As consumer I want to lookup for the current state of all wallets so I can have a general view.
  • As consumer I want to lookup for the transactions history of a wallet so I can know how I've reached the current account balance of a wallet. Should be ordered by descending datetime.
  • As consumer I want to filter by start and/or end time of transactions so I can be more granular on my transactions history lookup.
  • As consumer I want to optionally include the currency object of transactions history list, so I don't need to look it up with other request.
  • As consumer I want to list all existing currencies, so I can know which ones are available.
  • As consumer I want to lookup at the current rate of a currency so I can display that information to users.
  • As consumer I want to convert currency rates so I can perform operations based on this information.

Database tables

  • currencies: id*, code (char 3), rate (decimal), step (decimal), created_at
  • wallets: uid* (string 100), currency_code (fk char 3), balance (decimal), created_at, updated_at, deleted_at
  • transactions: id*, wallet_uid (fk sting 100), currency_id (fk char 3), amount (decimal), comment (string 255), created_at

Run it

Requirements

As it's based on Lumen 5.7, your server must meet the following requirements:

  • PHP >= 7.1.3
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Composer

Installation

  • Clone it
  • Configure the private/.env file based on private/.env.example (or use environment variables)
  • Run composer install from private/
  • Configure your webserver to run the index.php file in public_html/
  • Enjoy :)

Copyright and licensing

Copyright 2019 Hackware SpA.

This project is licensed under the GNU Affero General Public License v3 or any later version.

How to comply with license terms?

To comply with license terms you must provide the means to access the source code of your version of the software easily and free of charge to any person that has access to the software, even users which access through a network (i.e. web browser). I've provided an easy way to accomplish this requirement by setting the SOURCE_URL environment variable (you can use private/.env.example as base), this will show the link on the index page (/) under the JSON links.sourcecode property.

Any modification or inclusion of this source code will inherit the same license, that is, it can't be sublicensed. But since it's a REST API you can consume it with any other software, yes, even proprietary software, though I would urge you to be mindful that it's not something to be proud of.

I want to use the software but I'm afraid of or can't comply with the license terms, do you provide other licenses?

I'm mostly interested in receiving your modifications to the software back, I can provide you other licenses.

Contact information

hackware.cl